Skip to content

Enable supports_filter_during_aggregation for the Generic Dialect #15719

@goldmedal

Description

@goldmedal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions