adriangb commented on code in PR #20279:
URL: https://github.com/apache/datafusion/pull/20279#discussion_r2791217433
##########
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:
My worry was about something like `min(avg(col))`. I can confirm that is not
possible:
```sql
D create table tab(x int, y int);
D select min(avg(x)) from tab group by y;
Binder Error:
aggregate function calls cannot be nested
LINE 1: select min(avg(x)) from tab group by y;
```
--
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]