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

Maxim Gekk commented on SPARK-28015:
------------------------------------

I don't think the stringToDate() function should throw an exception in that 
case. Its return type is Option[SQLDate], so, it should just return None.

[~iskenderunlu804] Are you working on the issue? Please, let us know, if not I 
will prepare a PR.

> 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.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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to