[ https://issues.apache.org/jira/browse/HIVE-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carl Steinbach updated HIVE-1011: --------------------------------- Fix Version/s: 0.6.0 > 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 > Fix For: 0.6.0 > > 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.