Description
spark.sql("select cast('2016-02-30 00:00:00' as date)") returns 2016-03-01, but spark.sql("select cast('2016-02-32 00:00:00' as date)") returns null. (See this notebook: https://databricks-prod-cloudfront.cloud.databricks.com/public/4027ec902e239c93eaaa8714f173bcfc/7973071962862063/3036006015533946/58107563000366/latest.html)
I suppose all invalid dates should be returned as null.
'2016-04-31', '2016-06-31', etc. also have the same issue.
Attachments
Attachments
Issue Links
- is related to
-
SPARK-12045 Use joda's DateTime to replace Calendar
- Resolved
- links to