You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2019/03/20 12:29:00 UTC

[jira] [Resolved] (SPARK-27199) Replace TimeZone by ZoneId in TimestampFormatter API

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

Hyukjin Kwon resolved SPARK-27199.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 3.0.0

Issue resolved by pull request 24141
[https://github.com/apache/spark/pull/24141]

> Replace TimeZone by ZoneId in TimestampFormatter API
> ----------------------------------------------------
>
>                 Key: SPARK-27199
>                 URL: https://issues.apache.org/jira/browse/SPARK-27199
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.4.0
>            Reporter: Maxim Gekk
>            Assignee: Maxim Gekk
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> Internally, TimestampFormatter implementations use ZoneId but not TimeZone which comes via API. Conversion from TimeZone to ZoneId is not for free. Actually, TimeZone is converted to String, and the String and parsed to ZoneId. The conversion to String can be eliminated if TimestampFormatter would accept ZoneId. And also, TimeZone is converted from String in some cases (JSON options). So, in bad case String -> TimeZone -> String -> ZoneId -> ZoneOffset. The ticket aims to use ZoneId in TimestampFormatter API. We could require ZoneOffset but it is not convenient in most cases because conversion ZoneId to ZoneOffset requires Instant. 



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