-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Selective Aggregates, Filter clause #2214
Comments
Note that for most aggregation functions this could be done purely on logical plan level by rewriting |
I would love to pick this and work on it |
There is a related PR to add support in the SQL query planner and logical plan, but does not add physical plan support: #3405 |
Excited!!. I've implemented |
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
PostgreSQL supports the SQL
Filter Clause
which is a clause that filters certain rows based on the defined row expressions before an aggregation is performed. Currently Datafusion does not provide a mechanism for parsing those clauses. See Filter Clause for more in depth details on the clauses behavior.Describe the solution you'd like
The
datafusion::logical_plan::plan::Aggregate
struct should include a new member Ex:pub filter_expr: Vec<Expr>
which contains the filtering expressions that could be applied by the consuming engine before performing the actual aggregations that are defined inpub aggr_expr: Vec<Expr>
Describe alternatives you've considered
None
Additional context
Description of the syntax and functionality can be found here
The text was updated successfully, but these errors were encountered: