Return-Path: Delivered-To: apmail-hadoop-hive-dev-archive@minotaur.apache.org Received: (qmail 64228 invoked from network); 12 Apr 2010 18:30:11 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Apr 2010 18:30:11 -0000 Received: (qmail 8079 invoked by uid 500); 12 Apr 2010 18:30:11 -0000 Delivered-To: apmail-hadoop-hive-dev-archive@hadoop.apache.org Received: (qmail 8038 invoked by uid 500); 12 Apr 2010 18:30:11 -0000 Mailing-List: contact hive-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hadoop.apache.org Delivered-To: mailing list hive-dev@hadoop.apache.org Received: (qmail 8030 invoked by uid 99); 12 Apr 2010 18:30:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Apr 2010 18:30:10 +0000 X-ASF-Spam-Status: No, hits=-1269.6 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Apr 2010 18:30:09 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o3CITnan029657 for ; Mon, 12 Apr 2010 14:29:49 -0400 (EDT) Message-ID: <27990317.2781271096989766.JavaMail.jira@thor> Date: Mon, 12 Apr 2010 14:29:49 -0400 (EDT) From: "Namit Jain (JIRA)" To: hive-dev@hadoop.apache.org Subject: [jira] Commented: (HIVE-1011) GenericUDTFExplode() throws NPE when given nulls In-Reply-To: <980466609.1261611569394.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856106#action_12856106 ] Namit Jain commented on HIVE-1011: ---------------------------------- I think 3. makes most sense - I will take a look at the 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. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira