You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2020/05/30 21:23:00 UTC
[jira] [Commented] (SPARK-31874) Use `FastDateFormat` as the legacy
fractional formatter
[ https://issues.apache.org/jira/browse/SPARK-31874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17120368#comment-17120368 ]
Apache Spark commented on SPARK-31874:
--------------------------------------
User 'MaxGekk' has created a pull request for this issue:
https://github.com/apache/spark/pull/28678
> Use `FastDateFormat` as the legacy fractional formatter
> -------------------------------------------------------
>
> Key: SPARK-31874
> URL: https://issues.apache.org/jira/browse/SPARK-31874
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.1.0
> Reporter: Maxim Gekk
> Priority: Major
>
> By default {{HiveResult}}.{{hiveResultString}} retrieves timestamps values as instances of {{java.sql.Timestamp}}, and uses the legacy parser {{SimpleDateFormat}} to convert the timestamps to strings. After the fix [#28024|https://github.com/apache/spark/pull/28024], the fractional formatter and its companion - legacy formatter {{SimpleDateFormat}} are created per every value. By switching from {{LegacySimpleTimestampFormatter}} to {{LegacyFastTimestampFormatter}}, we can utilize the internal cache of {{FastDateFormat}}, and avoid parsing the default pattern {{yyyy-MM-dd HH:mm:ss}}.
--
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