Minwoo Kim created HIVE-4594:
--------------------------------
Summary: UDF should use setLenient(false) when using
SimpleDateFormat for parsing given datestring
Key: HIVE-4594
URL: https://issues.apache.org/jira/browse/HIVE-4594
Project: Hive
Issue Type: Bug
Components: UDF
Reporter: Minwoo Kim
Priority: Minor
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 all cases, parsing must be non-lenient; the given string must strictly
adhere to the parsing format."
For example,
{code}
select hour('2013-05-111 10:10:1') from src limit 1;
{code}
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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira