Maxim Gekk created SPARK-27199: ---------------------------------- Summary: 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
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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org