[AURON #2182] Implement native support for percent_rank window function#2204
Draft
weimingdiit wants to merge 1 commit intoapache:masterfrom
Draft
[AURON #2182] Implement native support for percent_rank window function#2204weimingdiit wants to merge 1 commit intoapache:masterfrom
weimingdiit wants to merge 1 commit intoapache:masterfrom
Conversation
…function 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 #2182
Rationale for this change
Auron does not currently support
percent_rank()in native window execution, so queries using this function fall back to Spark. This leaves a gap in native window function coverage.percent_rank()cannot be implemented with the existing streaming-style window processors alone, because its result depends on both the row rank and the total number of rows in the partition. To match Spark semantics, the native engine needs to evaluate it with full-partition context.What changes are included in this PR?
This PR adds native support for
percent_rank()window function end to end.The main changes are:
PERCENT_RANKto the window function protobuf and planner conversion path so Spark plans can be serialized into native plans correctly.NativeWindowBaseto recognize Spark'sPercentRankexpression and convert it to the native window function enum.PercentRankProcessorthat computes percent rank with Spark-compatible semantics:(rank - 1) / (partition_size - 1)0.0percent_rank().Are there any user-facing changes?
Yes.
Queries using
percent_rank()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 user-facing configuration changes are introduced.How was this patch tested?
CI.