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 9AA4511BCB for ; Wed, 20 Aug 2014 22:25:31 +0000 (UTC) Received: (qmail 67035 invoked by uid 500); 20 Aug 2014 22:25:31 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 66971 invoked by uid 500); 20 Aug 2014 22:25:31 -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 66958 invoked by uid 500); 20 Aug 2014 22:25:31 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 66955 invoked by uid 99); 20 Aug 2014 22:25:31 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Aug 2014 22:25:31 +0000 Date: Wed, 20 Aug 2014 22:25:30 +0000 (UTC) From: "Na Yang (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-7767) hive.optimize.union.remove does not work properly [Spark Branch] 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-7767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Na Yang updated HIVE-7767: -------------------------- Attachment: HIVE-7767.3-spark.patch Attach a new patch by removing the two test cases - union_remove_10.q.out and union_remove_22.q.out. > hive.optimize.union.remove does not work properly [Spark Branch] > ---------------------------------------------------------------- > > Key: HIVE-7767 > URL: https://issues.apache.org/jira/browse/HIVE-7767 > Project: Hive > Issue Type: Sub-task > Reporter: Na Yang > Assignee: Na Yang > Attachments: HIVE-7767.1-spark.patch, HIVE-7767.2-spark.patch, HIVE-7767.2-spark.patch, HIVE-7767.3-spark.patch > > > Turing on the hive.optimize.union.remove property generates wrong union all result. > For Example: > {noformat} > create table inputTbl1(key string, val string) stored as textfile; > load data local inpath '../../data/files/T1.txt' into table inputTbl1; > 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 > ) a; > {noformat} > when the hive.optimize.union.remove is turned on, the query result is like: > {noformat} > 1 1 > 2 1 > 3 1 > 7 1 > 8 2 > {noformat} > when the hive.optimize.union.remove is turned off, the query result is like: > {noformat} > 7 1 > 2 1 > 8 2 > 3 1 > 1 1 > 7 1 > 2 1 > 8 2 > 3 1 > 1 1 > {noformat} > The expected query result is: > {noformat} > 7 1 > 2 1 > 8 2 > 3 1 > 1 1 > 7 1 > 2 1 > 8 2 > 3 1 > 1 1 > {noformat} -- This message was sent by Atlassian JIRA (v6.2#6252)