spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darcy Shen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SPARK-26885) Remove yyyy format in DataTimeUtils for stringToTimestamp and stringToDate
Date Fri, 15 Feb 2019 07:31:00 GMT
Darcy Shen created SPARK-26885:
----------------------------------

             Summary: Remove yyyy format in DataTimeUtils for stringToTimestamp and stringToDate
                 Key: SPARK-26885
                 URL: https://issues.apache.org/jira/browse/SPARK-26885
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 2.4.0
            Reporter: Darcy Shen


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


Mime
View raw message