You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/10/30 19:32:40 UTC

[GitHub] [spark] MaxGekk opened a new pull request #26327: [WIP][SPARK-29669][SQL] Refactor IntervalUtils.fromDayTimeString()

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org