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
Add support for aggregate expressions with filters #585
Changes from all commits
0a777b2
e2a8432
6101026
29276e2
d663a3e
93ac2f3
9cd5782
96ff349
315916b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,10 @@ impl Dialect for PostgreSqlDialect { | |
None | ||
} | ||
} | ||
|
||
fn supports_filter_during_aggregation(&self) -> bool { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For what it is worth, I think the DataFusion actually uses the Generic Dialect, https://github.com/apache/arrow-datafusion/blob/0084aeb686b318cbdb49cab00cb8f15c9f520d1e/datafusion/sql/src/parser.rs#L102 Thus we may want to add return true from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. Dask SQL has their own dialect where they want to use this, but it makes sense to add to the dialect that DataFusion is using as well. |
||
true | ||
} | ||
} | ||
|
||
pub fn parse_comment(parser: &mut Parser) -> Result<Statement, ParserError> { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we would want to add this to
src/dialect/postgres.rs
as well since postgresql supportsFILTER
also https://www.postgresql.org/docs/current/sql-expressions.htmlThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done