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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala:
##########
@@ -1724,6 +1724,10 @@ object PushPredicateThroughNonJoin extends 
Rule[LogicalPlan] with PredicateHelpe
       val aliasMap = getAliasMap(project)
       project.copy(child = Filter(replaceAlias(condition, aliasMap), 
grandChild))
 
+    // We can push down deterministic predicate through Aggregate, including 
throwable predicate.
+    // If we can push down a filter through Aggregate, it means the filter 
only references the
+    // grouping keys. The Aggregate operator can't reduce grouping keys so the 
filter won't see any

Review Comment:
   ```suggestion
       // grouping keys or constants. The Aggregate operator can't reduce 
distinct values of grouping keys so the filter won't see any
   ```



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