You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Maxim Gekk (Jira)" <ji...@apache.org> on 2020/06/05 06:46:00 UTC

[jira] [Created] (SPARK-31910) Enable Java 8 time API in Thrift server

Maxim Gekk created SPARK-31910:
----------------------------------

             Summary: Enable Java 8 time API in Thrift server
                 Key: SPARK-31910
                 URL: https://issues.apache.org/jira/browse/SPARK-31910
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 3.1.0
            Reporter: Maxim Gekk


Switch to Java 8 time API by turning on the SQL config spark.sql.datetime.java8API.enabled to address the following issues:
# Date and timestamp string literals are parsed by using Java 8 time API and Spark's session time zone. Before the changes, date/timestamp values were collected as legacy types `java.sql.Date`/`java.sql.Timestamp`, and the value of such types didn't respect the config `spark.sql.session.timeZone`. To have consistent view, users had to keep JVM time zone and Spark's session time zone in sync.
# After the changes, formatting of date values doesn't depend on JVM time zone.
# While returning dates/timestamps of Java 8 type, we can avoid dates/timestamps rebasing from Proleptic Gregorian calendar to the hybrid calendar (Julian + Gregorian), and the issues related to calendar switching.
# Properly handle negative years (BCE).
# Consistent conversion of date/timestamp strings to/from internal Catalyst types in both direction to and from Spark.



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