Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AA2FC101F7 for ; Fri, 26 Dec 2014 22:51:13 +0000 (UTC) Received: (qmail 51415 invoked by uid 500); 26 Dec 2014 22:51:13 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 51340 invoked by uid 500); 26 Dec 2014 22:51:13 -0000 Mailing-List: contact dev-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 dev@hive.apache.org Received: (qmail 51329 invoked by uid 500); 26 Dec 2014 22:51:13 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 51326 invoked by uid 99); 26 Dec 2014 22:51:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Dec 2014 22:51:13 +0000 Date: Fri, 26 Dec 2014 22:51:13 +0000 (UTC) From: "Pengcheng Xiong (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-9217) UnionProcessor misses results for multi-insert when hive.optimize.union.remove=true 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-9217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14259238#comment-14259238 ] Pengcheng Xiong commented on HIVE-9217: --------------------------------------- [~jpullokkaran] and [~hagleitn], the test failure is not related. Could you please take a look? Thanks. The main reason for the bug is that, when we add subq outside union, we will have UNION-SEL-SEL-FS |-SEL-FS However, the current version only checks if UNION operator has more than 1 children. The solution is simply to check every operator after UNION. > UnionProcessor misses results for multi-insert when hive.optimize.union.remove=true > ----------------------------------------------------------------------------------- > > Key: HIVE-9217 > URL: https://issues.apache.org/jira/browse/HIVE-9217 > Project: Hive > Issue Type: Bug > Reporter: Pengcheng Xiong > Assignee: Pengcheng Xiong > Attachments: HIVE-9217.01.patch > > > To reproduce: > In union_remove_6.q, just change > FROM ( > SELECT key, count(1) as values from inputTbl1 group by key > UNION ALL > SELECT key, count(1) as values from inputTbl1 group by key > ) a > insert overwrite table outputTbl1 select * > insert overwrite table outputTbl2 select *; > to > FROM ( > select * from( > SELECT key, count(1) as values from inputTbl1 group by key > UNION ALL > SELECT key, count(1) as values from inputTbl1 group by key > )subq > ) a > insert overwrite table outputTbl1 select * > insert overwrite table outputTbl2 select *; > select * from outputtbl2 will output nothing -- This message was sent by Atlassian JIRA (v6.3.4#6332)