-
Type:
Bug
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.1
-
Fix Version/s: None
-
Labels:
when casting incorrect date literals to DATE data type hive returns wrong values instead of NULL.
SELECT CAST('2017-02-31' AS DATE); SELECT CAST('2017-04-31' AS DATE);
Some examples below where it really can produce weird results:
select * from ( select cast('2017-07-01' as date) as dt ) as t where t.dt = '2017-06-31'; select * from ( select cast('2017-07-01' as date) as dt ) as t where t.dt = cast('2017-06-31' as date);