-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Is your feature request related to a problem or challenge?
The aggregate filter has been implemented by #5868 but it can only be used in some specific dialect (e.g., Postgres). The Geneirc dialect, which is the default dialect for DataFusion doesn't enable this syntax.
This syntax is a standard SQL syntax in SQL:2016 grammar. I prefer to enable it for the Generic dialect.
Describe the solution you'd like
We need to do this change on the sqlparser side first. Enable supports_filter_during_aggregation
https://github.com/apache/datafusion-sqlparser-rs/blob/514d2ecdaf24af52a5a5e7e5227bb1b1bd94f300/src/dialect/mod.rs#L246
for GenericDialect
https://github.com/apache/datafusion-sqlparser-rs/blob/514d2ecdaf24af52a5a5e7e5227bb1b1bd94f300/src/dialect/generic.rs#L25
Describe alternatives you've considered
No response
Additional context
I'm not sure why we didn't introduce this for GeneircDialect. Maybe I missed some discussions. 🤔