-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Customizable Nullability for UDAF #11274
Comments
To address this we could extend the pattern here datafusion/datafusion/expr/src/aggregate_function.rs Lines 84 to 88 in 4bc3228
ie now we have this is an API for builtin functions, we would need similar API for UDAFs datafusion/datafusion/expr/src/udaf.rs Line 330 in 5f02c8a
Obviously, this would be a breaking change: both method signature and return type would change. |
Just thinking more about this. SQL spec
and this is also about array_agg. So it might be that the |
I agree that we don't need non-null for btw, our |
The nullability of a function can differ from the final result, which is crucial for optimization purposes. We can inform the optimizer that a function will always return a non-null value, allowing for optimizations based on this assumption. However, the final result can still be null if no rows qualify, resulting in an empty plan and thus a null value |
Is your feature request related to a problem or challenge?
Follow on #11093 and also there is another issue #11256 expect this
Describe the solution you'd like
There are some functions always returns non-null result, like
count
,array_agg
,min/max
and more.We can optimize the query based on the nullability of the function, so it would be helpful if we could define nullability for each UDAF
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: