cloud-fan commented on code in PR #45290:
URL: https://github.com/apache/spark/pull/45290#discussion_r1505328033


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/MergeScalarSubqueries.scala:
##########
@@ -353,9 +353,20 @@ object MergeScalarSubqueries extends Rule[LogicalPlan] {
         case a: AggregateExpression => a
       })
     }
+    val groupByExpressionSeq = Seq(newPlan, cachedPlan).map { plan =>
+      plan.groupingExpressions.flatMap(_.collect {

Review Comment:
   I think it should be just `plan.groupingExpressions`, e.g. `GROUO BY 
func(a)` can be supported by hash aggregate if `func(a)` returns normal string, 
no matter if `a` is string with collation or not.



-- 
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]

Reply via email to