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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/RewriteDistinctAggregates.scala:
##########
@@ -198,13 +198,15 @@ import org.apache.spark.util.collection.Utils
  */
 object RewriteDistinctAggregates extends Rule[LogicalPlan] {
   private def mustRewrite(
-      aggregateExpressions: Seq[AggregateExpression],
+      distinctAggs: Seq[AggregateExpression],
       groupingExpressions: Seq[Expression]): Boolean = {
-    // If there are any AggregateExpressions with filter, we need to rewrite 
the query.
+    // If there are any distinct AggregateExpressions with filter, we need to 
rewrite the query.
     // Also, if there are no grouping expressions and all aggregate 
expressions are foldable,

Review Comment:
   ```suggestion
       // Also, if there are no grouping expressions and all distinct aggregate 
expressions are foldable,
   ```



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to