-
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
UDAF: Extend more args to state_fields
and groups_accumulator_supported
and introduce ReversedUDAF
#10525
Conversation
Signed-off-by: jayzhan211 <[email protected]>
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.
Thanks @jayzhan211 -- I think this is a very nice PR 🙏
The only thing I think we should consider is reusing AccumulatorArgs rather than adding GroupsAccumulatorSupportedArgs
sort_exprs, | ||
} | ||
} | ||
pub struct StateFieldsArgs<'a> { |
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.
Can we please add doc comments to this explaining what it is for?
datafusion/expr/src/function.rs
Outdated
|
||
/// [`GroupsAccumulatorSupportedArgs`] contains information to determine if an | ||
/// aggregate function supports the groups accumulator. | ||
pub struct GroupsAccumulatorSupportedArgs { |
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 know the current implementation of groups_accumulator_supported
only needs these two fields, but I can see in the future needing more of them
Is there any reason we can't just pass AccumulatorArgs
to groups_accumulator_supported
?
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.
We could do this.
Signed-off-by: jayzhan211 <[email protected]>
Signed-off-by: jayzhan211 <[email protected]>
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.
Thanks @jayzhan211
…orted` and introduce `ReversedUDAF` (apache#10525) * extends args Signed-off-by: jayzhan211 <[email protected]> * reuse accumulator args Signed-off-by: jayzhan211 <[email protected]> * fix example Signed-off-by: jayzhan211 <[email protected]> --------- Signed-off-by: jayzhan211 <[email protected]>
Which issue does this PR close?
Closes #10391.
Rationale for this change
This PR is pulled from #10484 and it has a similar rationale in #10391 but the changes in this PR are for #10484
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?