-
Notifications
You must be signed in to change notification settings - Fork 29k
[WIP][SPARK-29669][SQL] Refactor IntervalUtils.fromDayTimeString() #26327
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
| } | ||
|
|
||
| // Parses a string with nanoseconds, truncates the result and returns microseconds | ||
| private def parseNanos(nanosStr: String, isNegative: Boolean): Long = { |
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.
This code has been borrowed from #26313
| Long.MinValue / DateTimeUtils.MICROS_PER_SECOND, | ||
| Long.MaxValue / DateTimeUtils.MICROS_PER_SECOND) * DateTimeUtils.MICROS_PER_SECOND | ||
| } | ||
| def parseNanos(nanosStr: String): Long = { |
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.
The changes from #26313
|
@dongjoon-hyun @srowen @cloud-fan @HyukjinKwon Could you take a look at this, please. |
|
Test build #112960 has finished for PR 26327 at commit
|
|
The build #26327 (comment) fails on:
|
…om-daytime-string # Conflicts: # sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/IntervalUtils.scala
|
Test build #113044 has finished for PR 26327 at commit
|
|
Test build #113052 has finished for PR 26327 at commit
|
What changes were proposed in this pull request?
In the PR, I propose to refactor code related to the
IntervalUtils.fromDayTimeString()method by:fromDayTimeString()like min/max values and a function for converting parsed values to microseconds using exact math methods.This PR includes code from #26313
Why are the changes needed?
fromDayTimeString()and related code inIntervalUtilsDoes this PR introduce any user-facing change?
No
How was this patch tested?
By existing test in
IntervalUtilsSuiteandDDLParserSuite.