[AURON #2180] Implement native support for nth_value window function#2203
Draft
weimingdiit wants to merge 1 commit intoapache:masterfrom
Draft
[AURON #2180] Implement native support for nth_value window function#2203weimingdiit wants to merge 1 commit intoapache:masterfrom
weimingdiit wants to merge 1 commit intoapache:masterfrom
Conversation
…ction Signed-off-by: weimingdiit <weimingdiit@gmail.com>
f37d52a to
2dcff6b
Compare
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 #2180
Rationale for this change
Auron did not previously support native execution for Spark nth_value window function, so queries using nth_value would fall back to Spark execution.
Spark defines nth_value(input, offset) as returning the value at the offsetth row from the beginning of the current window frame, with offset starting from 1. When IGNORE NULLS is specified, null input rows should be skipped when counting toward the target position. To improve Spark compatibility, Auron needs native support for both the regular and IGNORE NULLS variants.
The current native window executor only supports cumulative row-frame semantics, so this change scopes native conversion to the frame that is already supported correctly:
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW.
What changes are included in this PR?
This PR adds end-to-end native support for nth_value window function across the Spark frontend, planner, and native engine.
The changes include:
Are there any user-facing changes?
Yes.
Queries using nth_value can now be executed natively when they use the supported frame:
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW.
Both of the following forms are supported:
Queries using unsupported window frames will continue to fall back to Spark execution.
How was this patch tested?
CI.