[ 
https://issues.apache.org/jira/browse/HIVE-21721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16837968#comment-16837968
 ] 

Gopal V commented on HIVE-21721:
--------------------------------

This should already be fixed in hive-master in 3.x/4.x branch to upcast strings 
to timestamp.

> nvl function fail with NullPointerException if the two paramtype are different
> ------------------------------------------------------------------------------
>
>                 Key: HIVE-21721
>                 URL: https://issues.apache.org/jira/browse/HIVE-21721
>             Project: Hive
>          Issue Type: Bug
>          Components: Parser
>    Affects Versions: 1.1.0
>            Reporter: philipse
>            Assignee: philipse
>            Priority: Blocker
>              Labels: pull-request-available
>         Attachments: image-2019-05-11-10-41-05-168.png
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Hi all
> when i user nvl and case when fucntion, it behaviors like the following.which 
> is weird to me, and makes me headache everytime. i need to check where the 
> nullpointexception throws out when it hadppens,So can the reasons more 
> friendly to users,
> !image-2019-05-11-10-41-05-168.png!
> {code:java}
> select nvl(cast('2019-05-10 11:11:11,111' as timestamp),'2019-05-10 
> 11:11:11,111');
> Error: Error while compiling statement: FAILED: NullPointerException null 
> (state=42000,code=40000)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to