MaxGekk opened a new pull request #28216: [SPARK-31445][SQL][2.4] Avoid 
floating-point operations in `millisToDays`
URL: https://github.com/apache/spark/pull/28216
 
 
   ### What changes were proposed in this pull request?
   Replacing a floating-point division and Math.floor of Double value by 
`Math.floorDiv` for Long in `DateTimeUtils.millisToDays()`.
   
   ### Why are the changes needed?
   The changes improve performance, in particular, it speeds up the conversion 
from java.sql.Date as the ported `DateTimeBenchmark` in 
https://github.com/MaxGekk/spark/pull/27 and comparisons in 
https://github.com/apache/spark/pull/28205 show.
   
   ### Does this PR introduce any user-facing change?
   No
   
   ### How was this patch tested?
   By existing test suite `DateTimeUtilsSuite`, `DateFunctionsSuite` and 
`DateExpressionsSuite`.

----------------------------------------------------------------
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