[
https://issues.apache.org/jira/browse/HIVE-12502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aaron Tokhy updated HIVE-12502:
-------------------------------
Attachment: HIVE-12502.1.patch
> to_date UDF cannot accept NULLs of VOID type
> --------------------------------------------
>
> Key: HIVE-12502
> URL: https://issues.apache.org/jira/browse/HIVE-12502
> Project: Hive
> Issue Type: Bug
> Components: UDF
> Affects Versions: 1.0.0
> Reporter: Aaron Tokhy
> Assignee: Jason Dere
> Priority: Trivial
> Attachments: HIVE-12502.1.patch
>
>
> 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:
> https://github.com/apache/hive/commit/09b6553214d6db5ec7049b88bbe8ff640a7fef72#diff-204f5588c0767cf372a5ca7e3fb964afL56
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)