cloud-fan commented on code in PR #50567:
URL: https://github.com/apache/spark/pull/50567#discussion_r2041385665
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveReferencesInAggregate.scala:
##########
@@ -116,19 +116,7 @@ class ResolveReferencesInAggregate(val catalogManager:
CatalogManager) extends S
groupExprs.map { g =>
g.transformWithPruning(_.containsPattern(UNRESOLVED_ATTRIBUTE)) {
case u: UnresolvedAttribute =>
- val (result, index) =
- selectList.zipWithIndex.find(ne => conf.resolver(ne._1.name,
u.name))
- .getOrElse((u, -1))
-
- trimAliases(result) match {
- // HACK ALERT: If the expanded grouping expression is an integer
literal, don't use it
Review Comment:
This hack only works if the resolved integer literal is the root expression,
which may not be true here.
Good catch!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]