[SPARK-36851][SQL] Incorrect parsing of negative ANSI typed interval literals#34107
Closed
Peng-Lei wants to merge 1 commit intoapache:masterfrom
Closed
[SPARK-36851][SQL] Incorrect parsing of negative ANSI typed interval literals#34107Peng-Lei wants to merge 1 commit intoapache:masterfrom
Peng-Lei wants to merge 1 commit intoapache:masterfrom
Conversation
Contributor
Author
|
@MaxGekk Could you take a look ? Is this fix okay ? Thank you. |
|
Can one of the admins verify this patch? |
Member
There was a problem hiding this comment.
Let's move the test cases into interval.sql.
Also, we should add tests for negative day time intervals as well.
Member
|
I will cut RC5 after merging this one. |
1dbd17b to
68761b1
Compare
gengliangwang
approved these changes
Sep 26, 2021
Member
|
Thanks, merging to master/3.2 |
gengliangwang
pushed a commit
that referenced
this pull request
Sep 26, 2021
…literals ### What changes were proposed in this pull request? Handle incorrect parsing of negative ANSI typed interval literals [SPARK-36851](https://issues.apache.org/jira/browse/SPARK-36851) ### Why are the changes needed? Incorrect result: ``` spark-sql> select interval -'1' year; 1-0 ``` ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Add ut testcase Closes #34107 from Peng-Lei/SPARK-36851. Authored-by: PengLei <peng.8lei@gmail.com> Signed-off-by: Gengliang Wang <gengliang@apache.org> (cherry picked from commit 0fdca1f) Signed-off-by: Gengliang Wang <gengliang@apache.org>
Contributor
|
good catch! |
MaxGekk
reviewed
Sep 27, 2021
Member
MaxGekk
left a comment
There was a problem hiding this comment.
I have only the concern about the place you fixed. You changed the code related to multi units intervals parsing but I assume ANSI intervals (unit to unit) in my example in the JIRA ticket.
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?
Handle incorrect parsing of negative ANSI typed interval literals
SPARK-36851
Why are the changes needed?
Incorrect result:
Does this PR introduce any user-facing change?
No
How was this patch tested?
Add ut testcase