MaxGekk opened a new pull request #25329: [WIP][SPARK-28596][SQL] Use Java 8 
time API in the date_trunc() function
URL: https://github.com/apache/spark/pull/25329
 
 
   ## What changes were proposed in this pull request?
   
   In the PR, I propose to re-implement `DateTimeUtils`.`truncTimestamp` and 
use Java 8 time API to adjust timestamps to `YEAR`, `MONTH`, `QUARTER`, `WEEK`, 
`DAY`, `HOUR`, `MINUTE` and `SECOND`. This simplifies implementation and will 
allow to easily support other level of truncation, see 
https://issues.apache.org/jira/browse/SPARK-28017. 
   
   Also I pass `ZoneId` instances to the function instead of `TimeZone` 
instances to avoid unnecessary conversions.
   
   ## How was this patch tested?
   
   By existing test suites. I am going to re-run the `DateTime` benchmark.

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