hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Tokhy (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-12502) to_date UDF cannot accept NULLs of VOID type
Date Tue, 24 Nov 2015 01:21:11 GMT
Aaron Tokhy created HIVE-12502:
----------------------------------

             Summary: 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


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)

Mime
View raw message