Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 065E4184BE for ; Mon, 29 Jun 2015 14:58:05 +0000 (UTC) Received: (qmail 19509 invoked by uid 500); 29 Jun 2015 14:58:05 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 19484 invoked by uid 500); 29 Jun 2015 14:58:04 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 19473 invoked by uid 99); 29 Jun 2015 14:58:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jun 2015 14:58:04 +0000 Date: Mon, 29 Jun 2015 14:58:04 +0000 (UTC) From: "Alex Bush (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-7765) Null pointer error with UNION ALL on partitioned tables using Tez 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-7765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14605728#comment-14605728 ] Alex Bush commented on HIVE-7765: --------------------------------- Here is how to recreate this bug and use the workaround: #!/bin/bash echo "col1,col2" > /tmp/unionall_txt HIVECONF="--hiveconf hive.root.logger=INFO,console --hiveconf hive.cli.errors.ignore=true" hive -v $HIVECONF -e " drop database if exists unionall_test cascade; create database unionall_test; use unionall_test; CREATE TABLE test_a (f1 STRING, f2 STRING) PARTITIONED BY (ds STRING); CREATE TABLE test_b (f1 STRING, f2 STRING) PARTITIONED BY (ds STRING); LOAD DATA LOCAL INPATH '/tmp/unionall_txt' OVERWRITE INTO TABLE test_a PARTITION ( ds='a' ); SELECT * FROM test_a UNION ALL SELECT * FROM test_b; alter table test_b add partition ( ds='b' ); SELECT * FROM test_a UNION ALL SELECT * FROM test_b; " > Null pointer error with UNION ALL on partitioned tables using Tez > ----------------------------------------------------------------- > > Key: HIVE-7765 > URL: https://issues.apache.org/jira/browse/HIVE-7765 > Project: Hive > Issue Type: Bug > Affects Versions: 0.14.0, 0.13.1 > Environment: Tez 0.4.1, Ubuntu 12.04, Hadoop 2.4.1. > Reporter: Chris Dragga > Priority: Minor > > When executing a UNION ALL query in Tez over partitioned tables where at least one table is empty, Hive fails to execute the query, returning the message "FAILED: NullPointerException null". No stack trace accompanies this message. Removing partitioning solves this problem, as does switching to MapReduce as the execution engine. > This can be reproduced using a variant of the example tables from the "Getting Started" documentation on the Hive wiki. To create the schema, use > CREATE TABLE invites (foo INT, bar STRING) PARTITIONED BY (ds STRING); > CREATE TABLE empty_invites (foo INT, bar STRING) PARTITIONED BY (ds STRING); > Then, load invites with data (e.g., using the instructions [here|https://cwiki.apache.org/confluence/display/Hive/GettingStarted#GettingStarted-DMLOperations]) and execute the following: > SELECT * FROM invites > UNION ALL > SELECT * FROM empty_invites; -- This message was sent by Atlassian JIRA (v6.3.4#6332)