Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2B4B5200B2D for ; Thu, 16 Jun 2016 20:44:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2A0B8160A51; Thu, 16 Jun 2016 18:44:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7912F160A61 for ; Thu, 16 Jun 2016 20:44:06 +0200 (CEST) Received: (qmail 3761 invoked by uid 500); 16 Jun 2016 18:44:05 -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 3579 invoked by uid 99); 16 Jun 2016 18:44:05 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jun 2016 18:44:05 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 5B1C62C1F64 for ; Thu, 16 Jun 2016 18:44:05 +0000 (UTC) Date: Thu, 16 Jun 2016 18:44:05 +0000 (UTC) From: "Jesus Camacho Rodriguez (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-14006) Hive query with UNION ALL fails with ArrayIndexOutOfBoundsException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 16 Jun 2016 18:44:07 -0000 [ https://issues.apache.org/jira/browse/HIVE-14006?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesus Camacho Rodriguez updated HIVE-14006: ------------------------------------------- Fix Version/s: (was: 2.2.0) > Hive query with UNION ALL fails with ArrayIndexOutOfBoundsException > ------------------------------------------------------------------- > > Key: HIVE-14006 > URL: https://issues.apache.org/jira/browse/HIVE-14006 > Project: Hive > Issue Type: Bug > Components: Hive > Affects Versions: 2.0.0 > Reporter: Naveen Gangam > Assignee: Naveen Gangam > Fix For: 2.1.0 > > Attachments: HIVE-14006.1.patch, HIVE-14006.patch > > > set hive.cbo.enable=false; > DROP VIEW IF EXISTS a_view; > DROP TABLE IF EXISTS table_a1; > DROP TABLE IF EXISTS table_a2; > DROP TABLE IF EXISTS table_b1; > DROP TABLE IF EXISTS table_b2; > CREATE TABLE table_a1 > (composite_key STRING); > CREATE TABLE table_a2 > (composite_key STRING); > CREATE TABLE table_b1 > (composite_key STRING, col1 STRING); > CREATE TABLE table_b2 > (composite_key STRING); > CREATE VIEW a_view AS > SELECT > substring(a1.composite_key, 1, locate('|',a1.composite_key) - 1) AS autoname, > NULL AS col1 > FROM table_a1 a1 > FULL OUTER JOIN table_a2 a2 > ON a1.composite_key = a2.composite_key > UNION ALL > SELECT > substring(b1.composite_key, 1, locate('|',b1.composite_key) - 1) AS autoname, > b1.col1 AS col1 > FROM table_b1 b1 > FULL OUTER JOIN table_b2 b2 > ON b1.composite_key = b2.composite_key; > INSERT INTO TABLE table_b1 > SELECT * FROM ( > SELECT 'something|awful', 'col1' > )s ; > SELECT autoname > FROM a_view > WHERE autoname='something'; > fails with > Diagnostic Messages for this Task: > Error: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row {"_col0":"something"} > at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.map(ExecMapper.java:179) > at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54) > at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453) > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343) > at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:415) > at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1693) > at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158) > Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row {"_col0":"something"} > at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:507) > at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.map(ExecMapper.java:170) > ... 8 more > Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 > at org.apache.hadoop.hive.ql.exec.UnionOperator.processOp(UnionOperator.java:134) > at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:815) > at org.apache.hadoop.hive.ql.exec.TableScanOperator.processOp(TableScanOperator.java:95) > at org.apache.hadoop.hive.ql.exec.MapOperator$MapOpCtx.forward(MapOperator.java:157) > at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:497) > The same query succeeds when {{hive.ppd.remove.duplicatefilters=false}} with or without CBO on. It also succeeds with just CBO on. -- This message was sent by Atlassian JIRA (v6.3.4#6332)