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


##########
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:
   e.g. `Filter(a > 1, Aggregate(1 as a, max(col), ...))`, we can push down the 
filter, right?



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