Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Jun 15, 2023

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 the Accumulator trait for aggregates

You 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 to datafusion_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 in datafusion_expr

@github-actions github-actions bot added core Core DataFusion crate logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates labels Jun 15, 2023
@alamb alamb changed the title Move PartitonEvaluator and window_state structures to datafusion_expr crate Move PartitionEvaluator and window_state structures to datafusion_expr crate Jun 16, 2023
@alamb
Copy link
Contributor Author

alamb commented Jun 20, 2023

@mustafasrepo I wonder if I can trouble you for a review of this PR? I think it is straightforward

Copy link
Contributor

@mustafasrepo mustafasrepo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is LGTM!. Thanks @alamb. Also it was weird to have impl WindowAggStates scattered, thanks for combining them on the way.

@mustafasrepo mustafasrepo merged commit 3c304e0 into apache:main Jun 21, 2023
@alamb alamb deleted the alamb/move_partition_evaluator branch June 21, 2023 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants