[ 
https://issues.apache.org/jira/browse/HIVE-12954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marta Kuczora updated HIVE-12954:
---------------------------------
    Attachment: HIVE-12954.patch

Added patch for fix the NPE exception in the str_to_map when running it with 
null string and created unit test for GenericUDFStringToMap.
The problem was that in the GenericUDFStringToMap.evaluate method it was not 
checked whether the input text is null, just called a split on the text. If the 
text was null, a NPE occurred.
A NPE can also occur if the delimiter strings are null. If either of them is 
null, it should fall back to the default delimiters.

> NPE with str_to_map on null strings
> -----------------------------------
>
>                 Key: HIVE-12954
>                 URL: https://issues.apache.org/jira/browse/HIVE-12954
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.14.0, 1.0.0
>            Reporter: Charles Pritchard
>            Assignee: Marta Kuczora
>         Attachments: HIVE-12954.patch
>
>
> Running str_to_map on a null string will return a NullPointerException.
> Workaround is to use coalesce.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to