Maxim Gekk created SPARK-27212:
----------------------------------

             Summary: Eliminate TimeZone to ZoneId conversion in 
stringToTimestamp
                 Key: SPARK-27212
                 URL: https://issues.apache.org/jira/browse/SPARK-27212
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 2.4.0
            Reporter: Maxim Gekk


The stringToTimestamp method of DateTimeUtils (and stringToDate as well) can be 
called per each row. And the method converts TimeZone to ZoneId each time. The 
operation is relatively expensive because it does intermediate conversion to a 
string: 
http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/f940e7a48b72/src/share/classes/java/util/TimeZone.java#l547

The conversion is unnecessary, and could be avoid. The ticket aims to replace 
signature of stringToTimestamp to require ZoneId as a parameter.



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

Reply via email to