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/02/17 15:05:44 UTC

[GitHub] MaxGekk opened a new pull request #23815: [SPARK-26908][SQL] Fix DateTimeUtils.toMillis/millisToDays

MaxGekk opened a new pull request #23815: [SPARK-26908][SQL] Fix DateTimeUtils.toMillis/millisToDays
URL: https://github.com/apache/spark/pull/23815
 
 
   ## What changes were proposed in this pull request?
   
   The `DateTimeUtils.toMillis` can produce inaccurate result for some negative values (timestamps before epoch). The error can be around 1ms. In the PR, I propose to use `Math.floorDiv` in casting microseconds to milliseconds, and milliseconds to days since epoch.
   
   ## How was this patch tested?
   
   Added new test to `DateTimeUtilsSuite`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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