Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.6.3, 2.0.2, 2.1.3, 2.2.3, 2.3.3, 2.4.3
Description
Invalid date formats should throw an exception:
SELECT date '1999 08 01' 1999-01-01
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
Since Spark 1.6.3 ~ 2.4.3, the behavior is the same.
spark-sql> SELECT CAST('1999 08 01' AS DATE);
1999-01-01
Hive returns NULL.
Attachments
Issue Links
- links to