Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
address comments
  • Loading branch information
cloud-fan committed Nov 15, 2023
commit bf34e26d5ea11d3576b709c6203af0a536e62853
Original file line number Diff line number Diff line change
Expand Up @@ -2005,8 +2005,9 @@ class Analyzer(override val catalogManager: CatalogManager) extends RuleExecutor
// analyze the plan. Using a different integer literal may lead to
// a repeat GROUP BY ordinal resolution which is wrong. GROUP BY
// constant is meaningless so whatever value does not matter here.
// TODO: GROUP BY ordinal should pull out grouping expressions to a Project, then
// the resolved ordinal expression is always `AttributeReference`.
// TODO: (SPARK-45932) GROUP BY ordinal should pull out grouping expressions to
// a Project, then the resolved ordinal expression is always
// `AttributeReference`.
case Literal(_: Int, IntegerType) =>
Literal(index)
case _ => ordinalExpr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class SubstituteUnresolvedOrdinalsSuite extends AnalysisTest {
}
}

test("group by ordinal repeated analysis") {
test("SPARK-45920: group by ordinal repeated analysis") {
val plan = testRelation.groupBy(Literal(1))(Literal(100).as("a")).analyze
comparePlans(
plan,
Expand Down