You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2021/08/16 15:31:00 UTC

[jira] [Resolved] (SPARK-36418) Use CAST in parsing of dates/timestamps with default pattern

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

Wenchen Fan resolved SPARK-36418.
---------------------------------
    Fix Version/s: 3.3.0
       Resolution: Fixed

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

> Use CAST in parsing of dates/timestamps with default pattern
> ------------------------------------------------------------
>
>                 Key: SPARK-36418
>                 URL: https://issues.apache.org/jira/browse/SPARK-36418
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.2.0
>            Reporter: Max Gekk
>            Assignee: Max Gekk
>            Priority: Major
>             Fix For: 3.3.0
>
>
> In functions, CSV/JSON datasources and other places, when the pattern is default, use CAST logic in parsing strings to dates/timestamps.
> Currently, TimestampFormatter.getFormatter() applies the default pattern *yyyy-MM-dd  HH:mm:ss* when the pattern is not set, see https://github.com/apache/spark/blob/f2492772baf1d00d802e704f84c22a9c410929e9/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/TimestampFormatter.scala#L344 . Instead of that, need to create a special formatter which invokes the cast logic.



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