hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gunt...@apache.org
Subject svn commit: r1509082 [3/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 GMT
Modified: hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer1.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer1.q.out?rev=1509082&r1=1509081&r2=1509082&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer1.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer1.q.out Thu Aug  1 05:46:53 2013
@@ -349,199 +349,6 @@ POSTHOOK: Input: default@src1
 PREHOOK: query: -- Enable hive.auto.convert.join.
 -- Correlation Optimizer will detect that the join will be converted to a Map-join,
 -- so it will not try to optimize this query.
-EXPLAIN
-SELECT SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt))
-FROM (SELECT x.key AS key, count(1) AS cnt
-      FROM src1 x JOIN src y ON (x.key = y.key)
-      GROUP BY x.key) tmp
-PREHOOK: type: QUERY
-POSTHOOK: query: -- Enable hive.auto.convert.join.
--- Correlation Optimizer will detect that the join will be converted to a Map-join,
--- so it will not try to optimize this query.
-EXPLAIN
-SELECT SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt))
-FROM (SELECT x.key AS key, count(1) AS cnt
-      FROM src1 x JOIN src y ON (x.key = y.key)
-      GROUP BY x.key) tmp
-POSTHOOK: type: QUERY
-ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src1) x) (TOK_TABREF (TOK_TABNAME src) y) (= (. (TOK_TABLE_OR_COL x) key) (. (TOK_TABLE_OR_COL y) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) key) key) (TOK_SELEXPR (TOK_FUNCTION count 1) cnt)) (TOK_GROUPBY (. (TOK_TABLE_OR_COL x) key)))) tmp)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION SUM (TOK_FUNCTION HASH (. (TOK_TABLE_OR_COL tmp) key)))) (TOK_SELEXPR (TOK_FUNCTION SUM (TOK_FUNCTION HASH (. (TOK_TABLE_OR_COL tmp) cnt)))))))
-
-STAGE DEPENDENCIES:
-  Stage-6 is a root stage
-  Stage-5 depends on stages: Stage-6
-  Stage-2 depends on stages: Stage-5
-  Stage-3 depends on stages: Stage-2
-  Stage-0 is a root stage
-
-STAGE PLANS:
-  Stage: Stage-6
-    Map Reduce Local Work
-      Alias -> Map Local Tables:
-        tmp:x 
-          Fetch Operator
-            limit: -1
-      Alias -> Map Local Operator Tree:
-        tmp:x 
-          TableScan
-            alias: x
-            HashTable Sink Operator
-              condition expressions:
-                0 {key}
-                1 
-              handleSkewJoin: false
-              keys:
-                0 [Column[key]]
-                1 [Column[key]]
-              Position of Big Table: 1
-
-  Stage: Stage-5
-    Map Reduce
-      Alias -> Map Operator Tree:
-        tmp:y 
-          TableScan
-            alias: y
-            Map Join Operator
-              condition map:
-                   Inner Join 0 to 1
-              condition expressions:
-                0 {key}
-                1 
-              handleSkewJoin: false
-              keys:
-                0 [Column[key]]
-                1 [Column[key]]
-              outputColumnNames: _col0
-              Position of Big Table: 1
-              Select Operator
-                expressions:
-                      expr: _col0
-                      type: string
-                outputColumnNames: _col0
-                Group By Operator
-                  aggregations:
-                        expr: count(1)
-                  bucketGroup: false
-                  keys:
-                        expr: _col0
-                        type: string
-                  mode: hash
-                  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 ####
-            Reduce Output Operator
-              key expressions:
-                    expr: _col0
-                    type: string
-              sort order: +
-              Map-reduce partition columns:
-                    expr: _col0
-                    type: string
-              tag: -1
-              value expressions:
-                    expr: _col1
-                    type: bigint
-      Reduce Operator Tree:
-        Group By Operator
-          aggregations:
-                expr: count(VALUE._col0)
-          bucketGroup: false
-          keys:
-                expr: KEY._col0
-                type: string
-          mode: mergepartial
-          outputColumnNames: _col0, _col1
-          Select Operator
-            expressions:
-                  expr: _col0
-                  type: string
-                  expr: _col1
-                  type: bigint
-            outputColumnNames: _col0, _col1
-            Group By Operator
-              aggregations:
-                    expr: sum(hash(_col0))
-                    expr: sum(hash(_col1))
-              bucketGroup: false
-              mode: hash
-              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
-
-  Stage: Stage-3
-    Map Reduce
-      Alias -> Map Operator Tree:
-#### A masked pattern was here ####
-            Reduce Output Operator
-              sort order: 
-              tag: -1
-              value expressions:
-                    expr: _col0
-                    type: bigint
-                    expr: _col1
-                    type: bigint
-      Reduce Operator Tree:
-        Group By Operator
-          aggregations:
-                expr: sum(VALUE._col0)
-                expr: sum(VALUE._col1)
-          bucketGroup: false
-          mode: mergepartial
-          outputColumnNames: _col0, _col1
-          Select Operator
-            expressions:
-                  expr: _col0
-                  type: bigint
-                  expr: _col1
-                  type: bigint
-            outputColumnNames: _col0, _col1
-            File Output Operator
-              compressed: false
-              GlobalTableId: 0
-              table:
-                  input format: org.apache.hadoop.mapred.TextInputFormat
-                  output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-
-  Stage: Stage-0
-    Fetch Operator
-      limit: -1
-
-
-PREHOOK: query: SELECT SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt))
-FROM (SELECT x.key AS key, count(1) AS cnt
-      FROM src1 x JOIN src y ON (x.key = y.key)
-      GROUP BY x.key) tmp
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Input: default@src1
-#### A masked pattern was here ####
-POSTHOOK: query: SELECT SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt))
-FROM (SELECT x.key AS key, count(1) AS cnt
-      FROM src1 x JOIN src y ON (x.key = y.key)
-      GROUP BY x.key) tmp
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Input: default@src1
-#### A masked pattern was here ####
-652447	37
-PREHOOK: query: -- Enable hive.auto.convert.join.
--- Correlation Optimizer will detect that the join will be converted to a Map-join,
--- so it will not try to optimize this query.
 -- We should generate 1 MR job for subquery tmp.
 EXPLAIN
 SELECT SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt))
@@ -564,8 +371,8 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-6 is a root stage
-  Stage-5 depends on stages: Stage-6
-  Stage-3 depends on stages: Stage-5
+  Stage-2 depends on stages: Stage-6
+  Stage-3 depends on stages: Stage-2
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -589,7 +396,7 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 1
 
-  Stage: Stage-5
+  Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
         tmp:y 

Modified: hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer3.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer3.q.out?rev=1509082&r1=1509081&r2=1509082&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer3.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer3.q.out Thu Aug  1 05:46:53 2013
@@ -598,11 +598,8 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-9 is a root stage
-  Stage-7 depends on stages: Stage-9
-  Stage-2 depends on stages: Stage-7, Stage-8
+  Stage-2 depends on stages: Stage-9
   Stage-3 depends on stages: Stage-2
-  Stage-10 is a root stage
-  Stage-8 depends on stages: Stage-10
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -612,6 +609,9 @@ STAGE PLANS:
         tmp:b:x 
           Fetch Operator
             limit: -1
+        tmp:d:x 
+          Fetch Operator
+            limit: -1
       Alias -> Map Local Operator Tree:
         tmp:b:x 
           TableScan
@@ -625,8 +625,20 @@ STAGE PLANS:
                 0 [Column[key]]
                 1 [Column[key]]
               Position of Big Table: 1
+        tmp:d:x 
+          TableScan
+            alias: x
+            HashTable Sink Operator
+              condition expressions:
+                0 {key} {value}
+                1 
+              handleSkewJoin: false
+              keys:
+                0 [Column[key]]
+                1 [Column[key]]
+              Position of Big Table: 1
 
-  Stage: Stage-7
+  Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
         tmp:b:y 
@@ -658,44 +670,54 @@ STAGE PLANS:
                         type: string
                   mode: hash
                   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
+                  Reduce Output Operator
+                    key expressions:
+                          expr: _col0
+                          type: string
+                    sort order: +
+                    Map-reduce partition columns:
+                          expr: _col0
+                          type: string
+                    tag: 0
+                    value expressions:
+                          expr: _col1
+                          type: bigint
+        tmp:d:y 
+          TableScan
+            alias: y
+            Map Join Operator
+              condition map:
+                   Inner Join 0 to 1
+              condition expressions:
+                0 {key} {value}
+                1 
+              handleSkewJoin: false
+              keys:
+                0 [Column[key]]
+                1 [Column[key]]
+              outputColumnNames: _col0, _col1
+              Position of Big Table: 1
+              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: +
+                  Map-reduce partition columns:
+                        expr: _col0
+                        type: string
+                  tag: 1
+                  value expressions:
+                        expr: _col1
+                        type: string
       Local Work:
         Map Reduce Local Work
-
-  Stage: Stage-2
-    Map Reduce
-      Alias -> Map Operator Tree:
-        $INTNAME 
-            Reduce Output Operator
-              key expressions:
-                    expr: _col0
-                    type: string
-              sort order: +
-              Map-reduce partition columns:
-                    expr: _col0
-                    type: string
-              tag: 0
-              value expressions:
-                    expr: _col1
-                    type: bigint
-        $INTNAME1 
-            Reduce Output Operator
-              key expressions:
-                    expr: _col0
-                    type: string
-              sort order: +
-              Map-reduce partition columns:
-                    expr: _col0
-                    type: string
-              tag: 1
-              value expressions:
-                    expr: _col1
-                    type: string
       Reduce Operator Tree:
         Demux Operator
           Group By Operator
@@ -818,60 +840,6 @@ STAGE PLANS:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
 
-  Stage: Stage-10
-    Map Reduce Local Work
-      Alias -> Map Local Tables:
-        tmp:d:x 
-          Fetch Operator
-            limit: -1
-      Alias -> Map Local Operator Tree:
-        tmp:d:x 
-          TableScan
-            alias: x
-            HashTable Sink Operator
-              condition expressions:
-                0 {key} {value}
-                1 
-              handleSkewJoin: false
-              keys:
-                0 [Column[key]]
-                1 [Column[key]]
-              Position of Big Table: 1
-
-  Stage: Stage-8
-    Map Reduce
-      Alias -> Map Operator Tree:
-        tmp:d:y 
-          TableScan
-            alias: y
-            Map Join Operator
-              condition map:
-                   Inner Join 0 to 1
-              condition expressions:
-                0 {key} {value}
-                1 
-              handleSkewJoin: false
-              keys:
-                0 [Column[key]]
-                1 [Column[key]]
-              outputColumnNames: _col0, _col1
-              Position of Big Table: 1
-              Select Operator
-                expressions:
-                      expr: _col0
-                      type: string
-                      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-0
     Fetch Operator
       limit: -1
@@ -1482,11 +1450,8 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-9 is a root stage
-  Stage-7 depends on stages: Stage-9
-  Stage-2 depends on stages: Stage-7, Stage-8
+  Stage-2 depends on stages: Stage-9
   Stage-3 depends on stages: Stage-2
-  Stage-10 is a root stage
-  Stage-8 depends on stages: Stage-10
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -1496,6 +1461,9 @@ STAGE PLANS:
         tmp:b:x 
           Fetch Operator
             limit: -1
+        tmp:d:x 
+          Fetch Operator
+            limit: -1
       Alias -> Map Local Operator Tree:
         tmp:b:x 
           TableScan
@@ -1509,8 +1477,20 @@ STAGE PLANS:
                 0 [Column[key]]
                 1 [Column[key]]
               Position of Big Table: 1
+        tmp:d:x 
+          TableScan
+            alias: x
+            HashTable Sink Operator
+              condition expressions:
+                0 {key}
+                1 
+              handleSkewJoin: false
+              keys:
+                0 [Column[key]]
+                1 [Column[key]]
+              Position of Big Table: 1
 
-  Stage: Stage-7
+  Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
         tmp:b:y 
@@ -1535,44 +1515,61 @@ 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
+                Reduce Output Operator
+                  key expressions:
+                        expr: _col0
+                        type: string
+                  sort order: +
+                  Map-reduce partition columns:
+                        expr: _col0
+                        type: string
+                  tag: 0
+                  value expressions:
+                        expr: _col1
+                        type: string
+        tmp:d:y 
+          TableScan
+            alias: y
+            Map Join Operator
+              condition map:
+                   Inner Join 0 to 1
+              condition expressions:
+                0 {key}
+                1 
+              handleSkewJoin: false
+              keys:
+                0 [Column[key]]
+                1 [Column[key]]
+              outputColumnNames: _col0
+              Position of Big Table: 1
+              Select Operator
+                expressions:
+                      expr: _col0
+                      type: string
+                outputColumnNames: _col0
+                Group By Operator
+                  aggregations:
+                        expr: count(1)
+                  bucketGroup: false
+                  keys:
+                        expr: _col0
+                        type: string
+                  mode: hash
+                  outputColumnNames: _col0, _col1
+                  Reduce Output Operator
+                    key expressions:
+                          expr: _col0
+                          type: string
+                    sort order: +
+                    Map-reduce partition columns:
+                          expr: _col0
+                          type: string
+                    tag: 1
+                    value expressions:
+                          expr: _col1
+                          type: bigint
       Local Work:
         Map Reduce Local Work
-
-  Stage: Stage-2
-    Map Reduce
-      Alias -> Map Operator Tree:
-        $INTNAME 
-            Reduce Output Operator
-              key expressions:
-                    expr: _col0
-                    type: string
-              sort order: +
-              Map-reduce partition columns:
-                    expr: _col0
-                    type: string
-              tag: 0
-              value expressions:
-                    expr: _col1
-                    type: string
-        $INTNAME1 
-            Reduce Output Operator
-              key expressions:
-                    expr: _col0
-                    type: string
-              sort order: +
-              Map-reduce partition columns:
-                    expr: _col0
-                    type: string
-              tag: 1
-              value expressions:
-                    expr: _col1
-                    type: bigint
       Reduce Operator Tree:
         Demux Operator
           Mux Operator
@@ -1695,67 +1692,6 @@ STAGE PLANS:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
 
-  Stage: Stage-10
-    Map Reduce Local Work
-      Alias -> Map Local Tables:
-        tmp:d:x 
-          Fetch Operator
-            limit: -1
-      Alias -> Map Local Operator Tree:
-        tmp:d:x 
-          TableScan
-            alias: x
-            HashTable Sink Operator
-              condition expressions:
-                0 {key}
-                1 
-              handleSkewJoin: false
-              keys:
-                0 [Column[key]]
-                1 [Column[key]]
-              Position of Big Table: 1
-
-  Stage: Stage-8
-    Map Reduce
-      Alias -> Map Operator Tree:
-        tmp:d:y 
-          TableScan
-            alias: y
-            Map Join Operator
-              condition map:
-                   Inner Join 0 to 1
-              condition expressions:
-                0 {key}
-                1 
-              handleSkewJoin: false
-              keys:
-                0 [Column[key]]
-                1 [Column[key]]
-              outputColumnNames: _col0
-              Position of Big Table: 1
-              Select Operator
-                expressions:
-                      expr: _col0
-                      type: string
-                outputColumnNames: _col0
-                Group By Operator
-                  aggregations:
-                        expr: count(1)
-                  bucketGroup: false
-                  keys:
-                        expr: _col0
-                        type: string
-                  mode: hash
-                  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-0
     Fetch Operator
       limit: -1

Modified: hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer4.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer4.q.out?rev=1509082&r1=1509081&r2=1509082&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer4.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer4.q.out Thu Aug  1 05:46:53 2013
@@ -428,8 +428,8 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-7 is a root stage
-  Stage-6 depends on stages: Stage-7
-  Stage-3 depends on stages: Stage-6
+  Stage-2 depends on stages: Stage-7
+  Stage-3 depends on stages: Stage-2
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -472,7 +472,7 @@ STAGE PLANS:
                 2 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-6
+  Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
         tmp:x 

Modified: hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer6.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer6.q.out?rev=1509082&r1=1509081&r2=1509082&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer6.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer6.q.out Thu Aug  1 05:46:53 2013
@@ -661,21 +661,33 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-9 is a root stage
-  Stage-7 depends on stages: Stage-9
-  Stage-2 depends on stages: Stage-7, Stage-8
+  Stage-2 depends on stages: Stage-9
   Stage-3 depends on stages: Stage-2
-  Stage-10 is a root stage
-  Stage-8 depends on stages: Stage-10
   Stage-0 is a root stage
 
 STAGE PLANS:
   Stage: Stage-9
     Map Reduce Local Work
       Alias -> Map Local Tables:
+        xx:y 
+          Fetch Operator
+            limit: -1
         yy:y 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
+        xx:y 
+          TableScan
+            alias: y
+            HashTable Sink Operator
+              condition expressions:
+                0 {key}
+                1 
+              handleSkewJoin: false
+              keys:
+                0 [Column[key]]
+                1 [Column[key]]
+              Position of Big Table: 0
         yy:y 
           TableScan
             alias: y
@@ -689,9 +701,50 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-7
+  Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
+        xx:x 
+          TableScan
+            alias: x
+            Map Join Operator
+              condition map:
+                   Inner Join 0 to 1
+              condition expressions:
+                0 {key}
+                1 
+              handleSkewJoin: false
+              keys:
+                0 [Column[key]]
+                1 [Column[key]]
+              outputColumnNames: _col0
+              Position of Big Table: 0
+              Select Operator
+                expressions:
+                      expr: _col0
+                      type: string
+                outputColumnNames: _col0
+                Group By Operator
+                  aggregations:
+                        expr: count(1)
+                  bucketGroup: false
+                  keys:
+                        expr: _col0
+                        type: string
+                  mode: hash
+                  outputColumnNames: _col0, _col1
+                  Reduce Output Operator
+                    key expressions:
+                          expr: _col0
+                          type: string
+                    sort order: +
+                    Map-reduce partition columns:
+                          expr: _col0
+                          type: string
+                    tag: 0
+                    value expressions:
+                          expr: _col1
+                          type: bigint
         yy:x 
           TableScan
             alias: x
@@ -721,44 +774,20 @@ STAGE PLANS:
                         type: string
                   mode: hash
                   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
+                  Reduce Output Operator
+                    key expressions:
+                          expr: _col0
+                          type: string
+                    sort order: +
+                    Map-reduce partition columns:
+                          expr: _col0
+                          type: string
+                    tag: 1
+                    value expressions:
+                          expr: _col1
+                          type: bigint
       Local Work:
         Map Reduce Local Work
-
-  Stage: Stage-2
-    Map Reduce
-      Alias -> Map Operator Tree:
-        $INTNAME 
-            Reduce Output Operator
-              key expressions:
-                    expr: _col0
-                    type: string
-              sort order: +
-              Map-reduce partition columns:
-                    expr: _col0
-                    type: string
-              tag: 1
-              value expressions:
-                    expr: _col1
-                    type: bigint
-        $INTNAME1 
-            Reduce Output Operator
-              key expressions:
-                    expr: _col0
-                    type: string
-              sort order: +
-              Map-reduce partition columns:
-                    expr: _col0
-                    type: string
-              tag: 0
-              value expressions:
-                    expr: _col1
-                    type: bigint
       Reduce Operator Tree:
         Demux Operator
           Group By Operator
@@ -880,67 +909,6 @@ STAGE PLANS:
                 input format: org.apache.hadoop.mapred.TextInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
 
-  Stage: Stage-10
-    Map Reduce Local Work
-      Alias -> Map Local Tables:
-        xx:y 
-          Fetch Operator
-            limit: -1
-      Alias -> Map Local Operator Tree:
-        xx:y 
-          TableScan
-            alias: y
-            HashTable Sink Operator
-              condition expressions:
-                0 {key}
-                1 
-              handleSkewJoin: false
-              keys:
-                0 [Column[key]]
-                1 [Column[key]]
-              Position of Big Table: 0
-
-  Stage: Stage-8
-    Map Reduce
-      Alias -> Map Operator Tree:
-        xx:x 
-          TableScan
-            alias: x
-            Map Join Operator
-              condition map:
-                   Inner Join 0 to 1
-              condition expressions:
-                0 {key}
-                1 
-              handleSkewJoin: false
-              keys:
-                0 [Column[key]]
-                1 [Column[key]]
-              outputColumnNames: _col0
-              Position of Big Table: 0
-              Select Operator
-                expressions:
-                      expr: _col0
-                      type: string
-                outputColumnNames: _col0
-                Group By Operator
-                  aggregations:
-                        expr: count(1)
-                  bucketGroup: false
-                  keys:
-                        expr: _col0
-                        type: string
-                  mode: hash
-                  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-0
     Fetch Operator
       limit: -1
@@ -5122,16 +5090,15 @@ ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src1) x) (TOK_TABREF (TOK_TABNAME src1) y) (= (. (TOK_TABLE_OR_COL x) key) (. (TOK_TABLE_OR_COL y) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) key) key) (TOK_SELEXPR (TOK_FUNCTION count 1) cnt)) (TOK_GROUPBY (. (TOK_TABLE_OR_COL x) key)))) xx) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) x) (TOK_TABREF (TOK_TABNAME src) y) (= (. (TOK_TABLE_OR_COL x) key) (. (TOK_TABLE_OR_COL y) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) key) key) (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) value) value) (TOK_SELEXPR (TOK_FUNCTION count 1) cnt)) (TOK_GROUPBY (. (TOK_TABLE_OR_COL x) key) (. (TOK_TABLE_OR_COL x) value)))) yy) (= (. (TOK_TABLE_OR_COL xx) key) (. (TOK_TABLE_OR_COL yy) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_
 SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL xx) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL xx) cnt)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL yy) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL yy) value)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL yy) cnt))) (TOK_ORDERBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL xx) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL xx) cnt)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL yy) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL yy) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL yy) cnt)))))
 
 STAGE DEPENDENCIES:
-  Stage-10 is a root stage
-  Stage-8 depends on stages: Stage-10
-  Stage-3 depends on stages: Stage-8, Stage-9
-  Stage-4 depends on stages: Stage-3
   Stage-11 is a root stage
-  Stage-9 depends on stages: Stage-11
+  Stage-2 depends on stages: Stage-11
+  Stage-10 depends on stages: Stage-2
+  Stage-3 depends on stages: Stage-10
+  Stage-4 depends on stages: Stage-3
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-10
+  Stage: Stage-11
     Map Reduce Local Work
       Alias -> Map Local Tables:
         yy:y 
@@ -5151,7 +5118,7 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-8
+  Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
         yy:x 
@@ -5233,6 +5200,26 @@ STAGE PLANS:
                   input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
 
+  Stage: Stage-10
+    Map Reduce Local Work
+      Alias -> Map Local Tables:
+        xx:y 
+          Fetch Operator
+            limit: -1
+      Alias -> Map Local Operator Tree:
+        xx:y 
+          TableScan
+            alias: y
+            HashTable Sink Operator
+              condition expressions:
+                0 {key}
+                1 
+              handleSkewJoin: false
+              keys:
+                0 [Column[key]]
+                1 [Column[key]]
+              Position of Big Table: 0
+
   Stage: Stage-3
     Map Reduce
       Alias -> Map Operator Tree:
@@ -5253,19 +5240,49 @@ STAGE PLANS:
                     type: string
                     expr: _col2
                     type: bigint
-        $INTNAME1 
-            Reduce Output Operator
-              key expressions:
-                    expr: _col0
-                    type: string
-              sort order: +
-              Map-reduce partition columns:
-                    expr: _col0
-                    type: string
-              tag: 0
-              value expressions:
-                    expr: _col1
-                    type: bigint
+        xx:x 
+          TableScan
+            alias: x
+            Map Join Operator
+              condition map:
+                   Inner Join 0 to 1
+              condition expressions:
+                0 {key}
+                1 
+              handleSkewJoin: false
+              keys:
+                0 [Column[key]]
+                1 [Column[key]]
+              outputColumnNames: _col0
+              Position of Big Table: 0
+              Select Operator
+                expressions:
+                      expr: _col0
+                      type: string
+                outputColumnNames: _col0
+                Group By Operator
+                  aggregations:
+                        expr: count(1)
+                  bucketGroup: false
+                  keys:
+                        expr: _col0
+                        type: string
+                  mode: hash
+                  outputColumnNames: _col0, _col1
+                  Reduce Output Operator
+                    key expressions:
+                          expr: _col0
+                          type: string
+                    sort order: +
+                    Map-reduce partition columns:
+                          expr: _col0
+                          type: string
+                    tag: 0
+                    value expressions:
+                          expr: _col1
+                          type: bigint
+      Local Work:
+        Map Reduce Local Work
       Reduce Operator Tree:
         Demux Operator
           Group By Operator
@@ -5379,67 +5396,6 @@ STAGE PLANS:
                 input format: org.apache.hadoop.mapred.TextInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
 
-  Stage: Stage-11
-    Map Reduce Local Work
-      Alias -> Map Local Tables:
-        xx:y 
-          Fetch Operator
-            limit: -1
-      Alias -> Map Local Operator Tree:
-        xx:y 
-          TableScan
-            alias: y
-            HashTable Sink Operator
-              condition expressions:
-                0 {key}
-                1 
-              handleSkewJoin: false
-              keys:
-                0 [Column[key]]
-                1 [Column[key]]
-              Position of Big Table: 0
-
-  Stage: Stage-9
-    Map Reduce
-      Alias -> Map Operator Tree:
-        xx:x 
-          TableScan
-            alias: x
-            Map Join Operator
-              condition map:
-                   Inner Join 0 to 1
-              condition expressions:
-                0 {key}
-                1 
-              handleSkewJoin: false
-              keys:
-                0 [Column[key]]
-                1 [Column[key]]
-              outputColumnNames: _col0
-              Position of Big Table: 0
-              Select Operator
-                expressions:
-                      expr: _col0
-                      type: string
-                outputColumnNames: _col0
-                Group By Operator
-                  aggregations:
-                        expr: count(1)
-                  bucketGroup: false
-                  keys:
-                        expr: _col0
-                        type: string
-                  mode: hash
-                  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-0
     Fetch Operator
       limit: -1

Modified: hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer7.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer7.q.out?rev=1509082&r1=1509081&r2=1509082&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer7.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/correlationoptimizer7.q.out Thu Aug  1 05:46:53 2013
@@ -19,11 +19,9 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-9 is a root stage
-  Stage-7 depends on stages: Stage-9
-  Stage-4 depends on stages: Stage-7
+  Stage-4 depends on stages: Stage-9
   Stage-8 depends on stages: Stage-4
-  Stage-6 depends on stages: Stage-8
-  Stage-2 depends on stages: Stage-6
+  Stage-2 depends on stages: Stage-8
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -47,7 +45,7 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-7
+  Stage: Stage-4
     Map Reduce
       Alias -> Map Operator Tree:
         xx:x 
@@ -79,31 +77,20 @@ STAGE PLANS:
                         type: string
                   mode: hash
                   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
+                  Reduce Output Operator
+                    key expressions:
+                          expr: _col0
+                          type: string
+                    sort order: +
+                    Map-reduce partition columns:
+                          expr: _col0
+                          type: string
+                    tag: -1
+                    value expressions:
+                          expr: _col1
+                          type: bigint
       Local Work:
         Map Reduce Local Work
-
-  Stage: Stage-4
-    Map Reduce
-      Alias -> Map Operator Tree:
-#### A masked pattern was here ####
-            Reduce Output Operator
-              key expressions:
-                    expr: _col0
-                    type: string
-              sort order: +
-              Map-reduce partition columns:
-                    expr: _col0
-                    type: string
-              tag: -1
-              value expressions:
-                    expr: _col1
-                    type: bigint
       Reduce Operator Tree:
         Group By Operator
           aggregations:
@@ -148,7 +135,7 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-6
+  Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
         $INTNAME 
@@ -175,40 +162,29 @@ STAGE PLANS:
                       expr: _col3
                       type: string
                 outputColumnNames: _col0, _col1, _col2, _col3
-                File Output Operator
-                  compressed: false
-                  GlobalTableId: 0
-                  table:
-                      input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                Reduce Output Operator
+                  key expressions:
+                        expr: _col0
+                        type: string
+                        expr: _col1
+                        type: bigint
+                        expr: _col2
+                        type: string
+                        expr: _col3
+                        type: string
+                  sort order: ++++
+                  tag: -1
+                  value expressions:
+                        expr: _col0
+                        type: string
+                        expr: _col1
+                        type: bigint
+                        expr: _col2
+                        type: string
+                        expr: _col3
+                        type: string
       Local Work:
         Map Reduce Local Work
-
-  Stage: Stage-2
-    Map Reduce
-      Alias -> Map Operator Tree:
-#### A masked pattern was here ####
-            Reduce Output Operator
-              key expressions:
-                    expr: _col0
-                    type: string
-                    expr: _col1
-                    type: bigint
-                    expr: _col2
-                    type: string
-                    expr: _col3
-                    type: string
-              sort order: ++++
-              tag: -1
-              value expressions:
-                    expr: _col0
-                    type: string
-                    expr: _col1
-                    type: bigint
-                    expr: _col2
-                    type: string
-                    expr: _col3
-                    type: string
       Reduce Operator Tree:
         Extract
           File Output Operator
@@ -279,8 +255,7 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-6 is a root stage
-  Stage-5 depends on stages: Stage-6
-  Stage-1 depends on stages: Stage-5
+  Stage-1 depends on stages: Stage-6
   Stage-2 depends on stages: Stage-1
   Stage-0 is a root stage
 
@@ -305,7 +280,7 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-5
+  Stage: Stage-1
     Map Reduce
       Alias -> Map Operator Tree:
         xx:x 
@@ -337,31 +312,18 @@ STAGE PLANS:
                         type: string
                   mode: hash
                   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-1
-    Map Reduce
-      Alias -> Map Operator Tree:
-        $INTNAME 
-            Reduce Output Operator
-              key expressions:
-                    expr: _col0
-                    type: string
-              sort order: +
-              Map-reduce partition columns:
-                    expr: _col0
-                    type: string
-              tag: 0
-              value expressions:
-                    expr: _col1
-                    type: bigint
+                  Reduce Output Operator
+                    key expressions:
+                          expr: _col0
+                          type: string
+                    sort order: +
+                    Map-reduce partition columns:
+                          expr: _col0
+                          type: string
+                    tag: 0
+                    value expressions:
+                          expr: _col1
+                          type: bigint
         yy 
           TableScan
             alias: yy
@@ -379,6 +341,8 @@ STAGE PLANS:
                     type: string
                     expr: value
                     type: string
+      Local Work:
+        Map Reduce Local Work
       Reduce Operator Tree:
         Demux Operator
           Group By Operator
@@ -527,13 +491,9 @@ POSTHOOK: Input: default@src1
 PREHOOK: query: -- Without correlation optimizer, we will have 3 MR jobs.
 -- The first one is a MapJoin and Aggregation (in the Reduce Phase).
 -- The second one is another MapJoin. The third one is for ordering.
--- With the correlation optimizer, right now, we still have
--- 3 MR jobs. The first one is a MapJoin and the map-side aggregation (a map-only job).
--- The second one have the reduce-side aggregation and the second join.
--- The third one is for ordering.
--- Although we have turned on hive.optimize.mapjoin.mapreduce, that optimizer
--- can not handle the case that the MR job (the one which a map-only job will be merged in)
--- has multiple inputs. We should improve that optimizer.
+-- With the correlation optimizer, right now, we have
+-- 2 MR jobs. The first one will evaluate the sub-query xx and the join of
+-- xx and yy. The second one will do the ORDER BY.
 EXPLAIN
 SELECT xx.key, xx.cnt, yy.key, yy.value
 FROM (SELECT x.key AS key, count(1) AS cnt
@@ -545,13 +505,9 @@ PREHOOK: type: QUERY
 POSTHOOK: query: -- Without correlation optimizer, we will have 3 MR jobs.
 -- The first one is a MapJoin and Aggregation (in the Reduce Phase).
 -- The second one is another MapJoin. The third one is for ordering.
--- With the correlation optimizer, right now, we still have
--- 3 MR jobs. The first one is a MapJoin and the map-side aggregation (a map-only job).
--- The second one have the reduce-side aggregation and the second join.
--- The third one is for ordering.
--- Although we have turned on hive.optimize.mapjoin.mapreduce, that optimizer
--- can not handle the case that the MR job (the one which a map-only job will be merged in)
--- has multiple inputs. We should improve that optimizer.
+-- With the correlation optimizer, right now, we have
+-- 2 MR jobs. The first one will evaluate the sub-query xx and the join of
+-- xx and yy. The second one will do the ORDER BY.
 EXPLAIN
 SELECT xx.key, xx.cnt, yy.key, yy.value
 FROM (SELECT x.key AS key, count(1) AS cnt
@@ -565,9 +521,9 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-9 is a root stage
-  Stage-7 depends on stages: Stage-9
-  Stage-8 depends on stages: Stage-7
-  Stage-6 depends on stages: Stage-8
+  Stage-4 depends on stages: Stage-9
+  Stage-8 depends on stages: Stage-4
+  Stage-2 depends on stages: Stage-8
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -591,7 +547,7 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-7
+  Stage: Stage-4
     Map Reduce
       Alias -> Map Operator Tree:
         xx:x 
@@ -681,7 +637,7 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-6
+  Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
         $INTNAME 
@@ -801,8 +757,7 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-6 is a root stage
-  Stage-5 depends on stages: Stage-6
-  Stage-1 depends on stages: Stage-5
+  Stage-1 depends on stages: Stage-6
   Stage-2 depends on stages: Stage-1
   Stage-0 is a root stage
 
@@ -827,7 +782,7 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-5
+  Stage: Stage-1
     Map Reduce
       Alias -> Map Operator Tree:
         xx:x 
@@ -859,31 +814,18 @@ STAGE PLANS:
                         type: string
                   mode: hash
                   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-1
-    Map Reduce
-      Alias -> Map Operator Tree:
-        $INTNAME 
-            Reduce Output Operator
-              key expressions:
-                    expr: _col0
-                    type: string
-              sort order: +
-              Map-reduce partition columns:
-                    expr: _col0
-                    type: string
-              tag: 0
-              value expressions:
-                    expr: _col1
-                    type: bigint
+                  Reduce Output Operator
+                    key expressions:
+                          expr: _col0
+                          type: string
+                    sort order: +
+                    Map-reduce partition columns:
+                          expr: _col0
+                          type: string
+                    tag: 0
+                    value expressions:
+                          expr: _col1
+                          type: bigint
         yy 
           TableScan
             alias: yy
@@ -901,6 +843,8 @@ STAGE PLANS:
                     type: string
                     expr: value
                     type: string
+      Local Work:
+        Map Reduce Local Work
       Reduce Operator Tree:
         Demux Operator
           Group By Operator

Modified: hive/trunk/ql/src/test/results/clientpositive/join28.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join28.q.out?rev=1509082&r1=1509081&r2=1509082&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join28.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join28.q.out Thu Aug  1 05:46:53 2013
@@ -28,8 +28,8 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-8 is a root stage
-  Stage-7 depends on stages: Stage-8
-  Stage-0 depends on stages: Stage-7
+  Stage-6 depends on stages: Stage-8
+  Stage-0 depends on stages: Stage-6
   Stage-3 depends on stages: Stage-0
 
 STAGE PLANS:
@@ -68,7 +68,7 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-7
+  Stage: Stage-6
     Map Reduce
       Alias -> Map Operator Tree:
         subq:y 

Modified: hive/trunk/ql/src/test/results/clientpositive/join32.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join32.q.out?rev=1509082&r1=1509081&r2=1509082&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join32.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join32.q.out Thu Aug  1 05:46:53 2013
@@ -24,8 +24,8 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-7 is a root stage
-  Stage-6 depends on stages: Stage-7
-  Stage-0 depends on stages: Stage-6
+  Stage-5 depends on stages: Stage-7
+  Stage-0 depends on stages: Stage-5
   Stage-2 depends on stages: Stage-0
 
 STAGE PLANS:
@@ -66,7 +66,7 @@ STAGE PLANS:
                 1 [Column[value]]
               Position of Big Table: 0
 
-  Stage: Stage-6
+  Stage: Stage-5
     Map Reduce
       Alias -> Map Operator Tree:
         y 
@@ -219,6 +219,52 @@ STAGE PLANS:
               serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
               name: default.src1
             name: default.src1
+#### A masked pattern was here ####
+          Partition
+            base file name: hr=11
+            input format: org.apache.hadoop.mapred.TextInputFormat
+            output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+            partition values:
+              ds 2008-04-08
+              hr 11
+            properties:
+              bucket_count -1
+              columns key,value
+              columns.types string:string
+#### A masked pattern was here ####
+              name default.srcpart
+              numFiles 1
+              numRows 0
+              partition_columns ds/hr
+              rawDataSize 0
+              serialization.ddl struct srcpart { string key, string value}
+              serialization.format 1
+              serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+              totalSize 5812
+#### A masked pattern was here ####
+            serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+          
+              input format: org.apache.hadoop.mapred.TextInputFormat
+              output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+              properties:
+                bucket_count -1
+                columns key,value
+                columns.types string:string
+#### A masked pattern was here ####
+                name default.srcpart
+                numFiles 4
+                numPartitions 4
+                numRows 0
+                partition_columns ds/hr
+                rawDataSize 0
+                serialization.ddl struct srcpart { string key, string value}
+                serialization.format 1
+                serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                totalSize 23248
+#### A masked pattern was here ####
+              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+              name: default.srcpart
+            name: default.srcpart
       Truncated Path -> Alias:
         /src [y]
 

Modified: hive/trunk/ql/src/test/results/clientpositive/join33.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join33.q.out?rev=1509082&r1=1509081&r2=1509082&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join33.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join33.q.out Thu Aug  1 05:46:53 2013
@@ -24,8 +24,8 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-7 is a root stage
-  Stage-6 depends on stages: Stage-7
-  Stage-0 depends on stages: Stage-6
+  Stage-5 depends on stages: Stage-7
+  Stage-0 depends on stages: Stage-5
   Stage-2 depends on stages: Stage-0
 
 STAGE PLANS:
@@ -66,7 +66,7 @@ STAGE PLANS:
                 1 [Column[value]]
               Position of Big Table: 0
 
-  Stage: Stage-6
+  Stage: Stage-5
     Map Reduce
       Alias -> Map Operator Tree:
         y 
@@ -219,6 +219,52 @@ STAGE PLANS:
               serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
               name: default.src1
             name: default.src1
+#### A masked pattern was here ####
+          Partition
+            base file name: hr=11
+            input format: org.apache.hadoop.mapred.TextInputFormat
+            output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+            partition values:
+              ds 2008-04-08
+              hr 11
+            properties:
+              bucket_count -1
+              columns key,value
+              columns.types string:string
+#### A masked pattern was here ####
+              name default.srcpart
+              numFiles 1
+              numRows 0
+              partition_columns ds/hr
+              rawDataSize 0
+              serialization.ddl struct srcpart { string key, string value}
+              serialization.format 1
+              serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+              totalSize 5812
+#### A masked pattern was here ####
+            serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+          
+              input format: org.apache.hadoop.mapred.TextInputFormat
+              output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+              properties:
+                bucket_count -1
+                columns key,value
+                columns.types string:string
+#### A masked pattern was here ####
+                name default.srcpart
+                numFiles 4
+                numPartitions 4
+                numRows 0
+                partition_columns ds/hr
+                rawDataSize 0
+                serialization.ddl struct srcpart { string key, string value}
+                serialization.format 1
+                serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                totalSize 23248
+#### A masked pattern was here ####
+              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+              name: default.srcpart
+            name: default.srcpart
       Truncated Path -> Alias:
         /src [y]
 

Modified: hive/trunk/ql/src/test/results/clientpositive/join_star.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join_star.q.out?rev=1509082&r1=1509081&r2=1509082&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join_star.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join_star.q.out Thu Aug  1 05:46:53 2013
@@ -189,7 +189,7 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-6 is a root stage
-  Stage-5 depends on stages: Stage-6
+  Stage-4 depends on stages: Stage-6
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -228,7 +228,7 @@ STAGE PLANS:
                 1 [Column[f3]]
               Position of Big Table: 0
 
-  Stage: Stage-5
+  Stage: Stage-4
     Map Reduce
       Alias -> Map Operator Tree:
         fact 
@@ -314,7 +314,7 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-6 is a root stage
-  Stage-5 depends on stages: Stage-6
+  Stage-4 depends on stages: Stage-6
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -353,7 +353,7 @@ STAGE PLANS:
                 1 [Column[f3]]
               Position of Big Table: 0
 
-  Stage: Stage-5
+  Stage: Stage-4
     Map Reduce
       Alias -> Map Operator Tree:
         fact 
@@ -439,7 +439,7 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-6 is a root stage
-  Stage-5 depends on stages: Stage-6
+  Stage-4 depends on stages: Stage-6
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -478,7 +478,7 @@ STAGE PLANS:
                 1 [Column[f3]]
               Position of Big Table: 0
 
-  Stage: Stage-5
+  Stage: Stage-4
     Map Reduce
       Alias -> Map Operator Tree:
         fact 
@@ -580,7 +580,7 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-18 is a root stage
-  Stage-17 depends on stages: Stage-18
+  Stage-12 depends on stages: Stage-18
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -698,7 +698,7 @@ STAGE PLANS:
                 1 [Column[f13]]
               Position of Big Table: 0
 
-  Stage: Stage-17
+  Stage: Stage-12
     Map Reduce
       Alias -> Map Operator Tree:
         fact 

Modified: hive/trunk/ql/src/test/results/clientpositive/mapjoin_filter_on_outerjoin.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/mapjoin_filter_on_outerjoin.q.out?rev=1509082&r1=1509081&r2=1509082&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/mapjoin_filter_on_outerjoin.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/mapjoin_filter_on_outerjoin.q.out Thu Aug  1 05:46:53 2013
@@ -254,8 +254,7 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-6 is a root stage
-  Stage-5 depends on stages: Stage-6
-  Stage-2 depends on stages: Stage-5
+  Stage-2 depends on stages: Stage-6
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -314,7 +313,7 @@ STAGE PLANS:
                   2 [Column[key]]
                 Position of Big Table: 2
 
-  Stage: Stage-5
+  Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
         src3 
@@ -358,42 +357,31 @@ STAGE PLANS:
                         expr: _col9
                         type: string
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                  File Output Operator
-                    compressed: false
-                    GlobalTableId: 0
-                    table:
-                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  Reduce Output Operator
+                    key expressions:
+                          expr: _col0
+                          type: string
+                          expr: _col2
+                          type: string
+                          expr: _col4
+                          type: string
+                    sort order: +++
+                    tag: -1
+                    value expressions:
+                          expr: _col0
+                          type: string
+                          expr: _col1
+                          type: string
+                          expr: _col2
+                          type: string
+                          expr: _col3
+                          type: string
+                          expr: _col4
+                          type: string
+                          expr: _col5
+                          type: string
       Local Work:
         Map Reduce Local Work
-
-  Stage: Stage-2
-    Map Reduce
-      Alias -> Map Operator Tree:
-#### A masked pattern was here ####
-            Reduce Output Operator
-              key expressions:
-                    expr: _col0
-                    type: string
-                    expr: _col2
-                    type: string
-                    expr: _col4
-                    type: string
-              sort order: +++
-              tag: -1
-              value expressions:
-                    expr: _col0
-                    type: string
-                    expr: _col1
-                    type: string
-                    expr: _col2
-                    type: string
-                    expr: _col3
-                    type: string
-                    expr: _col4
-                    type: string
-                    expr: _col5
-                    type: string
       Reduce Operator Tree:
         Extract
           File Output Operator

Modified: hive/trunk/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out?rev=1509082&r1=1509081&r2=1509082&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out Thu Aug  1 05:46:53 2013
@@ -11,7 +11,7 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-7 is a root stage
-  Stage-6 depends on stages: Stage-7
+  Stage-5 depends on stages: Stage-7
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -50,7 +50,7 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-6
+  Stage: Stage-5
     Map Reduce
       Alias -> Map Operator Tree:
         srcpart 
@@ -108,8 +108,7 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-8 is a root stage
-  Stage-7 depends on stages: Stage-8
-  Stage-3 depends on stages: Stage-7
+  Stage-3 depends on stages: Stage-8
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -148,7 +147,7 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-7
+  Stage: Stage-3
     Map Reduce
       Alias -> Map Operator Tree:
         srcpart 
@@ -192,31 +191,20 @@ STAGE PLANS:
                           type: string
                     mode: hash
                     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
+                    Reduce Output Operator
+                      key expressions:
+                            expr: _col0
+                            type: string
+                      sort order: +
+                      Map-reduce partition columns:
+                            expr: _col0
+                            type: string
+                      tag: -1
+                      value expressions:
+                            expr: _col1
+                            type: bigint
       Local Work:
         Map Reduce Local Work
-
-  Stage: Stage-3
-    Map Reduce
-      Alias -> Map Operator Tree:
-#### A masked pattern was here ####
-            Reduce Output Operator
-              key expressions:
-                    expr: _col0
-                    type: string
-              sort order: +
-              Map-reduce partition columns:
-                    expr: _col0
-                    type: string
-              tag: -1
-              value expressions:
-                    expr: _col1
-                    type: bigint
       Reduce Operator Tree:
         Group By Operator
           aggregations:

Modified: hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery.q.out?rev=1509082&r1=1509081&r2=1509082&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery.q.out Thu Aug  1 05:46:53 2013
@@ -21,7 +21,7 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-7 is a root stage
-  Stage-6 depends on stages: Stage-7
+  Stage-5 depends on stages: Stage-7
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -60,7 +60,7 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-6
+  Stage: Stage-5
     Map Reduce
       Alias -> Map Operator Tree:
         subq:y 
@@ -268,8 +268,7 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-8 is a root stage
-  Stage-7 depends on stages: Stage-8
-  Stage-3 depends on stages: Stage-7
+  Stage-3 depends on stages: Stage-8
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -308,7 +307,7 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-7
+  Stage: Stage-3
     Map Reduce
       Alias -> Map Operator Tree:
         subq:y 
@@ -350,32 +349,21 @@ STAGE PLANS:
                           expr: _col5
                           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
+                    Reduce Output Operator
+                      key expressions:
+                            expr: _col0
+                            type: string
+                            expr: _col1
+                            type: string
+                      sort order: ++
+                      tag: -1
+                      value expressions:
+                            expr: _col0
+                            type: string
+                            expr: _col1
+                            type: string
       Local Work:
         Map Reduce Local Work
-
-  Stage: Stage-3
-    Map Reduce
-      Alias -> Map Operator Tree:
-#### A masked pattern was here ####
-            Reduce Output Operator
-              key expressions:
-                    expr: _col0
-                    type: string
-                    expr: _col1
-                    type: string
-              sort order: ++
-              tag: -1
-              value expressions:
-                    expr: _col0
-                    type: string
-                    expr: _col1
-                    type: string
       Reduce Operator Tree:
         Extract
           File Output Operator

Modified: hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery2.q.out?rev=1509082&r1=1509081&r2=1509082&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery2.q.out Thu Aug  1 05:46:53 2013
@@ -72,7 +72,7 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-7 is a root stage
-  Stage-6 depends on stages: Stage-7
+  Stage-5 depends on stages: Stage-7
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -111,7 +111,7 @@ STAGE PLANS:
                 1 [Column[id]]
               Position of Big Table: 0
 
-  Stage: Stage-6
+  Stage: Stage-5
     Map Reduce
       Alias -> Map Operator Tree:
         subq:x 

Modified: hive/trunk/ql/src/test/results/clientpositive/mapjoin_test_outer.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/mapjoin_test_outer.q.out?rev=1509082&r1=1509081&r2=1509082&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/mapjoin_test_outer.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/mapjoin_test_outer.q.out Thu Aug  1 05:46:53 2013
@@ -1164,8 +1164,7 @@ ABSTRACT SYNTAX TREE:
 
 STAGE DEPENDENCIES:
   Stage-6 is a root stage
-  Stage-5 depends on stages: Stage-6
-  Stage-2 depends on stages: Stage-5
+  Stage-2 depends on stages: Stage-6
   Stage-0 is a root stage
 
 STAGE PLANS:
@@ -1208,7 +1207,7 @@ STAGE PLANS:
                 2 [Column[key]]
               Position of Big Table: 1
 
-  Stage: Stage-5
+  Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
         src2 
@@ -1244,48 +1243,37 @@ STAGE PLANS:
                       expr: _col9
                       type: string
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                File Output Operator
-                  compressed: false
-                  GlobalTableId: 0
-                  table:
-                      input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                Reduce Output Operator
+                  key expressions:
+                        expr: _col0
+                        type: string
+                        expr: _col1
+                        type: string
+                        expr: _col2
+                        type: string
+                        expr: _col3
+                        type: string
+                        expr: _col4
+                        type: string
+                        expr: _col5
+                        type: string
+                  sort order: ++++++
+                  tag: -1
+                  value expressions:
+                        expr: _col0
+                        type: string
+                        expr: _col1
+                        type: string
+                        expr: _col2
+                        type: string
+                        expr: _col3
+                        type: string
+                        expr: _col4
+                        type: string
+                        expr: _col5
+                        type: string
       Local Work:
         Map Reduce Local Work
-
-  Stage: Stage-2
-    Map Reduce
-      Alias -> Map Operator Tree:
-#### A masked pattern was here ####
-            Reduce Output Operator
-              key expressions:
-                    expr: _col0
-                    type: string
-                    expr: _col1
-                    type: string
-                    expr: _col2
-                    type: string
-                    expr: _col3
-                    type: string
-                    expr: _col4
-                    type: string
-                    expr: _col5
-                    type: string
-              sort order: ++++++
-              tag: -1
-              value expressions:
-                    expr: _col0
-                    type: string
-                    expr: _col1
-                    type: string
-                    expr: _col2
-                    type: string
-                    expr: _col3
-                    type: string
-                    expr: _col4
-                    type: string
-                    expr: _col5
-                    type: string
       Reduce Operator Tree:
         Extract
           File Output Operator



Mime
View raw message