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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to