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/07/10 17:09:00 UTC

[jira] [Comment Edited] (SPARK-28015) Invalid date formats should throw an exception

    [ https://issues.apache.org/jira/browse/SPARK-28015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16882275#comment-16882275 ] 

Dongjoon Hyun edited comment on SPARK-28015 at 7/10/19 5:08 PM:
----------------------------------------------------------------

I added `2.0~2.3` as `Affected Versions`, too.
{code}
scala> sql("SELECT CAST('1999 08 01' AS DATE)").show
+------------------------+
|CAST(1999 08 01 AS DATE)|
+------------------------+
|              1999-01-01|
+------------------------+
{code}


was (Author: dongjoon):
I added `2.0~2.3`, too.
{code}
scala> sql("SELECT CAST('1999 08 01' AS DATE)").show
+------------------------+
|CAST(1999 08 01 AS DATE)|
+------------------------+
|              1999-01-01|
+------------------------+
{code}

> Invalid date formats should throw an exception
> ----------------------------------------------
>
>                 Key: SPARK-28015
>                 URL: https://issues.apache.org/jira/browse/SPARK-28015
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.0.2, 2.1.3, 2.2.3, 2.3.3, 2.4.3
>            Reporter: Yuming Wang
>            Priority: Major
>
> Invalid date formats should throw an exception:
> {code:sql}
> SELECT date '1999 08 01'
> 1999-01-01
> {code}
> Supported date formats:
> https://github.com/apache/spark/blob/ab8710b57916a129fcb89464209361120d224535/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala#L365-L374



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