You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (JIRA)" <ji...@apache.org> on 2019/03/29 01:53:00 UTC
[jira] [Assigned] (SPARK-27252) Make current_date() independent
from time zones
[ https://issues.apache.org/jira/browse/SPARK-27252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wenchen Fan reassigned SPARK-27252:
-----------------------------------
Assignee: Maxim Gekk
> Make current_date() independent from time zones
> -----------------------------------------------
>
> Key: SPARK-27252
> URL: https://issues.apache.org/jira/browse/SPARK-27252
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 2.4.0
> Reporter: Maxim Gekk
> Assignee: Maxim Gekk
> Priority: Minor
>
> The CurrentDate expression produces a result of DateType which is by definition number of days since epoch (in UTC time zone). Current implementation shifts the number of days according to session time zone `spark.sql.session.timeZone`. Result of shifting cannot be considered as number of days since epoch in UTC time zone, and cannot have type `DateType`. There are many reasons that makes the result invalid. For example:
> # zone offset depends on an instant in UTC timezone, and zone offset of `spark.sql.session.timeZone` in shifted date may have different value.
> # Result of shifting cannot be considered as number of days since epoch anymore.
> The ticket aims to make `current_date` independent from time zone, and to return the current date in UTC time zone.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org