notashes commented on code in PR #20279:
URL: https://github.com/apache/datafusion/pull/20279#discussion_r2791074578


##########
datafusion/physical-plan/src/aggregates/mod.rs:
##########
@@ -1129,6 +1129,16 @@ impl AggregateExec {
             return;
         }
 
+        // Don't push the dynamic filter if the query includes aggregates like
+        // COUNT, SUM, AVG as they usually require all of the rows matching 
the WHERE clause
+        let has_non_minmax = self.aggr_expr.iter().any(|aggr_expr| {

Review Comment:
   I don't think they would apply here (not any that I can think of). As 
physical UDAF args are `Vec<Arc<dyn PhysicalExpr>>`
   
   ```rust
   /// Physical aggregate expression of a UDAF.
   ///
   /// Instances are constructed via [`AggregateExprBuilder`].
   #[derive(Debug, Clone)]
   pub struct AggregateFunctionExpr {
       fun: AggregateUDF,
       args: Vec<Arc<dyn PhysicalExpr>>,
       /// Fields corresponding to args (same order & length)
       arg_fields: Vec<FieldRef>,
   ```



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