Return-Path: X-Original-To: apmail-hive-commits-archive@www.apache.org Delivered-To: apmail-hive-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AF83510F6D for ; Thu, 1 Aug 2013 05:47:43 +0000 (UTC) Received: (qmail 15193 invoked by uid 500); 1 Aug 2013 05:47:43 -0000 Delivered-To: apmail-hive-commits-archive@hive.apache.org Received: (qmail 15168 invoked by uid 500); 1 Aug 2013 05:47:43 -0000 Mailing-List: contact commits-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hive.apache.org Delivered-To: mailing list commits@hive.apache.org Received: (qmail 15160 invoked by uid 99); 1 Aug 2013 05:47:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Aug 2013 05:47:42 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Aug 2013 05:47:41 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 25B142388AA9; Thu, 1 Aug 2013 05:46:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1509082 [6/6] - in /hive/trunk: common/src/java/org/apache/hadoop/hive/conf/ conf/ ql/src/java/org/apache/hadoop/hive/ql/exec/ ql/src/java/org/apache/hadoop/hive/ql/optimizer/ ql/src/java/org/apache/hadoop/hive/ql/optimizer/correlation/ ql... Date: Thu, 01 Aug 2013 05:46:55 -0000 To: commits@hive.apache.org From: gunther@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130801054658.25B142388AA9@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: hive/trunk/ql/src/test/results/clientpositive/union34.q.out URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/union34.q.out?rev=1509082&r1=1509081&r2=1509082&view=diff ============================================================================== --- hive/trunk/ql/src/test/results/clientpositive/union34.q.out (original) +++ hive/trunk/ql/src/test/results/clientpositive/union34.q.out Thu Aug 1 05:46:53 2013 @@ -1,22 +1,6 @@ -PREHOOK: query: -- HIVE-4342 --- Maponly union(UNION-13) is merged into non-maponly union(UNION-15) --- In this case, task for UNION-13 should be removed from top-task and merged into task for UNION-15 --- TS[2]-SEL[3]-RS[5]-JOIN[6]-SEL[7]-UNION[15]-SEL[16]-RS[17]-EX[18]-FS[19] --- TS[0]-SEL[1]-RS[4]-JOIN[6] --- TS[8]-SEL[9]-UNION[13]-SEL[14]-UNION[15] --- TS[11]-SEL[12]-UNION[13] - -create table src10_1 (key string, value string) +PREHOOK: query: create table src10_1 (key string, value string) PREHOOK: type: CREATETABLE -POSTHOOK: query: -- HIVE-4342 --- Maponly union(UNION-13) is merged into non-maponly union(UNION-15) --- In this case, task for UNION-13 should be removed from top-task and merged into task for UNION-15 --- TS[2]-SEL[3]-RS[5]-JOIN[6]-SEL[7]-UNION[15]-SEL[16]-RS[17]-EX[18]-FS[19] --- TS[0]-SEL[1]-RS[4]-JOIN[6] --- TS[8]-SEL[9]-UNION[13]-SEL[14]-UNION[15] --- TS[11]-SEL[12]-UNION[13] - -create table src10_1 (key string, value string) +POSTHOOK: query: create table src10_1 (key string, value string) POSTHOOK: type: CREATETABLE POSTHOOK: Output: default@src10_1 PREHOOK: query: create table src10_2 (key string, value string) @@ -64,14 +48,18 @@ POSTHOOK: Lineage: src10_3.key SIMPLE [( POSTHOOK: Lineage: src10_3.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: src10_4.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: src10_4.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] -PREHOOK: query: explain +PREHOOK: query: -- When we convert the Join of sub1 and sub0 into a MapJoin, +-- we can use a single MR job to evaluate this entire query. +explain SELECT * FROM ( SELECT sub1.key,sub1.value FROM (SELECT * FROM src10_1) sub1 JOIN (SELECT * FROM src10_2) sub0 ON (sub0.key = sub1.key) UNION ALL SELECT key,value FROM (SELECT * FROM (SELECT * FROM src10_3) sub2 UNION ALL SELECT * FROM src10_4 ) alias0 ) alias1 order by key PREHOOK: type: QUERY -POSTHOOK: query: explain +POSTHOOK: query: -- When we convert the Join of sub1 and sub0 into a MapJoin, +-- we can use a single MR job to evaluate this entire query. +explain SELECT * FROM ( SELECT sub1.key,sub1.value FROM (SELECT * FROM src10_1) sub1 JOIN (SELECT * FROM src10_2) sub0 ON (sub0.key = sub1.key) UNION ALL @@ -91,8 +79,7 @@ ABSTRACT SYNTAX TREE: STAGE DEPENDENCIES: Stage-7 is a root stage - Stage-6 depends on stages: Stage-7 - Stage-2 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-7 Stage-0 is a root stage STAGE PLANS: @@ -123,7 +110,7 @@ STAGE PLANS: 1 [Column[_col0]] Position of Big Table: 1 - Stage: Stage-6 + Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: null-subquery1:alias1-subquery1:sub0:src10_2 @@ -153,39 +140,25 @@ STAGE PLANS: expr: _col1 type: string outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-2 - Map Reduce - Alias -> Map Operator Tree: -#### A masked pattern was here #### - TableScan - Union - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - outputColumnNames: _col0, _col1 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - tag: -1 - value expressions: - expr: _col0 - type: string - expr: _col1 - type: string + Union + Select Operator + expressions: + expr: _col0 + type: string + expr: _col1 + type: string + outputColumnNames: _col0, _col1 + Reduce Output Operator + key expressions: + expr: _col0 + type: string + sort order: + + tag: -1 + value expressions: + expr: _col0 + type: string + expr: _col1 + type: string null-subquery2:alias1-subquery2-subquery1:alias0-subquery1:sub2:src10_3 TableScan alias: src10_3 @@ -260,6 +233,8 @@ STAGE PLANS: type: string expr: _col1 type: string + Local Work: + Map Reduce Local Work Reduce Operator Tree: Extract File Output Operator @@ -334,14 +309,22 @@ POSTHOOK: Lineage: src10_4.value SIMPLE 98 val_98 98 val_98 98 val_98 -PREHOOK: query: explain +PREHOOK: query: -- When we do not convert the Join of sub1 and sub0 into a MapJoin, +-- we need to use two MR jobs to evaluate this query. +-- The first job is for the Join of sub1 and sub2. The second job +-- is for the UNION ALL and ORDER BY. +explain SELECT * FROM ( SELECT sub1.key,sub1.value FROM (SELECT * FROM src10_1) sub1 JOIN (SELECT * FROM src10_2) sub0 ON (sub0.key = sub1.key) UNION ALL SELECT key,value FROM (SELECT * FROM (SELECT * FROM src10_3) sub2 UNION ALL SELECT * FROM src10_4 ) alias0 ) alias1 order by key PREHOOK: type: QUERY -POSTHOOK: query: explain +POSTHOOK: query: -- When we do not convert the Join of sub1 and sub0 into a MapJoin, +-- we need to use two MR jobs to evaluate this query. +-- The first job is for the Join of sub1 and sub2. The second job +-- is for the UNION ALL and ORDER BY. +explain SELECT * FROM ( SELECT sub1.key,sub1.value FROM (SELECT * FROM src10_1) sub1 JOIN (SELECT * FROM src10_2) sub0 ON (sub0.key = sub1.key) UNION ALL