You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/03/01 02:22:43 UTC

[GitHub] [spark] wangyum commented on a change in pull request #35651: [SPARK-36194][SQL] Add a logical plan visitor to propagate the distinct attributes

wangyum commented on a change in pull request #35651:
URL: https://github.com/apache/spark/pull/35651#discussion_r816399599



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/RemoveRedundantAggregates.scala
##########
@@ -47,6 +47,10 @@ object RemoveRedundantAggregates extends Rule[LogicalPlan] with AliasHelper {
       } else {
         newAggregate
       }
+
+     case agg @ Aggregate(groupingExps, _, child) if agg.groupOnly && child.deterministic &&

Review comment:
       We had a test like this before:
   https://github.com/apache/spark/blob/a34e2afb7538894f9a264b894924e848cd6979e0/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/RemoveRedundantAggregatesSuite.scala#L104-L114




-- 
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-unsubscribe@spark.apache.org

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



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