-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-29653][SQL] Fix MICROS_PER_MONTH in IntervalUtils #26321
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
Conversation
|
Test build #112912 has finished for PR 26321 at commit
|
| struct<date_part('epoch', t2.`c`):decimal(18,6)> | ||
| -- !query 106 output | ||
| 31873892788.332003 | ||
| 31897220765.004003 |
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.
I have compared to PostgreSQL output:
maxim=# select date_part('epoch', interval '1010 year 9 month 8 day 7 hour 6 minute 5 second 4 millisecond 3 microseconds');
date_part
-----------------
31897220765.004
(1 row)It seems PostgreSQL just looses the precision.
|
Test build #112913 has finished for PR 26321 at commit
|
|
Test build #112915 has finished for PR 26321 at commit
|
dongjoon-hyun
left a comment
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. Thank you all.
Merged to master.
What changes were proposed in this pull request?
MICROS_PER_MONTH = DAYS_PER_MONTH * MICROS_PER_DAY
Why are the changes needed?
fix bug
Does this PR introduce any user-facing change?
no
How was this patch tested?
add ut