-
Notifications
You must be signed in to change notification settings - Fork 28k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-36022][SQL] Respect interval fields in extract #33247
Conversation
Kubernetes integration test starting |
Kubernetes integration test status success |
Test build #140757 has finished for PR 33247 at commit
|
@sarutak The failure in GA is related to the changes, it seems:
Could you fix it. |
@MaxGekk Thank you for letting me know. I'll look into it. |
Kubernetes integration test starting |
Kubernetes integration test status success |
Test build #140770 has finished for PR 33247 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM. Merging to master/3.2.
Thank you, @sarutak .
### What changes were proposed in this pull request? This PR fixes an issue about `extract`. `Extract` should process only existing fields of interval types. For example: ``` spark-sql> SELECT EXTRACT(MONTH FROM INTERVAL '2021-11' YEAR TO MONTH); 11 spark-sql> SELECT EXTRACT(MONTH FROM INTERVAL '2021' YEAR); 0 ``` The last command should fail as the month field doesn't present in INTERVAL YEAR. ### Why are the changes needed? Bug fix. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? New tests. Closes #33247 from sarutak/fix-extract-interval. Authored-by: Kousuke Saruta <sarutak@oss.nttdata.com> Signed-off-by: Max Gekk <max.gekk@gmail.com> (cherry picked from commit 39002cb) Signed-off-by: Max Gekk <max.gekk@gmail.com>
What changes were proposed in this pull request?
This PR fixes an issue about
extract
.Extract
should process only existing fields of interval types. For example:The last command should fail as the month field doesn't present in INTERVAL YEAR.
Why are the changes needed?
Bug fix.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
New tests.