hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Yang (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HIVE-1011) GenericUDTFExplode() throws NPE when given nulls
Date Thu, 08 Apr 2010 23:16:36 GMT

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

Paul Yang updated HIVE-1011:
----------------------------

    Attachment: HIVE-1011.1.patch

> GenericUDTFExplode() throws NPE when given nulls
> ------------------------------------------------
>
>                 Key: HIVE-1011
>                 URL: https://issues.apache.org/jira/browse/HIVE-1011
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Paul Yang
>            Assignee: Paul Yang
>         Attachments: HIVE-1011.1.patch
>
>
> When explode() is called on rows where the array column is null, a null pointer exception
is thrown.
> For example consider having  a table named test with the following rows
> {code}
> key     value
> 1       [1,2,3]
> 2       null 
> {code}
> Then running the query
> {code}
> SELECT explode(value) AS myCol FROM test;
> or
> SELECT * FROM test LATERAL VIEW explode(value) myTab AS myCol;
> {code}
> will throw a null pointer exception when explode() gets the null value from the 2nd row.
> Possible options are:
> 1. Treat null values as an error and make the user fix null values in data
> 2. explode(null) generates a null output value.
> 3. explode(null) generates no output values
> #2 means that explode(null) and explode(array(null)) will behave identically. Because
of that, I think #3 makes the most sense.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message