hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marta Kuczora (JIRA)" <>
Subject [jira] [Updated] (HIVE-12954) NPE with str_to_map on null strings
Date Wed, 27 Jul 2016 14:30:20 GMT


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

View raw message