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/03/22 21:00:03 UTC

[GitHub] [spark] MaxGekk opened a new pull request #24185: [SPARK-27252][SQL] Make current_date() independent from time zones

MaxGekk opened a new pull request #24185: [SPARK-27252][SQL] Make current_date() independent from time zones
URL: https://github.com/apache/spark/pull/24185
 
 
   ## What changes were proposed in this pull request?
   
   This makes the `CurrentDate` expression and `current_date` function independent from time zone settings. New result is number of days since epoch in `UTC` time zone. Previously, Spark shifted the current date (in `UTC` time zone) according the session time zone which violets definition of `DateType` - number of days since epoch (which is an absolute point in time, midnight of Jan 1 1970 in UTC time). 
   
   The changes makes `CurrentDate` consistent to `CurrentTimestamp` which is independent from time zone too. 
   
   ## How was this patch tested?
   
   The changes were tested by existing test suites like `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:
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