MaxGekk opened a new pull request #26327: [WIP][SPARK-29669][SQL] Refactor 
IntervalUtils.fromDayTimeString()
URL: https://github.com/apache/spark/pull/26327
 
 
   ### What changes were proposed in this pull request?
   In the PR, I propose to refactor code related to the 
`IntervalUtils.fromDayTimeString()` method by:
   - making it more generic and independent from the requested range of 
interval units
   - introducing enumeration for unit names. This should allow to avoid typos 
in unit names.
   - extracting unit value properties from `fromDayTimeString()` like min/max 
values and a function for converting parsed values to microseconds using exact 
math methods.
   
   **This PR includes code from** https://github.com/apache/spark/pull/26313
   
   ### Why are the changes needed?
   - To improve maintainability of `fromDayTimeString()` and related code in 
`IntervalUtils`
   - Avoid adhoc code
   
   ### Does this PR introduce any user-facing change?
   No
   
   ### How was this patch tested?
   By existing test in `IntervalUtilsSuite` and `DDLParserSuite`.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to