cloud-fan opened a new pull request #24325: [SPARK-27414][SQL] make it clear 
that date type is timezone independent
URL: https://github.com/apache/spark/pull/24325
 
 
   ## What changes were proposed in this pull request?
   
   In SQL standard, date type is a union of the `year`, `month` and `day` 
fields. It's timezone independent, which means it does not represent a specific 
point in the timeline.
   
   Spark SQL follows the SQL standard, this PR is to make it clear that date 
type is timezone independent
   1. improve the doc to highlight that date is timezone independent.
   2. when converting string to date,  uses the java time API that can directly 
parse a `LocalDate` from a string, instead of converting `LocalDate` to a 
`Instant` at UTC first.
   3. when converting date to string, uses the java time API that can directly 
format a `LocalDate` to a string, instead of converting `LocalDate` to a 
`Instant` at UTC first.
   
   2) and 3) should not introduce any behavior changes.
   
   ## How was this patch tested?
   
   existing tests

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