You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean R. Owen (Jira)" <ji...@apache.org> on 2021/02/27 13:49:00 UTC

[jira] [Updated] (SPARK-34392) Invalid ID for offset-based ZoneId since Spark 3.0

     [ https://issues.apache.org/jira/browse/SPARK-34392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean R. Owen updated SPARK-34392:
---------------------------------
    Fix Version/s: 3.1.2

> Invalid ID for offset-based ZoneId since Spark 3.0
> --------------------------------------------------
>
>                 Key: SPARK-34392
>                 URL: https://issues.apache.org/jira/browse/SPARK-34392
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.0.0, 3.0.1
>            Reporter: Yuming Wang
>            Assignee: karl wang
>            Priority: Major
>             Fix For: 3.2.0, 3.1.2
>
>
> How to reproduce this issue:
> {code:sql}
> select to_utc_timestamp("2020-02-07 16:00:00", "GMT+8:00");
> {code}
> Spark 2.4:
> {noformat}
> spark-sql> select to_utc_timestamp("2020-02-07 16:00:00", "GMT+8:00");
> 2020-02-07 08:00:00
> Time taken: 0.089 seconds, Fetched 1 row(s)
> {noformat}
> Spark 3.x:
> {noformat}
> spark-sql> select to_utc_timestamp("2020-02-07 16:00:00", "GMT+8:00");
> 21/02/07 01:24:32 ERROR SparkSQLDriver: Failed in [select to_utc_timestamp("2020-02-07 16:00:00", "GMT+8:00")]
> java.time.DateTimeException: Invalid ID for offset-based ZoneId: GMT+8:00
> 	at java.time.ZoneId.ofWithPrefix(ZoneId.java:437)
> 	at java.time.ZoneId.of(ZoneId.java:407)
> 	at java.time.ZoneId.of(ZoneId.java:359)
> 	at java.time.ZoneId.of(ZoneId.java:315)
> 	at org.apache.spark.sql.catalyst.util.DateTimeUtils$.getZoneId(DateTimeUtils.scala:53)
> 	at org.apache.spark.sql.catalyst.util.DateTimeUtils$.toUTCTime(DateTimeUtils.scala:814)
> {noformat}



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