You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yuming Wang (Jira)" <ji...@apache.org> on 2021/02/07 08:32:00 UTC
[jira] [Created] (SPARK-34392) Invalid ID for offset-based ZoneId
since Spark 3.0
Yuming Wang created SPARK-34392:
-----------------------------------
Summary: 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.1, 3.0.0
Reporter: Yuming Wang
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