Move PartitionEvaluator
and window_state structures to datafusion_expr
crate
#6690
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Part of #5781
Rationale for this change
We are in the process of allowing users to define their own window functions, and to do we plan for them to implement the
PartitionEvaluator
trait, similarly to how they implement theAccumulator
trait for aggregatesYou can see the basic idea in the RFC PR: #6617
I think this is the last "getting ready" PR and the next one will have real support for User Defined Window Functions 🤞
What changes are included in this PR?
Move
PartitionEvaluator
and related structures todatafusion_expr
crate (where the WindowUDFs will be defined)There is no new functionality, this PR just moves code around.
Are these changes tested?
Covered by existing tests
Are there any user-facing changes?
PartitionEvaluator
and related structs are now visible indatafusion_expr