You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (JIRA)" <ji...@apache.org> on 2019/06/17 01:46:00 UTC

[jira] [Updated] (SPARK-26885) Remove yyyy/yyyy-[d]d format in DataTimeUtils for stringToTimestamp and stringToDate

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

Dongjoon Hyun updated SPARK-26885:
----------------------------------
    Affects Version/s:     (was: 2.4.0)
                       3.0.0

> Remove yyyy/yyyy-[d]d format in DataTimeUtils for stringToTimestamp and stringToDate
> ------------------------------------------------------------------------------------
>
>                 Key: SPARK-26885
>                 URL: https://issues.apache.org/jira/browse/SPARK-26885
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Darcy Shen
>            Priority: Minor
>
> stringToTimestamp, stringToDate support yyyy, as a result:
> select year("1912") => 1912
> select month("1912") => 1
> select hour("1912") => 0
>  
> In Presto or Hive, 
> select year("1912") => null
> select month("1912") => null
> select hour("1912") => null
>  
> It is not a good idea to support yyyy for a Date/DateTime.
>  



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