peter-toth commented on a change in pull request #31913:
URL: https://github.com/apache/spark/pull/31913#discussion_r600386244



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/finishAnalysis.scala
##########
@@ -66,6 +66,34 @@ object RewriteNonCorrelatedExists extends Rule[LogicalPlan] {
   }
 }
 
+/**
+ * Wrap complex grouping expression in aggregate expressions without aggregate 
function into
+ * `GroupingExpression` nodes so as to avoid further optimizations between the 
expression and its
+ * parent.
+ *
+ * This is required as further optimizations could change the grouping 
expression and so make the
+ * aggregate expression invalid.

Review comment:
       Sure, added in 
https://github.com/apache/spark/pull/31913/commits/f46b89d6d81be4a7867fd3bc9edeccc1f7e9aea5

##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/finishAnalysis.scala
##########
@@ -66,6 +66,34 @@ object RewriteNonCorrelatedExists extends Rule[LogicalPlan] {
   }
 }
 
+/**
+ * Wrap complex grouping expression in aggregate expressions without aggregate 
function into

Review comment:
       Described in 
https://github.com/apache/spark/pull/31913/commits/f46b89d6d81be4a7867fd3bc9edeccc1f7e9aea5




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

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