You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/08/25 16:52:00 UTC
[jira] [Assigned] (SPARK-36590) Special timestamp_ntz value should
be converted in the session tz
[ https://issues.apache.org/jira/browse/SPARK-36590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-36590:
------------------------------------
Assignee: Max Gekk (was: Apache Spark)
> Special timestamp_ntz value should be converted in the session tz
> -----------------------------------------------------------------
>
> Key: SPARK-36590
> URL: https://issues.apache.org/jira/browse/SPARK-36590
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 3.2.0
> Reporter: Max Gekk
> Assignee: Max Gekk
> Priority: Major
>
> Currently, special timestamp_ntz strings like *today*, *tomorrow*, *yesterday* are converted to timestamp_ntz values using JVM timezone which is incorrect. The conversion should base on the session time zone. The examples below demonstrate the problem:
> {code:sql}
> $ export TZ="Europe/Amsterdam"
> $ ./bin/spark-sql -S
> spark-sql> select timestamp_ntz'now';
> 2021-08-25 18:12:36.233
> spark-sql> set spark.sql.session.timeZone=America/Los_Angeles;
> spark.sql.session.timeZone America/Los_Angeles
> spark-sql> select timestamp_ntz'now';
> 2021-08-25 18:14:40.547
> {code}
> The special timestamp_ntz strings are converted in "Europe/Amsterdam" tz, and the converter doesn't respect Spark settings.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org