cloud-fan commented on a change in pull request #29369: URL: https://github.com/apache/spark/pull/29369#discussion_r467664199
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala ########## @@ -339,6 +340,39 @@ object EliminateDistinct extends Rule[LogicalPlan] { } } +/** + * Remove useless FILTER clause for aggregate expressions. + * This rule should be applied before RewriteDistinctAggregates. + */ +object EliminateAggregateFilter extends Rule[LogicalPlan] { Review comment: Can we put this rule in the main optimizer batch? ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org