You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jc...@apache.org on 2017/08/24 21:06:58 UTC

[5/5] hive git commit: HIVE-17377: SharedWorkOptimizer might not iterate through TS operators deterministically (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)

HIVE-17377: SharedWorkOptimizer might not iterate through TS operators deterministically (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/5522a2db
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/5522a2db
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/5522a2db

Branch: refs/heads/master
Commit: 5522a2db1aad482b51548f5c158d9cd7c27c0a07
Parents: c284587
Author: Jesus Camacho Rodriguez <jc...@apache.org>
Authored: Thu Aug 24 09:48:52 2017 -0700
Committer: Jesus Camacho Rodriguez <jc...@apache.org>
Committed: Thu Aug 24 14:06:10 2017 -0700

----------------------------------------------------------------------
 .../hive/ql/optimizer/SharedWorkOptimizer.java  |   5 +-
 .../llap/correlationoptimizer6.q.out            |  84 +-
 .../llap/limit_join_transpose.q.out             | 158 ++--
 .../results/clientpositive/perf/query10.q.out   |  32 +-
 .../results/clientpositive/perf/query11.q.out   | 148 ++--
 .../results/clientpositive/perf/query14.q.out   | 796 +++++++++----------
 .../results/clientpositive/perf/query23.q.out   |  68 +-
 .../results/clientpositive/perf/query4.q.out    | 262 +++---
 .../results/clientpositive/perf/query47.q.out   | 190 ++---
 .../results/clientpositive/perf/query54.q.out   | 256 +++---
 .../results/clientpositive/perf/query57.q.out   | 190 ++---
 .../results/clientpositive/perf/query58.q.out   |  12 +-
 .../results/clientpositive/perf/query64.q.out   | 102 +--
 .../results/clientpositive/perf/query74.q.out   | 144 ++--
 .../results/clientpositive/perf/query85.q.out   |  10 +-
 .../results/clientpositive/perf/query9.q.out    |  90 +--
 .../results/clientpositive/perf/query95.q.out   |  86 +-
 17 files changed, 1304 insertions(+), 1329 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/5522a2db/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java
index b206ace..01d4f57 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java
@@ -33,6 +33,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
+import java.util.TreeMap;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.hive.ql.exec.AppMasterEventOperator;
@@ -362,7 +363,9 @@ public class SharedWorkOptimizer extends Transform {
   private static Multimap<String, TableScanOperator> splitTableScanOpsByTable(
           ParseContext pctx) {
     Multimap<String, TableScanOperator> tableNameToOps = ArrayListMultimap.create();
-    for (Entry<String, TableScanOperator> e : pctx.getTopOps().entrySet()) {
+    // Sort by operator ID so we get deterministic results
+    Map<String, TableScanOperator> sortedTopOps = new TreeMap<>(pctx.getTopOps());
+    for (Entry<String, TableScanOperator> e : sortedTopOps.entrySet()) {
       TableScanOperator tsOp = e.getValue();
       tableNameToOps.put(
               tsOp.getConf().getTableMetadata().getDbName() + "."

http://git-wip-us.apache.org/repos/asf/hive/blob/5522a2db/ql/src/test/results/clientpositive/llap/correlationoptimizer6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/correlationoptimizer6.q.out b/ql/src/test/results/clientpositive/llap/correlationoptimizer6.q.out
index a47a7d3..d94dda2 100644
--- a/ql/src/test/results/clientpositive/llap/correlationoptimizer6.q.out
+++ b/ql/src/test/results/clientpositive/llap/correlationoptimizer6.q.out
@@ -1785,52 +1785,52 @@ STAGE PLANS:
     Tez
 #### A masked pattern was here ####
       Edges:
-        Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE), Reducer 4 (ONE_TO_ONE_EDGE)
-        Reducer 3 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
-        Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+        Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE), Reducer 5 (ONE_TO_ONE_EDGE)
+        Reducer 4 <- Map 3 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+        Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
             Map Operator Tree:
                 TableScan
-                  alias: zz
-                  Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                  alias: xx
+                  Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
                     predicate: key is not null (type: boolean)
-                    Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
-                      Reduce Output Operator
-                        key expressions: _col0 (type: string)
-                        sort order: +
-                        Map-reduce partition columns: _col0 (type: string)
-                        Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
-                        Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: llap
             LLAP IO: no inputs
-        Map 5 
+        Map 3 
             Map Operator Tree:
                 TableScan
-                  alias: xx
-                  Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
+                  alias: x
+                  Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
                     predicate: key is not null (type: boolean)
-                    Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
-                        Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: string)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: string)
+                        Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: llap
             LLAP IO: no inputs
         Map 6 
@@ -1876,7 +1876,7 @@ STAGE PLANS:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                         output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
                         serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-        Reducer 3 
+        Reducer 4 
             Execution mode: llap
             Reduce Operator Tree:
               Merge Join Operator
@@ -1899,7 +1899,7 @@ STAGE PLANS:
                     Map-reduce partition columns: _col0 (type: string)
                     Statistics: Num rows: 309 Data size: 29355 Basic stats: COMPLETE Column stats: COMPLETE
                     value expressions: _col1 (type: bigint)
-        Reducer 4 
+        Reducer 5 
             Execution mode: llap
             Reduce Operator Tree:
               Group By Operator
@@ -2003,52 +2003,52 @@ STAGE PLANS:
     Tez
 #### A masked pattern was here ####
       Edges:
-        Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE), Reducer 4 (ONE_TO_ONE_EDGE)
-        Reducer 3 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
-        Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+        Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE), Reducer 5 (ONE_TO_ONE_EDGE)
+        Reducer 4 <- Map 3 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+        Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
             Map Operator Tree:
                 TableScan
-                  alias: zz
-                  Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                  alias: xx
+                  Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
                     predicate: key is not null (type: boolean)
-                    Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
-                      Reduce Output Operator
-                        key expressions: _col0 (type: string)
-                        sort order: +
-                        Map-reduce partition columns: _col0 (type: string)
-                        Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
-                        Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: llap
             LLAP IO: no inputs
-        Map 5 
+        Map 3 
             Map Operator Tree:
                 TableScan
-                  alias: xx
-                  Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
+                  alias: x
+                  Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
                     predicate: key is not null (type: boolean)
-                    Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
-                        Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: string)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: string)
+                        Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: llap
             LLAP IO: no inputs
         Map 6 
@@ -2094,7 +2094,7 @@ STAGE PLANS:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                         output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
                         serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-        Reducer 3 
+        Reducer 4 
             Execution mode: llap
             Reduce Operator Tree:
               Merge Join Operator
@@ -2117,7 +2117,7 @@ STAGE PLANS:
                     Map-reduce partition columns: _col0 (type: string)
                     Statistics: Num rows: 309 Data size: 29355 Basic stats: COMPLETE Column stats: COMPLETE
                     value expressions: _col1 (type: bigint)
-        Reducer 4 
+        Reducer 5 
             Execution mode: llap
             Reduce Operator Tree:
               Group By Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/5522a2db/ql/src/test/results/clientpositive/llap/limit_join_transpose.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/limit_join_transpose.q.out b/ql/src/test/results/clientpositive/llap/limit_join_transpose.q.out
index 61fba3d..4dd7432 100644
--- a/ql/src/test/results/clientpositive/llap/limit_join_transpose.q.out
+++ b/ql/src/test/results/clientpositive/llap/limit_join_transpose.q.out
@@ -340,20 +340,30 @@ STAGE PLANS:
     Tez
 #### A masked pattern was here ####
       Edges:
-        Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
-        Reducer 3 <- Map 1 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+        Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+        Reducer 3 <- Map 1 (CUSTOM_SIMPLE_EDGE)
         Reducer 4 <- Map 1 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
             Map Operator Tree:
                 TableScan
-                  alias: src2
+                  alias: src1
                   Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
                   Select Operator
                     expressions: key (type: string), value (type: string)
                     outputColumnNames: _col0, _col1
                     Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
+                    Reduce Output Operator
+                      key expressions: _col0 (type: string)
+                      sort order: +
+                      Map-reduce partition columns: _col0 (type: string)
+                      Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
+                      value expressions: _col1 (type: string)
+                  Select Operator
+                    expressions: key (type: string), value (type: string)
+                    outputColumnNames: _col0, _col1
+                    Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
                     Limit
                       Number of rows: 1
                       Statistics: Num rows: 1 Data size: 178 Basic stats: COMPLETE Column stats: COMPLETE
@@ -372,21 +382,36 @@ STAGE PLANS:
                       Map-reduce partition columns: _col1 (type: string)
                       Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
                       value expressions: _col0 (type: string)
-                  Select Operator
-                    expressions: key (type: string), value (type: string)
-                    outputColumnNames: _col0, _col1
-                    Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
-                    Reduce Output Operator
-                      key expressions: _col0 (type: string)
-                      sort order: +
-                      Map-reduce partition columns: _col0 (type: string)
-                      Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
-                      value expressions: _col1 (type: string)
             Execution mode: llap
             LLAP IO: no inputs
         Reducer 2 
             Execution mode: llap
             Reduce Operator Tree:
+              Merge Join Operator
+                condition map:
+                     Left Outer Join 0 to 1
+                keys:
+                  0 _col2 (type: string)
+                  1 _col0 (type: string)
+                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+                Statistics: Num rows: 1 Data size: 534 Basic stats: COMPLETE Column stats: COMPLETE
+                Select Operator
+                  expressions: _col4 (type: string), _col5 (type: string), _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+                  Statistics: Num rows: 1 Data size: 534 Basic stats: COMPLETE Column stats: COMPLETE
+                  Limit
+                    Number of rows: 1
+                    Statistics: Num rows: 1 Data size: 534 Basic stats: COMPLETE Column stats: COMPLETE
+                    File Output Operator
+                      compressed: false
+                      Statistics: Num rows: 1 Data size: 534 Basic stats: COMPLETE Column stats: COMPLETE
+                      table:
+                          input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                          output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                          serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+        Reducer 3 
+            Execution mode: llap
+            Reduce Operator Tree:
               Select Operator
                 expressions: VALUE._col0 (type: string), VALUE._col1 (type: string)
                 outputColumnNames: _col0, _col1
@@ -400,7 +425,7 @@ STAGE PLANS:
                     Map-reduce partition columns: _col1 (type: string)
                     Statistics: Num rows: 1 Data size: 178 Basic stats: COMPLETE Column stats: COMPLETE
                     value expressions: _col0 (type: string)
-        Reducer 3 
+        Reducer 4 
             Execution mode: llap
             Reduce Operator Tree:
               Merge Join Operator
@@ -417,31 +442,6 @@ STAGE PLANS:
                   Map-reduce partition columns: _col2 (type: string)
                   Statistics: Num rows: 1 Data size: 356 Basic stats: COMPLETE Column stats: COMPLETE
                   value expressions: _col0 (type: string), _col1 (type: string), _col3 (type: string)
-        Reducer 4 
-            Execution mode: llap
-            Reduce Operator Tree:
-              Merge Join Operator
-                condition map:
-                     Left Outer Join 0 to 1
-                keys:
-                  0 _col2 (type: string)
-                  1 _col0 (type: string)
-                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                Statistics: Num rows: 1 Data size: 534 Basic stats: COMPLETE Column stats: COMPLETE
-                Select Operator
-                  expressions: _col4 (type: string), _col5 (type: string), _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string)
-                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                  Statistics: Num rows: 1 Data size: 534 Basic stats: COMPLETE Column stats: COMPLETE
-                  Limit
-                    Number of rows: 1
-                    Statistics: Num rows: 1 Data size: 534 Basic stats: COMPLETE Column stats: COMPLETE
-                    File Output Operator
-                      compressed: false
-                      Statistics: Num rows: 1 Data size: 534 Basic stats: COMPLETE Column stats: COMPLETE
-                      table:
-                          input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                          output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                          serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator
@@ -1232,20 +1232,30 @@ STAGE PLANS:
     Tez
 #### A masked pattern was here ####
       Edges:
-        Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
-        Reducer 3 <- Map 1 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+        Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+        Reducer 3 <- Map 1 (CUSTOM_SIMPLE_EDGE)
         Reducer 4 <- Map 1 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
             Map Operator Tree:
                 TableScan
-                  alias: src2
+                  alias: src1
                   Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
                   Select Operator
                     expressions: key (type: string), value (type: string)
                     outputColumnNames: _col0, _col1
                     Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
+                    Reduce Output Operator
+                      key expressions: _col0 (type: string)
+                      sort order: +
+                      Map-reduce partition columns: _col0 (type: string)
+                      Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
+                      value expressions: _col1 (type: string)
+                  Select Operator
+                    expressions: key (type: string), value (type: string)
+                    outputColumnNames: _col0, _col1
+                    Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
                     Limit
                       Number of rows: 1
                       Offset of rows: 1
@@ -1265,21 +1275,37 @@ STAGE PLANS:
                       Map-reduce partition columns: _col1 (type: string)
                       Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
                       value expressions: _col0 (type: string)
-                  Select Operator
-                    expressions: key (type: string), value (type: string)
-                    outputColumnNames: _col0, _col1
-                    Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
-                    Reduce Output Operator
-                      key expressions: _col0 (type: string)
-                      sort order: +
-                      Map-reduce partition columns: _col0 (type: string)
-                      Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
-                      value expressions: _col1 (type: string)
             Execution mode: llap
             LLAP IO: no inputs
         Reducer 2 
             Execution mode: llap
             Reduce Operator Tree:
+              Merge Join Operator
+                condition map:
+                     Left Outer Join 0 to 1
+                keys:
+                  0 _col2 (type: string)
+                  1 _col0 (type: string)
+                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+                Statistics: Num rows: 1 Data size: 534 Basic stats: COMPLETE Column stats: COMPLETE
+                Select Operator
+                  expressions: _col4 (type: string), _col5 (type: string), _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+                  Statistics: Num rows: 1 Data size: 534 Basic stats: COMPLETE Column stats: COMPLETE
+                  Limit
+                    Number of rows: 1
+                    Offset of rows: 1
+                    Statistics: Num rows: 1 Data size: 534 Basic stats: COMPLETE Column stats: COMPLETE
+                    File Output Operator
+                      compressed: false
+                      Statistics: Num rows: 1 Data size: 534 Basic stats: COMPLETE Column stats: COMPLETE
+                      table:
+                          input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                          output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                          serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+        Reducer 3 
+            Execution mode: llap
+            Reduce Operator Tree:
               Select Operator
                 expressions: VALUE._col0 (type: string), VALUE._col1 (type: string)
                 outputColumnNames: _col0, _col1
@@ -1294,7 +1320,7 @@ STAGE PLANS:
                     Map-reduce partition columns: _col1 (type: string)
                     Statistics: Num rows: 1 Data size: 178 Basic stats: COMPLETE Column stats: COMPLETE
                     value expressions: _col0 (type: string)
-        Reducer 3 
+        Reducer 4 
             Execution mode: llap
             Reduce Operator Tree:
               Merge Join Operator
@@ -1311,32 +1337,6 @@ STAGE PLANS:
                   Map-reduce partition columns: _col2 (type: string)
                   Statistics: Num rows: 1 Data size: 356 Basic stats: COMPLETE Column stats: COMPLETE
                   value expressions: _col0 (type: string), _col1 (type: string), _col3 (type: string)
-        Reducer 4 
-            Execution mode: llap
-            Reduce Operator Tree:
-              Merge Join Operator
-                condition map:
-                     Left Outer Join 0 to 1
-                keys:
-                  0 _col2 (type: string)
-                  1 _col0 (type: string)
-                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                Statistics: Num rows: 1 Data size: 534 Basic stats: COMPLETE Column stats: COMPLETE
-                Select Operator
-                  expressions: _col4 (type: string), _col5 (type: string), _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string)
-                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                  Statistics: Num rows: 1 Data size: 534 Basic stats: COMPLETE Column stats: COMPLETE
-                  Limit
-                    Number of rows: 1
-                    Offset of rows: 1
-                    Statistics: Num rows: 1 Data size: 534 Basic stats: COMPLETE Column stats: COMPLETE
-                    File Output Operator
-                      compressed: false
-                      Statistics: Num rows: 1 Data size: 534 Basic stats: COMPLETE Column stats: COMPLETE
-                      table:
-                          input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                          output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                          serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/5522a2db/ql/src/test/results/clientpositive/perf/query10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query10.q.out b/ql/src/test/results/clientpositive/perf/query10.q.out
index 7793d52..e300561 100644
--- a/ql/src/test/results/clientpositive/perf/query10.q.out
+++ b/ql/src/test/results/clientpositive/perf/query10.q.out
@@ -117,16 +117,16 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 11 <- Map 10 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE)
+Reducer 11 <- Map 10 (SIMPLE_EDGE), Map 16 (SIMPLE_EDGE)
 Reducer 12 <- Reducer 11 (SIMPLE_EDGE)
-Reducer 14 <- Map 13 (SIMPLE_EDGE), Map 18 (SIMPLE_EDGE)
+Reducer 14 <- Map 13 (SIMPLE_EDGE), Map 16 (SIMPLE_EDGE)
 Reducer 15 <- Reducer 14 (SIMPLE_EDGE)
-Reducer 16 <- Map 13 (SIMPLE_EDGE), Map 19 (SIMPLE_EDGE)
-Reducer 17 <- Reducer 16 (SIMPLE_EDGE)
+Reducer 17 <- Map 16 (SIMPLE_EDGE), Map 19 (SIMPLE_EDGE)
+Reducer 18 <- Reducer 17 (SIMPLE_EDGE)
 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
 Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
 Reducer 4 <- Reducer 12 (ONE_TO_ONE_EDGE), Reducer 15 (ONE_TO_ONE_EDGE), Reducer 3 (SIMPLE_EDGE)
-Reducer 5 <- Reducer 17 (ONE_TO_ONE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 18 (ONE_TO_ONE_EDGE), Reducer 4 (SIMPLE_EDGE)
 Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
 Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
 
@@ -157,28 +157,28 @@ Stage-0
                           predicate:(_col16 is not null or _col18 is not null)
                           Merge Join Operator [MERGEJOIN_112] (rows=766650239 width=88)
                             Conds:RS_62._col0=RS_63._col0(Left Outer),Output:["_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col16","_col18"]
-                          <-Reducer 17 [ONE_TO_ONE_EDGE]
+                          <-Reducer 18 [ONE_TO_ONE_EDGE]
                             FORWARD [RS_63]
                               PartitionCols:_col0
                               Select Operator [SEL_61] (rows=158394413 width=135)
                                 Output:["_col0","_col1"]
                                 Group By Operator [GBY_60] (rows=158394413 width=135)
                                   Output:["_col0"],keys:KEY._col0
-                                <-Reducer 16 [SIMPLE_EDGE]
+                                <-Reducer 17 [SIMPLE_EDGE]
                                   SHUFFLE [RS_59]
                                     PartitionCols:_col0
                                     Group By Operator [GBY_58] (rows=316788826 width=135)
                                       Output:["_col0"],keys:_col1
                                       Merge Join Operator [MERGEJOIN_110] (rows=316788826 width=135)
                                         Conds:RS_54._col0=RS_55._col0(Inner),Output:["_col1"]
-                                      <-Map 13 [SIMPLE_EDGE]
+                                      <-Map 16 [SIMPLE_EDGE]
                                         SHUFFLE [RS_55]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_14] (rows=4058 width=1119)
+                                          Select Operator [SEL_28] (rows=4058 width=1119)
                                             Output:["_col0"]
-                                            Filter Operator [FIL_101] (rows=4058 width=1119)
+                                            Filter Operator [FIL_103] (rows=4058 width=1119)
                                               predicate:((d_year = 2002) and d_moy BETWEEN 4 AND 7 and d_date_sk is not null)
-                                              TableScan [TS_12] (rows=73049 width=1119)
+                                              TableScan [TS_26] (rows=73049 width=1119)
                                                 default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
                                       <-Map 19 [SIMPLE_EDGE]
                                         SHUFFLE [RS_54]
@@ -210,10 +210,10 @@ Stage-0
                                             Output:["_col0"],keys:_col1
                                             Merge Join Operator [MERGEJOIN_108] (rows=158402938 width=135)
                                               Conds:RS_15._col0=RS_16._col0(Inner),Output:["_col1"]
-                                            <-Map 13 [SIMPLE_EDGE]
+                                            <-Map 16 [SIMPLE_EDGE]
                                               SHUFFLE [RS_16]
                                                 PartitionCols:_col0
-                                                 Please refer to the previous Select Operator [SEL_14]
+                                                 Please refer to the previous Select Operator [SEL_28]
                                             <-Map 10 [SIMPLE_EDGE]
                                               SHUFFLE [RS_15]
                                                 PartitionCols:_col0
@@ -235,11 +235,11 @@ Stage-0
                                           Output:["_col0"],keys:_col1
                                           Merge Join Operator [MERGEJOIN_109] (rows=633595212 width=88)
                                             Conds:RS_29._col0=RS_30._col0(Inner),Output:["_col1"]
-                                          <-Map 13 [SIMPLE_EDGE]
+                                          <-Map 16 [SIMPLE_EDGE]
                                             SHUFFLE [RS_30]
                                               PartitionCols:_col0
-                                               Please refer to the previous Select Operator [SEL_14]
-                                          <-Map 18 [SIMPLE_EDGE]
+                                               Please refer to the previous Select Operator [SEL_28]
+                                          <-Map 13 [SIMPLE_EDGE]
                                             SHUFFLE [RS_29]
                                               PartitionCols:_col0
                                               Select Operator [SEL_25] (rows=575995635 width=88)

http://git-wip-us.apache.org/repos/asf/hive/blob/5522a2db/ql/src/test/results/clientpositive/perf/query11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query11.q.out b/ql/src/test/results/clientpositive/perf/query11.q.out
index 11a4a6b..182aa74 100644
--- a/ql/src/test/results/clientpositive/perf/query11.q.out
+++ b/ql/src/test/results/clientpositive/perf/query11.q.out
@@ -149,19 +149,19 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 11 <- Map 10 (SIMPLE_EDGE), Map 18 (SIMPLE_EDGE)
-Reducer 12 <- Map 17 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
+Reducer 11 <- Map 10 (SIMPLE_EDGE), Map 17 (SIMPLE_EDGE)
+Reducer 12 <- Map 18 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
 Reducer 13 <- Reducer 12 (SIMPLE_EDGE)
-Reducer 14 <- Map 10 (SIMPLE_EDGE), Map 18 (SIMPLE_EDGE)
-Reducer 15 <- Map 17 (SIMPLE_EDGE), Reducer 14 (SIMPLE_EDGE)
+Reducer 14 <- Map 10 (SIMPLE_EDGE), Map 17 (SIMPLE_EDGE)
+Reducer 15 <- Map 18 (SIMPLE_EDGE), Reducer 14 (SIMPLE_EDGE)
 Reducer 16 <- Reducer 15 (SIMPLE_EDGE)
-Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 10 (SIMPLE_EDGE)
-Reducer 3 <- Map 17 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 17 (SIMPLE_EDGE)
+Reducer 3 <- Map 18 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
 Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
 Reducer 5 <- Reducer 13 (SIMPLE_EDGE), Reducer 16 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
 Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
-Reducer 7 <- Map 1 (SIMPLE_EDGE), Map 10 (SIMPLE_EDGE)
-Reducer 8 <- Map 17 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 7 <- Map 1 (SIMPLE_EDGE), Map 17 (SIMPLE_EDGE)
+Reducer 8 <- Map 18 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
 Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
 
 Stage-0
@@ -183,6 +183,54 @@ Stage-0
                   Merge Join Operator [MERGEJOIN_175] (rows=1149975359 width=88)
                     Conds:RS_86._col0=RS_87._col0(Inner),RS_87._col0=RS_88._col0(Inner),RS_87._col0=RS_89._col0(Inner),Output:["_col7","_col14","_col22","_col26","_col30"]
                   <-Reducer 13 [SIMPLE_EDGE]
+                    SHUFFLE [RS_89]
+                      PartitionCols:_col0
+                      Select Operator [SEL_85] (rows=348477374 width=88)
+                        Output:["_col0","_col3","_col7"]
+                        Group By Operator [GBY_84] (rows=348477374 width=88)
+                          Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5, KEY._col6
+                        <-Reducer 12 [SIMPLE_EDGE]
+                          SHUFFLE [RS_83]
+                            PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5, _col6
+                            Group By Operator [GBY_82] (rows=696954748 width=88)
+                              Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(_col7)"],keys:_col0, _col1, _col2, _col3, _col4, _col5, _col6
+                              Select Operator [SEL_80] (rows=696954748 width=88)
+                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+                                Merge Join Operator [MERGEJOIN_174] (rows=696954748 width=88)
+                                  Conds:RS_77._col1=RS_78._col0(Inner),Output:["_col2","_col3","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
+                                <-Map 18 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_78]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_73] (rows=80000000 width=860)
+                                      Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+                                      Filter Operator [FIL_164] (rows=80000000 width=860)
+                                        predicate:(c_customer_sk is not null and c_customer_id is not null)
+                                        TableScan [TS_71] (rows=80000000 width=860)
+                                          default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_customer_id","c_first_name","c_last_name","c_preferred_cust_flag","c_birth_country","c_login","c_email_address"]
+                                <-Reducer 11 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_77]
+                                    PartitionCols:_col1
+                                    Merge Join Operator [MERGEJOIN_173] (rows=633595212 width=88)
+                                      Conds:RS_74._col0=RS_75._col0(Inner),Output:["_col1","_col2","_col3"]
+                                    <-Map 17 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_75]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_70] (rows=36524 width=1119)
+                                          Output:["_col0"]
+                                          Filter Operator [FIL_163] (rows=36524 width=1119)
+                                            predicate:((d_year = 2002) and d_date_sk is not null)
+                                            TableScan [TS_68] (rows=73049 width=1119)
+                                              default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
+                                    <-Map 10 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_74]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_67] (rows=575995635 width=88)
+                                          Output:["_col0","_col1","_col2","_col3"]
+                                          Filter Operator [FIL_162] (rows=575995635 width=88)
+                                            predicate:(ss_customer_sk is not null and ss_sold_date_sk is not null)
+                                            TableScan [TS_65] (rows=575995635 width=88)
+                                              default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_customer_sk","ss_ext_discount_amt","ss_ext_list_price"]
+                  <-Reducer 16 [SIMPLE_EDGE]
                     SHUFFLE [RS_87]
                       PartitionCols:_col0
                       Select Operator [SEL_42] (rows=116159124 width=88)
@@ -193,7 +241,7 @@ Stage-0
                             Output:["_col0","_col7"]
                             Group By Operator [GBY_40] (rows=348477374 width=88)
                               Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5, KEY._col6
-                            <-Reducer 12 [SIMPLE_EDGE]
+                            <-Reducer 15 [SIMPLE_EDGE]
                               SHUFFLE [RS_39]
                                 PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5, _col6
                                 Group By Operator [GBY_38] (rows=696954748 width=88)
@@ -202,75 +250,27 @@ Stage-0
                                     Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                                     Merge Join Operator [MERGEJOIN_170] (rows=696954748 width=88)
                                       Conds:RS_33._col1=RS_34._col0(Inner),Output:["_col2","_col3","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
-                                    <-Map 17 [SIMPLE_EDGE]
+                                    <-Map 18 [SIMPLE_EDGE]
                                       SHUFFLE [RS_34]
                                         PartitionCols:_col0
-                                        Select Operator [SEL_8] (rows=80000000 width=860)
-                                          Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                                          Filter Operator [FIL_155] (rows=80000000 width=860)
-                                            predicate:(c_customer_sk is not null and c_customer_id is not null)
-                                            TableScan [TS_6] (rows=80000000 width=860)
-                                              default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_customer_id","c_first_name","c_last_name","c_preferred_cust_flag","c_birth_country","c_login","c_email_address"]
-                                    <-Reducer 11 [SIMPLE_EDGE]
+                                         Please refer to the previous Select Operator [SEL_73]
+                                    <-Reducer 14 [SIMPLE_EDGE]
                                       SHUFFLE [RS_33]
                                         PartitionCols:_col1
                                         Merge Join Operator [MERGEJOIN_169] (rows=633595212 width=88)
                                           Conds:RS_30._col0=RS_31._col0(Inner),Output:["_col1","_col2","_col3"]
-                                        <-Map 10 [SIMPLE_EDGE]
+                                        <-Map 17 [SIMPLE_EDGE]
                                           SHUFFLE [RS_31]
                                             PartitionCols:_col0
                                             Select Operator [SEL_26] (rows=36524 width=1119)
                                               Output:["_col0"]
                                               Filter Operator [FIL_157] (rows=36524 width=1119)
                                                 predicate:((d_year = 2001) and d_date_sk is not null)
-                                                TableScan [TS_3] (rows=73049 width=1119)
-                                                  default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
-                                        <-Map 18 [SIMPLE_EDGE]
+                                                 Please refer to the previous TableScan [TS_68]
+                                        <-Map 10 [SIMPLE_EDGE]
                                           SHUFFLE [RS_30]
                                             PartitionCols:_col0
-                                            Select Operator [SEL_23] (rows=575995635 width=88)
-                                              Output:["_col0","_col1","_col2","_col3"]
-                                              Filter Operator [FIL_156] (rows=575995635 width=88)
-                                                predicate:(ss_customer_sk is not null and ss_sold_date_sk is not null)
-                                                TableScan [TS_21] (rows=575995635 width=88)
-                                                  default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_customer_sk","ss_ext_discount_amt","ss_ext_list_price"]
-                  <-Reducer 16 [SIMPLE_EDGE]
-                    SHUFFLE [RS_89]
-                      PartitionCols:_col0
-                      Select Operator [SEL_85] (rows=348477374 width=88)
-                        Output:["_col0","_col3","_col7"]
-                        Group By Operator [GBY_84] (rows=348477374 width=88)
-                          Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5, KEY._col6
-                        <-Reducer 15 [SIMPLE_EDGE]
-                          SHUFFLE [RS_83]
-                            PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5, _col6
-                            Group By Operator [GBY_82] (rows=696954748 width=88)
-                              Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(_col7)"],keys:_col0, _col1, _col2, _col3, _col4, _col5, _col6
-                              Select Operator [SEL_80] (rows=696954748 width=88)
-                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                                Merge Join Operator [MERGEJOIN_174] (rows=696954748 width=88)
-                                  Conds:RS_77._col1=RS_78._col0(Inner),Output:["_col2","_col3","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
-                                <-Map 17 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_78]
-                                    PartitionCols:_col0
-                                     Please refer to the previous Select Operator [SEL_8]
-                                <-Reducer 14 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_77]
-                                    PartitionCols:_col1
-                                    Merge Join Operator [MERGEJOIN_173] (rows=633595212 width=88)
-                                      Conds:RS_74._col0=RS_75._col0(Inner),Output:["_col1","_col2","_col3"]
-                                    <-Map 10 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_75]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_70] (rows=36524 width=1119)
-                                          Output:["_col0"]
-                                          Filter Operator [FIL_163] (rows=36524 width=1119)
-                                            predicate:((d_year = 2002) and d_date_sk is not null)
-                                             Please refer to the previous TableScan [TS_3]
-                                    <-Map 18 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_74]
-                                        PartitionCols:_col0
-                                         Please refer to the previous Select Operator [SEL_23]
+                                             Please refer to the previous Select Operator [SEL_67]
                   <-Reducer 4 [SIMPLE_EDGE]
                     SHUFFLE [RS_86]
                       PartitionCols:_col0
@@ -287,23 +287,19 @@ Stage-0
                                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                                 Merge Join Operator [MERGEJOIN_168] (rows=174243235 width=135)
                                   Conds:RS_12._col1=RS_13._col0(Inner),Output:["_col2","_col3","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
-                                <-Map 17 [SIMPLE_EDGE]
+                                <-Map 18 [SIMPLE_EDGE]
                                   SHUFFLE [RS_13]
                                     PartitionCols:_col0
-                                     Please refer to the previous Select Operator [SEL_8]
+                                     Please refer to the previous Select Operator [SEL_73]
                                 <-Reducer 2 [SIMPLE_EDGE]
                                   SHUFFLE [RS_12]
                                     PartitionCols:_col1
                                     Merge Join Operator [MERGEJOIN_167] (rows=158402938 width=135)
                                       Conds:RS_9._col0=RS_10._col0(Inner),Output:["_col1","_col2","_col3"]
-                                    <-Map 10 [SIMPLE_EDGE]
+                                    <-Map 17 [SIMPLE_EDGE]
                                       SHUFFLE [RS_10]
                                         PartitionCols:_col0
-                                        Select Operator [SEL_5] (rows=36524 width=1119)
-                                          Output:["_col0"]
-                                          Filter Operator [FIL_154] (rows=36524 width=1119)
-                                            predicate:((d_year = 2002) and d_date_sk is not null)
-                                             Please refer to the previous TableScan [TS_3]
+                                         Please refer to the previous Select Operator [SEL_70]
                                     <-Map 1 [SIMPLE_EDGE]
                                       SHUFFLE [RS_9]
                                         PartitionCols:_col0
@@ -331,23 +327,23 @@ Stage-0
                                   Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                                   Merge Join Operator [MERGEJOIN_172] (rows=174243235 width=135)
                                     Conds:RS_55._col1=RS_56._col0(Inner),Output:["_col2","_col3","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
-                                  <-Map 17 [SIMPLE_EDGE]
+                                  <-Map 18 [SIMPLE_EDGE]
                                     SHUFFLE [RS_56]
                                       PartitionCols:_col0
-                                       Please refer to the previous Select Operator [SEL_8]
+                                       Please refer to the previous Select Operator [SEL_73]
                                   <-Reducer 7 [SIMPLE_EDGE]
                                     SHUFFLE [RS_55]
                                       PartitionCols:_col1
                                       Merge Join Operator [MERGEJOIN_171] (rows=158402938 width=135)
                                         Conds:RS_52._col0=RS_53._col0(Inner),Output:["_col1","_col2","_col3"]
-                                      <-Map 10 [SIMPLE_EDGE]
+                                      <-Map 17 [SIMPLE_EDGE]
                                         SHUFFLE [RS_53]
                                           PartitionCols:_col0
                                           Select Operator [SEL_48] (rows=36524 width=1119)
                                             Output:["_col0"]
                                             Filter Operator [FIL_160] (rows=36524 width=1119)
                                               predicate:((d_year = 2001) and d_date_sk is not null)
-                                               Please refer to the previous TableScan [TS_3]
+                                               Please refer to the previous TableScan [TS_68]
                                       <-Map 1 [SIMPLE_EDGE]
                                         SHUFFLE [RS_52]
                                           PartitionCols:_col0