Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
1.2.1
-
None
Description
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);
Attachments
Issue Links
- is related to
-
HIVE-25306 Change Date/Timestamp parser from LENIENT to STRICT
- Closed
- links to