-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Allow to filter null in array_agg
#13742
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
AFAICT, the I'm OK for respecting |
I like the idea that we leverage existing filter in AggregateExec for this usecase datafusion/datafusion/physical-plan/src/aggregates/mod.rs Lines 355 to 356 in c030bfe
I guess you can create
We have filter already 👍🏻 |
To be clear, I think the SQL parser supports predicates like However, some aggregates (silently) ignore this, see I think filling out support (or at least making it clear that this syntax is ignored) would be a great idea |
Thank you @alamb. do you have an example of an agg that doesn't ignore them? |
I think |
Is your feature request related to a problem or challenge?
Yes, I want nulls to be filtered from
array_agg
when I specifywith_ignore_nulls: true
inAggregateExprBuilder
to have behavior similar to Spark, this should also work whenwith_distinct
isfalse
ortrue
Describe the solution you'd like
Specifing
with_ignore_nulls: true
should ignoreDescribe alternatives you've considered
array_agg
Additional context
This PR might be relevant:
I'm willing to open a pull request
The text was updated successfully, but these errors were encountered: