Description
The to_date method behaves differently based off the 'data type' of null passed in.
hive> select to_date(null);
FAILED: SemanticException [Error 10014]: Line 1:7 Wrong arguments 'TOK_NULL': TO_DATE() only takes STRING/TIMESTAMP/DATEWRITABLE types, got VOID
hive> select to_date(cast(null as timestamp));
OK
NULL
Time taken: 0.031 seconds, Fetched: 1 row(s)
This appears to be a regression introduced in HIVE-5731. The previous version of to_date would not check the type:
Attachments
Attachments
Issue Links
- is related to
-
HIVE-5731 Use new GenericUDF instead of basic UDF for UDFDate* classes
- Resolved