[SPARK-38655][SQL] OffsetWindowFunctionFrameBase cannot find the offset row whose input is not-null#35971
Closed
beliefer wants to merge 6 commits intoapache:masterfrom
Closed
[SPARK-38655][SQL] OffsetWindowFunctionFrameBase cannot find the offset row whose input is not-null#35971beliefer wants to merge 6 commits intoapache:masterfrom
OffsetWindowFunctionFrameBase cannot find the offset row whose input is not-null#35971beliefer wants to merge 6 commits intoapache:masterfrom
Conversation
… find the offset row whose input is not null
cloud-fan
reviewed
Mar 25, 2022
sql/core/src/main/scala/org/apache/spark/sql/execution/window/WindowFunctionFrame.scala
Outdated
Show resolved
Hide resolved
…WindowFunctionFrame.scala Co-authored-by: Wenchen Fan <cloud0fan@gmail.com>
OffsetWindowFunctionFrameBase cannot find the offset row whose input is not-null
Contributor
Author
|
ping @cloud-fan |
cloud-fan
approved these changes
Mar 28, 2022
Contributor
|
thanks, merging to master/3.3/3.2! |
Contributor
Author
|
@cloud-fan Thanks a lot! |
cloud-fan
pushed a commit
that referenced
this pull request
Mar 28, 2022
…fset row whose input is not-null ### What changes were proposed in this pull request? ``` select x, nth_value(x, 5) IGNORE NULLS over (order by x rows between unbounded preceding and current row) from (select explode(sequence(1, 3)) x) ``` The sql output: ``` null null 3 ``` But it should returns ``` null null null ``` ### Why are the changes needed? Fix the bug UnboundedPrecedingOffsetWindowFunctionFrame works not good. ### Does this PR introduce _any_ user-facing change? 'Yes'. The output will be correct after fix this bug. ### How was this patch tested? New tests. Closes #35971 from beliefer/SPARK-38655. Authored-by: Jiaan Geng <beliefer@163.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
cloud-fan
pushed a commit
that referenced
this pull request
Mar 28, 2022
…fset row whose input is not-null ### What changes were proposed in this pull request? ``` select x, nth_value(x, 5) IGNORE NULLS over (order by x rows between unbounded preceding and current row) from (select explode(sequence(1, 3)) x) ``` The sql output: ``` null null 3 ``` But it should returns ``` null null null ``` ### Why are the changes needed? Fix the bug UnboundedPrecedingOffsetWindowFunctionFrame works not good. ### Does this PR introduce _any_ user-facing change? 'Yes'. The output will be correct after fix this bug. ### How was this patch tested? New tests. Closes #35971 from beliefer/SPARK-38655. Authored-by: Jiaan Geng <beliefer@163.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
kazuyukitanimura
pushed a commit
to kazuyukitanimura/spark
that referenced
this pull request
Aug 10, 2022
…fset row whose input is not-null ### What changes were proposed in this pull request? ``` select x, nth_value(x, 5) IGNORE NULLS over (order by x rows between unbounded preceding and current row) from (select explode(sequence(1, 3)) x) ``` The sql output: ``` null null 3 ``` But it should returns ``` null null null ``` ### Why are the changes needed? Fix the bug UnboundedPrecedingOffsetWindowFunctionFrame works not good. ### Does this PR introduce _any_ user-facing change? 'Yes'. The output will be correct after fix this bug. ### How was this patch tested? New tests. Closes apache#35971 from beliefer/SPARK-38655. Authored-by: Jiaan Geng <beliefer@163.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
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.
What changes were proposed in this pull request?
The sql output:
But it should returns
Why are the changes needed?
Fix the bug UnboundedPrecedingOffsetWindowFunctionFrame works not good.
Does this PR introduce any user-facing change?
'Yes'.
The output will be correct after fix this bug.
How was this patch tested?
New tests.