Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
If UDF has a date format of "MM/DD/YYYY" and the function supply it the String "9/5/05" the date should not be allowed.
In most cases, parsing must be non-lenient; the given string must strictly adhere to the parsing format."
For example,
select hour('2013-05-111 10:10:1') from src limit 1;
it returns 10.
the result returned is not what is expected, it should be null;
SimpleDateFormat is lenient by default.
so, UDF should use setLenient(false) when using SimpleDateFormat for parsing given datestring except for very specific or intended case
Attachments
Issue Links
- relates to
-
HIVE-25306 Change Date/Timestamp parser from LENIENT to STRICT
- Closed