[ https://issues.apache.org/jira/browse/SPARK-28015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dongjoon Hyun updated SPARK-28015: ---------------------------------- Fix Version/s: 2.4.4 > Check stringToDate() consumes entire input for the yyyy and yyyy-[m]m formats > ----------------------------------------------------------------------------- > > Key: SPARK-28015 > URL: https://issues.apache.org/jira/browse/SPARK-28015 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 1.6.3, 2.0.2, 2.1.3, 2.2.3, 2.3.3, 2.4.3 > Reporter: Yuming Wang > Assignee: Maxim Gekk > Priority: Major > Labels: correctness > Fix For: 2.4.4, 3.0.0 > > > 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 > Since Spark 1.6.3 ~ 2.4.3, the behavior is the same. > {code} > spark-sql> SELECT CAST('1999 08 01' AS DATE); > 1999-01-01 > {code} > Hive returns NULL. -- 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