You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2019/03/06 14:28:00 UTC
[jira] [Resolved] (SPARK-27031) Avoid double formatting in
timestampToString
[ https://issues.apache.org/jira/browse/SPARK-27031?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Owen resolved SPARK-27031.
-------------------------------
Resolution: Fixed
Fix Version/s: 3.0.0
Issue resolved by pull request 23936
[https://github.com/apache/spark/pull/23936]
> Avoid double formatting in timestampToString
> --------------------------------------------
>
> Key: SPARK-27031
> URL: https://issues.apache.org/jira/browse/SPARK-27031
> 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
>
>
> The method DateTimeUtils.timestampToString performs converting of its input to string twice:
> - First time by converting microseconds to java.sql.Timestamp and toString: https://github.com/apache/spark/blob/8e5f9995cad409799f3646b3d03761a771ea1664/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala#L103
> - Second time by using provided formatter: https://github.com/apache/spark/blob/8e5f9995cad409799f3646b3d03761a771ea1664/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala#L104
> This could be avoided by using specialised TimestampFormatter.
--
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