[AURON #2181] Implement native support for cume_dist window function#2205
Draft
weimingdiit wants to merge 1 commit intoapache:masterfrom
Draft
[AURON #2181] Implement native support for cume_dist window function#2205weimingdiit wants to merge 1 commit intoapache:masterfrom
weimingdiit wants to merge 1 commit intoapache:masterfrom
Conversation
…ction Signed-off-by: weimingdiit <weimingdiit@gmail.com>
29 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
Closes #2181
Rationale for this change
Auron does not currently support the
cume_dist()window function in native execution, so queries using it fall back to Spark.cume_dist()must follow Spark semantics exactly: it returns the number of rows preceding or equal to the current row within the partition ordering, divided by the total number of rows in the partition, and rows in the same peer group must return the same value. Because this depends on the full partition size and peer group boundaries, it cannot be implemented correctly with the existing purely streaming window path.What changes are included in this PR?
This PR adds native support for
cume_dist()window function end to end.The main changes are:
CUME_DISTto the window function protobuf and planner conversion path.NativeWindowBaseto recognize Spark'sCumeDistexpression and serialize it into the native window plan.CumeDistProcessorthat computescume_dist()with Spark-compatible semantics:(peer_group_end_position) / (partition_size)1.0cume_dist()to ensure correctness.Are there any user-facing changes?
Yes.
Queries using
cume_dist()window function can now stay on the native execution path instead of falling back to Spark, as long as the rest of the plan is supported by Auron. No new user-facing configuration is introduced.How was this patch tested?
CI.