http://git-wip-us.apache.org/repos/asf/hive/blob/e74eb354/ql/src/test/results/clientpositive/perf/spark/query59.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query59.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query59.q.out
index 1224ab6..5164bfc 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query59.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query59.q.out
@@ -222,16 +222,16 @@ STAGE PLANS:
                   Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: (d_month_seq BETWEEN 1197 AND 1208 and 
d_week_seq is not null) (type: boolean)
-                    Statistics: Num rows: 8116 Data size: 9081804 Basic stats: 
COMPLETE Column stats: NONE
+                    Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: d_week_seq (type: int)
                       outputColumnNames: _col1
-                      Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col1 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col1 (type: int)
-                        Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
             Execution mode: vectorized
         Map 7 
             Map Operator Tree:
@@ -261,16 +261,16 @@ STAGE PLANS:
                   Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: (d_month_seq BETWEEN 1185 AND 1196 and 
d_week_seq is not null) (type: boolean)
-                    Statistics: Num rows: 8116 Data size: 9081804 Basic stats: 
COMPLETE Column stats: NONE
+                    Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: d_week_seq (type: int)
                       outputColumnNames: _col1
-                      Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col1 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col1 (type: int)
-                        Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
             Execution mode: vectorized
         Reducer 11 
             Reduce Operator Tree:

http://git-wip-us.apache.org/repos/asf/hive/blob/e74eb354/ql/src/test/results/clientpositive/perf/spark/query65.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query65.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query65.q.out
index 4afa1a6..982a1e1 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query65.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query65.q.out
@@ -55,70 +55,20 @@ select
 limit 100
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-2 is a root stage
-  Stage-3 depends on stages: Stage-2
-  Stage-1 depends on stages: Stage-3
+  Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
-  Stage: Stage-2
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 6 
-            Map Operator Tree:
-                TableScan
-                  alias: date_dim
-                  filterExpr: (d_month_seq BETWEEN 1212 AND 1223 and d_date_sk 
is not null) (type: boolean)
-                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
-                  Filter Operator
-                    predicate: (d_date_sk is not null and d_month_seq BETWEEN 
1212 AND 1223) (type: boolean)
-                    Statistics: Num rows: 8116 Data size: 9081804 Basic stats: 
COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: d_date_sk (type: int)
-                      outputColumnNames: _col0
-                      Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
-                      Spark HashTable Sink Operator
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-            Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
-
-  Stage: Stage-3
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 9 
-            Map Operator Tree:
-                TableScan
-                  alias: date_dim
-                  filterExpr: (d_month_seq BETWEEN 1212 AND 1223 and d_date_sk 
is not null) (type: boolean)
-                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
-                  Filter Operator
-                    predicate: (d_date_sk is not null and d_month_seq BETWEEN 
1212 AND 1223) (type: boolean)
-                    Statistics: Num rows: 8116 Data size: 9081804 Basic stats: 
COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: d_date_sk (type: int)
-                      outputColumnNames: _col0
-                      Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
-                      Spark HashTable Sink Operator
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-            Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
-
   Stage: Stage-1
     Spark
       Edges:
-        Reducer 2 <- Map 1 (GROUP, 437)
-        Reducer 3 <- Map 10 (PARTITION-LEVEL SORT, 328), Reducer 2 
(PARTITION-LEVEL SORT, 328), Reducer 8 (PARTITION-LEVEL SORT, 328)
-        Reducer 4 <- Map 11 (PARTITION-LEVEL SORT, 166), Reducer 3 
(PARTITION-LEVEL SORT, 166)
-        Reducer 5 <- Reducer 4 (SORT, 1)
-        Reducer 8 <- Map 7 (GROUP PARTITION-LEVEL SORT, 437)
+        Reducer 10 <- Reducer 9 (GROUP PARTITION-LEVEL SORT, 437)
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 398), Map 7 (PARTITION-LEVEL 
SORT, 398)
+        Reducer 3 <- Reducer 2 (GROUP, 437)
+        Reducer 4 <- Map 12 (PARTITION-LEVEL SORT, 328), Reducer 10 
(PARTITION-LEVEL SORT, 328), Reducer 3 (PARTITION-LEVEL SORT, 328)
+        Reducer 5 <- Map 13 (PARTITION-LEVEL SORT, 166), Reducer 4 
(PARTITION-LEVEL SORT, 166)
+        Reducer 6 <- Reducer 5 (SORT, 1)
+        Reducer 9 <- Map 11 (PARTITION-LEVEL SORT, 398), Map 8 
(PARTITION-LEVEL SORT, 398)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
@@ -134,32 +84,33 @@ STAGE PLANS:
                       expressions: ss_sold_date_sk (type: int), ss_item_sk 
(type: int), ss_store_sk (type: int), ss_sales_price (type: decimal(7,2))
                       outputColumnNames: _col0, _col1, _col2, _col3
                       Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
-                      Map Join Operator
-                        condition map:
-                             Inner Join 0 to 1
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-                        outputColumnNames: _col1, _col2, _col3
-                        input vertices:
-                          1 Map 6
-                        Statistics: Num rows: 633595212 Data size: 55895953508 
Basic stats: COMPLETE Column stats: NONE
-                        Group By Operator
-                          aggregations: sum(_col3)
-                          keys: _col2 (type: int), _col1 (type: int)
-                          mode: hash
-                          outputColumnNames: _col0, _col1, _col2
-                          Statistics: Num rows: 633595212 Data size: 
55895953508 Basic stats: COMPLETE Column stats: NONE
-                          Reduce Output Operator
-                            key expressions: _col0 (type: int), _col1 (type: 
int)
-                            sort order: ++
-                            Map-reduce partition columns: _col0 (type: int), 
_col1 (type: int)
-                            Statistics: Num rows: 633595212 Data size: 
55895953508 Basic stats: COMPLETE Column stats: NONE
-                            value expressions: _col2 (type: decimal(17,2))
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: int), _col2 (type: 
int), _col3 (type: decimal(7,2))
+            Execution mode: vectorized
+        Map 11 
+            Map Operator Tree:
+                TableScan
+                  alias: date_dim
+                  filterExpr: (d_month_seq BETWEEN 1212 AND 1223 and d_date_sk 
is not null) (type: boolean)
+                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
+                  Filter Operator
+                    predicate: (d_date_sk is not null and d_month_seq BETWEEN 
1212 AND 1223) (type: boolean)
+                    Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
+                    Select Operator
+                      expressions: d_date_sk (type: int)
+                      outputColumnNames: _col0
+                      Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
             Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
-        Map 10 
+        Map 12 
             Map Operator Tree:
                 TableScan
                   alias: store
@@ -179,7 +130,7 @@ STAGE PLANS:
                         Statistics: Num rows: 1704 Data size: 3256276 Basic 
stats: COMPLETE Column stats: NONE
                         value expressions: _col1 (type: string)
             Execution mode: vectorized
-        Map 11 
+        Map 13 
             Map Operator Tree:
                 TableScan
                   alias: item
@@ -202,6 +153,25 @@ STAGE PLANS:
         Map 7 
             Map Operator Tree:
                 TableScan
+                  alias: date_dim
+                  filterExpr: (d_month_seq BETWEEN 1212 AND 1223 and d_date_sk 
is not null) (type: boolean)
+                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
+                  Filter Operator
+                    predicate: (d_date_sk is not null and d_month_seq BETWEEN 
1212 AND 1223) (type: boolean)
+                    Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
+                    Select Operator
+                      expressions: d_date_sk (type: int)
+                      outputColumnNames: _col0
+                      Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
+            Execution mode: vectorized
+        Map 8 
+            Map Operator Tree:
+                TableScan
                   alias: store_sales
                   filterExpr: (ss_sold_date_sk is not null and ss_store_sk is 
not null) (type: boolean)
                   Statistics: Num rows: 575995635 Data size: 50814502088 Basic 
stats: COMPLETE Column stats: NONE
@@ -212,32 +182,65 @@ STAGE PLANS:
                       expressions: ss_sold_date_sk (type: int), ss_item_sk 
(type: int), ss_store_sk (type: int), ss_sales_price (type: decimal(7,2))
                       outputColumnNames: _col0, _col1, _col2, _col3
                       Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
-                      Map Join Operator
-                        condition map:
-                             Inner Join 0 to 1
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-                        outputColumnNames: _col1, _col2, _col3
-                        input vertices:
-                          1 Map 9
-                        Statistics: Num rows: 633595212 Data size: 55895953508 
Basic stats: COMPLETE Column stats: NONE
-                        Group By Operator
-                          aggregations: sum(_col3)
-                          keys: _col2 (type: int), _col1 (type: int)
-                          mode: hash
-                          outputColumnNames: _col0, _col1, _col2
-                          Statistics: Num rows: 633595212 Data size: 
55895953508 Basic stats: COMPLETE Column stats: NONE
-                          Reduce Output Operator
-                            key expressions: _col0 (type: int), _col1 (type: 
int)
-                            sort order: ++
-                            Map-reduce partition columns: _col0 (type: int)
-                            Statistics: Num rows: 633595212 Data size: 
55895953508 Basic stats: COMPLETE Column stats: NONE
-                            value expressions: _col2 (type: decimal(17,2))
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: int), _col2 (type: 
int), _col3 (type: decimal(7,2))
             Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
+        Reducer 10 
+            Execution mode: vectorized
+            Reduce Operator Tree:
+              Group By Operator
+                aggregations: sum(VALUE._col0)
+                keys: KEY._col0 (type: int), KEY._col1 (type: int)
+                mode: mergepartial
+                outputColumnNames: _col0, _col1, _col2
+                Statistics: Num rows: 316797606 Data size: 27947976754 Basic 
stats: COMPLETE Column stats: NONE
+                Select Operator
+                  expressions: _col0 (type: int), _col2 (type: decimal(17,2))
+                  outputColumnNames: _col1, _col2
+                  Statistics: Num rows: 316797606 Data size: 27947976754 Basic 
stats: COMPLETE Column stats: NONE
+                  Group By Operator
+                    aggregations: sum(_col2), count(_col2)
+                    keys: _col1 (type: int)
+                    mode: complete
+                    outputColumnNames: _col0, _col1, _col2
+                    Statistics: Num rows: 158398803 Data size: 13973988377 
Basic stats: COMPLETE Column stats: NONE
+                    Select Operator
+                      expressions: _col0 (type: int), (_col1 / _col2) (type: 
decimal(38,13))
+                      outputColumnNames: _col0, _col1
+                      Statistics: Num rows: 158398803 Data size: 13973988377 
Basic stats: COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 158398803 Data size: 13973988377 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: decimal(38,13))
         Reducer 2 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                keys:
+                  0 _col0 (type: int)
+                  1 _col0 (type: int)
+                outputColumnNames: _col1, _col2, _col3
+                Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
+                Group By Operator
+                  aggregations: sum(_col3)
+                  keys: _col2 (type: int), _col1 (type: int)
+                  mode: hash
+                  outputColumnNames: _col0, _col1, _col2
+                  Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: int), _col1 (type: int)
+                    sort order: ++
+                    Map-reduce partition columns: _col0 (type: int), _col1 
(type: int)
+                    Statistics: Num rows: 633595212 Data size: 55895953508 
Basic stats: COMPLETE Column stats: NONE
+                    value expressions: _col2 (type: decimal(17,2))
+        Reducer 3 
             Execution mode: vectorized
             Reduce Operator Tree:
               Group By Operator
@@ -252,7 +255,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: int)
                   Statistics: Num rows: 316797606 Data size: 27947976754 Basic 
stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: int), _col2 (type: 
decimal(17,2))
-        Reducer 3 
+        Reducer 4 
             Reduce Operator Tree:
               Join Operator
                 condition map:
@@ -273,7 +276,7 @@ STAGE PLANS:
                     Map-reduce partition columns: _col1 (type: int)
                     Statistics: Num rows: 232318249 Data size: 20495183367 
Basic stats: COMPLETE Column stats: NONE
                     value expressions: _col2 (type: decimal(17,2)), _col6 
(type: string)
-        Reducer 4 
+        Reducer 5 
             Reduce Operator Tree:
               Join Operator
                 condition map:
@@ -293,7 +296,7 @@ STAGE PLANS:
                     Statistics: Num rows: 255550079 Data size: 22544702192 
Basic stats: COMPLETE Column stats: NONE
                     TopN Hash Memory Usage: 0.1
                     value expressions: _col2 (type: decimal(17,2)), _col3 
(type: decimal(7,2)), _col4 (type: decimal(7,2)), _col5 (type: string)
-        Reducer 5 
+        Reducer 6 
             Execution mode: vectorized
             Reduce Operator Tree:
               Select Operator
@@ -310,35 +313,28 @@ 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 8 
-            Execution mode: vectorized
+        Reducer 9 
             Reduce Operator Tree:
-              Group By Operator
-                aggregations: sum(VALUE._col0)
-                keys: KEY._col0 (type: int), KEY._col1 (type: int)
-                mode: mergepartial
-                outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 316797606 Data size: 27947976754 Basic 
stats: COMPLETE Column stats: NONE
-                Select Operator
-                  expressions: _col0 (type: int), _col2 (type: decimal(17,2))
-                  outputColumnNames: _col1, _col2
-                  Statistics: Num rows: 316797606 Data size: 27947976754 Basic 
stats: COMPLETE Column stats: NONE
-                  Group By Operator
-                    aggregations: sum(_col2), count(_col2)
-                    keys: _col1 (type: int)
-                    mode: complete
-                    outputColumnNames: _col0, _col1, _col2
-                    Statistics: Num rows: 158398803 Data size: 13973988377 
Basic stats: COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: _col0 (type: int), (_col1 / _col2) (type: 
decimal(38,13))
-                      outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 158398803 Data size: 13973988377 
Basic stats: COMPLETE Column stats: NONE
-                      Reduce Output Operator
-                        key expressions: _col0 (type: int)
-                        sort order: +
-                        Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 158398803 Data size: 13973988377 
Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col1 (type: decimal(38,13))
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                keys:
+                  0 _col0 (type: int)
+                  1 _col0 (type: int)
+                outputColumnNames: _col1, _col2, _col3
+                Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
+                Group By Operator
+                  aggregations: sum(_col3)
+                  keys: _col2 (type: int), _col1 (type: int)
+                  mode: hash
+                  outputColumnNames: _col0, _col1, _col2
+                  Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: int), _col1 (type: int)
+                    sort order: ++
+                    Map-reduce partition columns: _col0 (type: int)
+                    Statistics: Num rows: 633595212 Data size: 55895953508 
Basic stats: COMPLETE Column stats: NONE
+                    value expressions: _col2 (type: decimal(17,2))
 
   Stage: Stage-0
     Fetch Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/e74eb354/ql/src/test/results/clientpositive/perf/spark/query67.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query67.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query67.q.out
index db91e67..597a468 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query67.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query67.q.out
@@ -153,16 +153,16 @@ STAGE PLANS:
                   Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: (d_date_sk is not null and d_month_seq BETWEEN 
1212 AND 1223) (type: boolean)
-                    Statistics: Num rows: 8116 Data size: 9081804 Basic stats: 
COMPLETE Column stats: NONE
+                    Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: d_date_sk (type: int), d_year (type: int), 
d_moy (type: int), d_qoy (type: int)
                       outputColumnNames: _col0, _col2, _col3, _col4
-                      Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
                         value expressions: _col2 (type: int), _col3 (type: 
int), _col4 (type: int)
             Execution mode: vectorized
         Map 9 

http://git-wip-us.apache.org/repos/asf/hive/blob/e74eb354/ql/src/test/results/clientpositive/perf/spark/query68.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query68.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query68.q.out
index f2e6763..20436e7 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query68.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query68.q.out
@@ -170,16 +170,16 @@ STAGE PLANS:
                   Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: ((d_year) IN (1998, 1999, 2000) and d_date_sk 
is not null and d_dom BETWEEN 1 AND 2) (type: boolean)
-                    Statistics: Num rows: 8116 Data size: 9081804 Basic stats: 
COMPLETE Column stats: NONE
+                    Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: d_date_sk (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
             Execution mode: vectorized
         Map 13 
             Map Operator Tree:

http://git-wip-us.apache.org/repos/asf/hive/blob/e74eb354/ql/src/test/results/clientpositive/perf/spark/query69.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query69.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query69.q.out
index e17832c..0498aa3 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query69.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query69.q.out
@@ -91,97 +91,22 @@ select
  limit 100
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-2 is a root stage
-  Stage-3 depends on stages: Stage-2
-  Stage-4 depends on stages: Stage-3
-  Stage-1 depends on stages: Stage-4
+  Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
-  Stage: Stage-2
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 11 
-            Map Operator Tree:
-                TableScan
-                  alias: date_dim
-                  filterExpr: ((d_year = 1999) and d_moy BETWEEN 1 AND 3 and 
d_date_sk is not null) (type: boolean)
-                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
-                  Filter Operator
-                    predicate: ((d_year = 1999) and d_date_sk is not null and 
d_moy BETWEEN 1 AND 3) (type: boolean)
-                    Statistics: Num rows: 4058 Data size: 4540902 Basic stats: 
COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: d_date_sk (type: int)
-                      outputColumnNames: _col0
-                      Statistics: Num rows: 4058 Data size: 4540902 Basic 
stats: COMPLETE Column stats: NONE
-                      Spark HashTable Sink Operator
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-            Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
-
-  Stage: Stage-3
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 14 
-            Map Operator Tree:
-                TableScan
-                  alias: date_dim
-                  filterExpr: ((d_year = 1999) and d_moy BETWEEN 1 AND 3 and 
d_date_sk is not null) (type: boolean)
-                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
-                  Filter Operator
-                    predicate: ((d_year = 1999) and d_date_sk is not null and 
d_moy BETWEEN 1 AND 3) (type: boolean)
-                    Statistics: Num rows: 4058 Data size: 4540902 Basic stats: 
COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: d_date_sk (type: int)
-                      outputColumnNames: _col0
-                      Statistics: Num rows: 4058 Data size: 4540902 Basic 
stats: COMPLETE Column stats: NONE
-                      Spark HashTable Sink Operator
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-            Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
-
-  Stage: Stage-4
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 17 
-            Map Operator Tree:
-                TableScan
-                  alias: date_dim
-                  filterExpr: ((d_year = 1999) and d_moy BETWEEN 1 AND 3 and 
d_date_sk is not null) (type: boolean)
-                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
-                  Filter Operator
-                    predicate: ((d_year = 1999) and d_date_sk is not null and 
d_moy BETWEEN 1 AND 3) (type: boolean)
-                    Statistics: Num rows: 4058 Data size: 4540902 Basic stats: 
COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: d_date_sk (type: int)
-                      outputColumnNames: _col0
-                      Statistics: Num rows: 4058 Data size: 4540902 Basic 
stats: COMPLETE Column stats: NONE
-                      Spark HashTable Sink Operator
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-            Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
-
   Stage: Stage-1
     Spark
       Edges:
-        Reducer 13 <- Map 12 (GROUP, 169)
-        Reducer 16 <- Map 15 (GROUP, 336)
+        Reducer 11 <- Map 10 (PARTITION-LEVEL SORT, 398), Map 12 
(PARTITION-LEVEL SORT, 398)
+        Reducer 14 <- Map 13 (PARTITION-LEVEL SORT, 154), Map 16 
(PARTITION-LEVEL SORT, 154)
+        Reducer 15 <- Reducer 14 (GROUP, 169)
+        Reducer 18 <- Map 17 (PARTITION-LEVEL SORT, 306), Map 20 
(PARTITION-LEVEL SORT, 306)
+        Reducer 19 <- Reducer 18 (GROUP, 336)
         Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 855), Map 8 (PARTITION-LEVEL 
SORT, 855)
         Reducer 3 <- Map 9 (PARTITION-LEVEL SORT, 597), Reducer 2 
(PARTITION-LEVEL SORT, 597)
-        Reducer 4 <- Map 10 (PARTITION-LEVEL SORT, 1009), Reducer 13 
(PARTITION-LEVEL SORT, 1009), Reducer 3 (PARTITION-LEVEL SORT, 1009)
-        Reducer 5 <- Reducer 16 (PARTITION-LEVEL SORT, 648), Reducer 4 
(PARTITION-LEVEL SORT, 648)
+        Reducer 4 <- Reducer 11 (PARTITION-LEVEL SORT, 1009), Reducer 15 
(PARTITION-LEVEL SORT, 1009), Reducer 3 (PARTITION-LEVEL SORT, 1009)
+        Reducer 5 <- Reducer 19 (PARTITION-LEVEL SORT, 648), Reducer 4 
(PARTITION-LEVEL SORT, 648)
         Reducer 6 <- Reducer 5 (GROUP, 265)
         Reducer 7 <- Reducer 6 (SORT, 1)
 #### A masked pattern was here ####
@@ -219,36 +144,35 @@ STAGE PLANS:
                       expressions: ss_sold_date_sk (type: int), ss_customer_sk 
(type: int)
                       outputColumnNames: _col0, _col1
                       Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
-                      Map Join Operator
-                        condition map:
-                             Inner Join 0 to 1
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-                        outputColumnNames: _col1
-                        input vertices:
-                          1 Map 11
-                        Statistics: Num rows: 633595212 Data size: 55895953508 
Basic stats: COMPLETE Column stats: NONE
-                        Select Operator
-                          expressions: _col1 (type: int)
-                          outputColumnNames: _col0
-                          Statistics: Num rows: 633595212 Data size: 
55895953508 Basic stats: COMPLETE Column stats: NONE
-                          Group By Operator
-                            keys: _col0 (type: int)
-                            mode: hash
-                            outputColumnNames: _col0
-                            Statistics: Num rows: 633595212 Data size: 
55895953508 Basic stats: COMPLETE Column stats: NONE
-                            Reduce Output Operator
-                              key expressions: _col0 (type: int)
-                              sort order: +
-                              Map-reduce partition columns: _col0 (type: int)
-                              Statistics: Num rows: 633595212 Data size: 
55895953508 Basic stats: COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: int)
             Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
         Map 12 
             Map Operator Tree:
                 TableScan
+                  alias: date_dim
+                  filterExpr: ((d_year = 1999) and d_moy BETWEEN 1 AND 3 and 
d_date_sk is not null) (type: boolean)
+                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
+                  Filter Operator
+                    predicate: ((d_year = 1999) and d_date_sk is not null and 
d_moy BETWEEN 1 AND 3) (type: boolean)
+                    Statistics: Num rows: 36524 Data size: 40870356 Basic 
stats: COMPLETE Column stats: NONE
+                    Select Operator
+                      expressions: d_date_sk (type: int)
+                      outputColumnNames: _col0
+                      Statistics: Num rows: 36524 Data size: 40870356 Basic 
stats: COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 36524 Data size: 40870356 Basic 
stats: COMPLETE Column stats: NONE
+            Execution mode: vectorized
+        Map 13 
+            Map Operator Tree:
+                TableScan
                   alias: web_sales
                   filterExpr: (ws_bill_customer_sk is not null and 
ws_sold_date_sk is not null) (type: boolean)
                   Statistics: Num rows: 144002668 Data size: 19580198212 Basic 
stats: COMPLETE Column stats: NONE
@@ -259,30 +183,33 @@ STAGE PLANS:
                       expressions: ws_sold_date_sk (type: int), 
ws_bill_customer_sk (type: int)
                       outputColumnNames: _col0, _col1
                       Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
-                      Map Join Operator
-                        condition map:
-                             Inner Join 0 to 1
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-                        outputColumnNames: _col1
-                        input vertices:
-                          1 Map 14
-                        Statistics: Num rows: 158402938 Data size: 21538218500 
Basic stats: COMPLETE Column stats: NONE
-                        Group By Operator
-                          keys: _col1 (type: int)
-                          mode: hash
-                          outputColumnNames: _col0
-                          Statistics: Num rows: 158402938 Data size: 
21538218500 Basic stats: COMPLETE Column stats: NONE
-                          Reduce Output Operator
-                            key expressions: _col0 (type: int)
-                            sort order: +
-                            Map-reduce partition columns: _col0 (type: int)
-                            Statistics: Num rows: 158402938 Data size: 
21538218500 Basic stats: COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: int)
             Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
-        Map 15 
+        Map 16 
+            Map Operator Tree:
+                TableScan
+                  alias: date_dim
+                  filterExpr: ((d_year = 1999) and d_moy BETWEEN 1 AND 3 and 
d_date_sk is not null) (type: boolean)
+                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
+                  Filter Operator
+                    predicate: ((d_year = 1999) and d_date_sk is not null and 
d_moy BETWEEN 1 AND 3) (type: boolean)
+                    Statistics: Num rows: 36524 Data size: 40870356 Basic 
stats: COMPLETE Column stats: NONE
+                    Select Operator
+                      expressions: d_date_sk (type: int)
+                      outputColumnNames: _col0
+                      Statistics: Num rows: 36524 Data size: 40870356 Basic 
stats: COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 36524 Data size: 40870356 Basic 
stats: COMPLETE Column stats: NONE
+            Execution mode: vectorized
+        Map 17 
             Map Operator Tree:
                 TableScan
                   alias: catalog_sales
@@ -295,29 +222,32 @@ STAGE PLANS:
                       expressions: cs_sold_date_sk (type: int), 
cs_ship_customer_sk (type: int)
                       outputColumnNames: _col0, _col1
                       Statistics: Num rows: 287989836 Data size: 38999608952 
Basic stats: COMPLETE Column stats: NONE
-                      Map Join Operator
-                        condition map:
-                             Inner Join 0 to 1
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-                        outputColumnNames: _col1
-                        input vertices:
-                          1 Map 17
-                        Statistics: Num rows: 316788826 Data size: 42899570777 
Basic stats: COMPLETE Column stats: NONE
-                        Group By Operator
-                          keys: _col1 (type: int)
-                          mode: hash
-                          outputColumnNames: _col0
-                          Statistics: Num rows: 316788826 Data size: 
42899570777 Basic stats: COMPLETE Column stats: NONE
-                          Reduce Output Operator
-                            key expressions: _col0 (type: int)
-                            sort order: +
-                            Map-reduce partition columns: _col0 (type: int)
-                            Statistics: Num rows: 316788826 Data size: 
42899570777 Basic stats: COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 287989836 Data size: 38999608952 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: int)
+            Execution mode: vectorized
+        Map 20 
+            Map Operator Tree:
+                TableScan
+                  alias: date_dim
+                  filterExpr: ((d_year = 1999) and d_moy BETWEEN 1 AND 3 and 
d_date_sk is not null) (type: boolean)
+                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
+                  Filter Operator
+                    predicate: ((d_year = 1999) and d_date_sk is not null and 
d_moy BETWEEN 1 AND 3) (type: boolean)
+                    Statistics: Num rows: 36524 Data size: 40870356 Basic 
stats: COMPLETE Column stats: NONE
+                    Select Operator
+                      expressions: d_date_sk (type: int)
+                      outputColumnNames: _col0
+                      Statistics: Num rows: 36524 Data size: 40870356 Basic 
stats: COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 36524 Data size: 40870356 Basic 
stats: COMPLETE Column stats: NONE
             Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
         Map 8 
             Map Operator Tree:
                 TableScan
@@ -357,7 +287,51 @@ STAGE PLANS:
                         Statistics: Num rows: 1861800 Data size: 717186159 
Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col1 (type: string), _col2 (type: 
string), _col3 (type: string), _col4 (type: int), _col5 (type: string)
             Execution mode: vectorized
-        Reducer 13 
+        Reducer 11 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                keys:
+                  0 _col0 (type: int)
+                  1 _col0 (type: int)
+                outputColumnNames: _col1
+                Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
+                Select Operator
+                  expressions: _col1 (type: int)
+                  outputColumnNames: _col0
+                  Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
+                  Group By Operator
+                    keys: _col0 (type: int)
+                    mode: hash
+                    outputColumnNames: _col0
+                    Statistics: Num rows: 633595212 Data size: 55895953508 
Basic stats: COMPLETE Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: _col0 (type: int)
+                      sort order: +
+                      Map-reduce partition columns: _col0 (type: int)
+                      Statistics: Num rows: 633595212 Data size: 55895953508 
Basic stats: COMPLETE Column stats: NONE
+        Reducer 14 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                keys:
+                  0 _col0 (type: int)
+                  1 _col0 (type: int)
+                outputColumnNames: _col1
+                Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
+                Group By Operator
+                  keys: _col1 (type: int)
+                  mode: hash
+                  outputColumnNames: _col0
+                  Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: int)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: int)
+                    Statistics: Num rows: 158402938 Data size: 21538218500 
Basic stats: COMPLETE Column stats: NONE
+        Reducer 15 
             Execution mode: vectorized
             Reduce Operator Tree:
               Group By Operator
@@ -375,7 +349,27 @@ STAGE PLANS:
                     Map-reduce partition columns: _col0 (type: int)
                     Statistics: Num rows: 79201469 Data size: 10769109250 
Basic stats: COMPLETE Column stats: NONE
                     value expressions: _col1 (type: boolean)
-        Reducer 16 
+        Reducer 18 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                keys:
+                  0 _col0 (type: int)
+                  1 _col0 (type: int)
+                outputColumnNames: _col1
+                Statistics: Num rows: 316788826 Data size: 42899570777 Basic 
stats: COMPLETE Column stats: NONE
+                Group By Operator
+                  keys: _col1 (type: int)
+                  mode: hash
+                  outputColumnNames: _col0
+                  Statistics: Num rows: 316788826 Data size: 42899570777 Basic 
stats: COMPLETE Column stats: NONE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: int)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: int)
+                    Statistics: Num rows: 316788826 Data size: 42899570777 
Basic stats: COMPLETE Column stats: NONE
+        Reducer 19 
             Execution mode: vectorized
             Reduce Operator Tree:
               Group By Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/e74eb354/ql/src/test/results/clientpositive/perf/spark/query70.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query70.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query70.q.out
index 4222b52..1603d48 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query70.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query70.q.out
@@ -170,16 +170,16 @@ STAGE PLANS:
                   Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: (d_date_sk is not null and d_month_seq BETWEEN 
1212 AND 1223) (type: boolean)
-                    Statistics: Num rows: 8116 Data size: 9081804 Basic stats: 
COMPLETE Column stats: NONE
+                    Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: d_date_sk (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
             Execution mode: vectorized
         Map 7 
             Map Operator Tree:
@@ -189,16 +189,16 @@ STAGE PLANS:
                   Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: (d_date_sk is not null and d_month_seq BETWEEN 
1212 AND 1223) (type: boolean)
-                    Statistics: Num rows: 8116 Data size: 9081804 Basic stats: 
COMPLETE Column stats: NONE
+                    Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: d_date_sk (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
             Execution mode: vectorized
         Map 9 
             Map Operator Tree:

http://git-wip-us.apache.org/repos/asf/hive/blob/e74eb354/ql/src/test/results/clientpositive/perf/spark/query73.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query73.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query73.q.out
index ddaca3d..81aea57 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query73.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query73.q.out
@@ -106,7 +106,7 @@ STAGE PLANS:
   Stage: Stage-1
     Spark
       Edges:
-        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 567), Reducer 6 
(PARTITION-LEVEL SORT, 567)
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 551), Reducer 6 
(PARTITION-LEVEL SORT, 551)
         Reducer 3 <- Reducer 2 (SORT, 1)
         Reducer 5 <- Map 4 (PARTITION-LEVEL SORT, 398), Map 7 (PARTITION-LEVEL 
SORT, 398)
         Reducer 6 <- Reducer 5 (GROUP, 529)
@@ -160,16 +160,16 @@ STAGE PLANS:
                   Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: ((d_year) IN (2000, 2001, 2002) and d_date_sk 
is not null and d_dom BETWEEN 1 AND 2) (type: boolean)
-                    Statistics: Num rows: 8116 Data size: 9081804 Basic stats: 
COMPLETE Column stats: NONE
+                    Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: d_date_sk (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
             Execution mode: vectorized
         Reducer 2 
             Reduce Operator Tree:
@@ -263,12 +263,12 @@ STAGE PLANS:
                   Statistics: Num rows: 383325119 Data size: 33817053293 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: _col2 BETWEEN 1 AND 5 (type: boolean)
-                    Statistics: Num rows: 42591679 Data size: 3757450287 Basic 
stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 19166256 Data size: 1690852669 Basic 
stats: COMPLETE Column stats: NONE
                     Reduce Output Operator
                       key expressions: _col1 (type: int)
                       sort order: +
                       Map-reduce partition columns: _col1 (type: int)
-                      Statistics: Num rows: 42591679 Data size: 3757450287 
Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 19166256 Data size: 1690852669 
Basic stats: COMPLETE Column stats: NONE
                       value expressions: _col0 (type: int), _col2 (type: 
bigint)
 
   Stage: Stage-0

http://git-wip-us.apache.org/repos/asf/hive/blob/e74eb354/ql/src/test/results/clientpositive/perf/spark/query79.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query79.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query79.q.out
index a83090f..1cab6f8 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query79.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query79.q.out
@@ -60,11 +60,11 @@ STAGE PLANS:
                   Statistics: Num rows: 1704 Data size: 3256276 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: (s_number_employees BETWEEN 200 AND 295 and 
s_store_sk is not null) (type: boolean)
-                    Statistics: Num rows: 189 Data size: 361171 Basic stats: 
COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1704 Data size: 3256276 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: s_store_sk (type: int), s_city (type: 
string)
                       outputColumnNames: _col0, _col2
-                      Statistics: Num rows: 189 Data size: 361171 Basic stats: 
COMPLETE Column stats: NONE
+                      Statistics: Num rows: 1704 Data size: 3256276 Basic 
stats: COMPLETE Column stats: NONE
                       Spark HashTable Sink Operator
                         keys:
                           0 _col4 (type: int)

http://git-wip-us.apache.org/repos/asf/hive/blob/e74eb354/ql/src/test/results/clientpositive/perf/spark/query86.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query86.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query86.q.out
index 1d1e4ef..8dc2827 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query86.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query86.q.out
@@ -49,43 +49,18 @@ select
  limit 100
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-2 is a root stage
-  Stage-1 depends on stages: Stage-2
+  Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
-  Stage: Stage-2
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 6 
-            Map Operator Tree:
-                TableScan
-                  alias: d1
-                  filterExpr: (d_month_seq BETWEEN 1212 AND 1223 and d_date_sk 
is not null) (type: boolean)
-                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
-                  Filter Operator
-                    predicate: (d_date_sk is not null and d_month_seq BETWEEN 
1212 AND 1223) (type: boolean)
-                    Statistics: Num rows: 8116 Data size: 9081804 Basic stats: 
COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: d_date_sk (type: int)
-                      outputColumnNames: _col0
-                      Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
-                      Spark HashTable Sink Operator
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-            Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
-
   Stage: Stage-1
     Spark
       Edges:
-        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 174), Map 7 (PARTITION-LEVEL 
SORT, 174)
-        Reducer 3 <- Reducer 2 (GROUP, 556)
-        Reducer 4 <- Reducer 3 (PARTITION-LEVEL SORT, 278)
-        Reducer 5 <- Reducer 4 (SORT, 1)
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 154), Map 7 (PARTITION-LEVEL 
SORT, 154)
+        Reducer 3 <- Map 8 (PARTITION-LEVEL SORT, 174), Reducer 2 
(PARTITION-LEVEL SORT, 174)
+        Reducer 4 <- Reducer 3 (GROUP, 556)
+        Reducer 5 <- Reducer 4 (PARTITION-LEVEL SORT, 278)
+        Reducer 6 <- Reducer 5 (SORT, 1)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
@@ -101,28 +76,35 @@ STAGE PLANS:
                       expressions: ws_sold_date_sk (type: int), ws_item_sk 
(type: int), ws_net_paid (type: decimal(7,2))
                       outputColumnNames: _col0, _col1, _col2
                       Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
-                      Map Join Operator
-                        condition map:
-                             Inner Join 0 to 1
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-                        outputColumnNames: _col1, _col2
-                        input vertices:
-                          1 Map 6
-                        Statistics: Num rows: 158402938 Data size: 21538218500 
Basic stats: COMPLETE Column stats: NONE
-                        Reduce Output Operator
-                          key expressions: _col1 (type: int)
-                          sort order: +
-                          Map-reduce partition columns: _col1 (type: int)
-                          Statistics: Num rows: 158402938 Data size: 
21538218500 Basic stats: COMPLETE Column stats: NONE
-                          value expressions: _col2 (type: decimal(7,2))
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: int), _col2 (type: 
decimal(7,2))
             Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
         Map 7 
             Map Operator Tree:
                 TableScan
+                  alias: d1
+                  filterExpr: (d_month_seq BETWEEN 1212 AND 1223 and d_date_sk 
is not null) (type: boolean)
+                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
+                  Filter Operator
+                    predicate: (d_date_sk is not null and d_month_seq BETWEEN 
1212 AND 1223) (type: boolean)
+                    Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
+                    Select Operator
+                      expressions: d_date_sk (type: int)
+                      outputColumnNames: _col0
+                      Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
+            Execution mode: vectorized
+        Map 8 
+            Map Operator Tree:
+                TableScan
                   alias: item
                   filterExpr: i_item_sk is not null (type: boolean)
                   Statistics: Num rows: 462000 Data size: 663560457 Basic 
stats: COMPLETE Column stats: NONE
@@ -146,6 +128,22 @@ STAGE PLANS:
                 condition map:
                      Inner Join 0 to 1
                 keys:
+                  0 _col0 (type: int)
+                  1 _col0 (type: int)
+                outputColumnNames: _col1, _col2
+                Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col1 (type: int)
+                  sort order: +
+                  Map-reduce partition columns: _col1 (type: int)
+                  Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
+                  value expressions: _col2 (type: decimal(7,2))
+        Reducer 3 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col2, _col6, _col7
@@ -166,7 +164,7 @@ STAGE PLANS:
                       Map-reduce partition columns: _col0 (type: string), 
_col1 (type: string), _col2 (type: bigint)
                       Statistics: Num rows: 522729705 Data size: 71076122589 
Basic stats: COMPLETE Column stats: NONE
                       value expressions: _col3 (type: decimal(17,2))
-        Reducer 3 
+        Reducer 4 
             Execution mode: vectorized
             Reduce Operator Tree:
               Group By Operator
@@ -185,7 +183,7 @@ STAGE PLANS:
                     Map-reduce partition columns: (grouping(_col3, 1) + 
grouping(_col3, 0)) (type: bigint), CASE WHEN ((grouping(_col3, 0) = 0)) THEN 
(_col0) ELSE (CAST( null AS STRING)) END (type: string)
                     Statistics: Num rows: 261364852 Data size: 35538061226 
Basic stats: COMPLETE Column stats: NONE
                     value expressions: _col0 (type: string), _col1 (type: 
string), _col3 (type: bigint)
-        Reducer 4 
+        Reducer 5 
             Execution mode: vectorized
             Reduce Operator Tree:
               Select Operator
@@ -223,7 +221,7 @@ STAGE PLANS:
                       Statistics: Num rows: 261364852 Data size: 35538061226 
Basic stats: COMPLETE Column stats: NONE
                       TopN Hash Memory Usage: 0.1
                       value expressions: _col0 (type: decimal(17,2)), _col1 
(type: string), _col2 (type: string)
-        Reducer 5 
+        Reducer 6 
             Execution mode: vectorized
             Reduce Operator Tree:
               Select Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/e74eb354/ql/src/test/results/clientpositive/perf/spark/query87.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query87.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query87.q.out
index 8ac6dce..5948e56 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query87.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query87.q.out
@@ -41,68 +41,68 @@ from ((select distinct c_last_name, c_first_name, d_date
 ) cool_cust
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-2 is a root stage
-  Stage-3 depends on stages: Stage-2
-  Stage-4 depends on stages: Stage-3
-  Stage-1 depends on stages: Stage-4
+  Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
-  Stage: Stage-2
+  Stage: Stage-1
     Spark
+      Edges:
+        Reducer 11 <- Map 10 (PARTITION-LEVEL SORT, 306), Map 14 
(PARTITION-LEVEL SORT, 306)
+        Reducer 12 <- Map 15 (PARTITION-LEVEL SORT, 873), Reducer 11 
(PARTITION-LEVEL SORT, 873)
+        Reducer 13 <- Reducer 12 (GROUP PARTITION-LEVEL SORT, 369)
+        Reducer 17 <- Map 14 (PARTITION-LEVEL SORT, 154), Map 16 
(PARTITION-LEVEL SORT, 154)
+        Reducer 18 <- Map 15 (PARTITION-LEVEL SORT, 706), Reducer 17 
(PARTITION-LEVEL SORT, 706)
+        Reducer 19 <- Reducer 18 (GROUP PARTITION-LEVEL SORT, 186)
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 398), Map 14 
(PARTITION-LEVEL SORT, 398)
+        Reducer 3 <- Map 15 (PARTITION-LEVEL SORT, 975), Reducer 2 
(PARTITION-LEVEL SORT, 975)
+        Reducer 4 <- Reducer 3 (GROUP PARTITION-LEVEL SORT, 481)
+        Reducer 5 <- Reducer 13 (GROUP PARTITION-LEVEL SORT, 213), Reducer 4 
(GROUP PARTITION-LEVEL SORT, 213)
+        Reducer 6 <- Reducer 19 (GROUP, 56), Reducer 5 (GROUP, 56)
+        Reducer 7 <- Reducer 6 (GROUP, 1)
 #### A masked pattern was here ####
       Vertices:
-        Map 7 
+        Map 1 
             Map Operator Tree:
                 TableScan
-                  alias: date_dim
-                  filterExpr: (d_month_seq BETWEEN 1212 AND 1223 and d_date_sk 
is not null) (type: boolean)
-                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
+                  alias: store_sales
+                  filterExpr: (ss_sold_date_sk is not null and ss_customer_sk 
is not null) (type: boolean)
+                  Statistics: Num rows: 575995635 Data size: 50814502088 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (d_date_sk is not null and d_month_seq BETWEEN 
1212 AND 1223) (type: boolean)
-                    Statistics: Num rows: 8116 Data size: 9081804 Basic stats: 
COMPLETE Column stats: NONE
+                    predicate: (ss_customer_sk is not null and ss_sold_date_sk 
is not null) (type: boolean)
+                    Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: d_date_sk (type: int), d_date (type: string)
+                      expressions: ss_sold_date_sk (type: int), ss_customer_sk 
(type: int)
                       outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
-                      Spark HashTable Sink Operator
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
+                      Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: int)
             Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
-
-  Stage: Stage-3
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 12 
+        Map 10 
             Map Operator Tree:
                 TableScan
-                  alias: date_dim
-                  filterExpr: (d_month_seq BETWEEN 1212 AND 1223 and d_date_sk 
is not null) (type: boolean)
-                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
+                  alias: catalog_sales
+                  filterExpr: (cs_sold_date_sk is not null and 
cs_bill_customer_sk is not null) (type: boolean)
+                  Statistics: Num rows: 287989836 Data size: 38999608952 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (d_date_sk is not null and d_month_seq BETWEEN 
1212 AND 1223) (type: boolean)
-                    Statistics: Num rows: 8116 Data size: 9081804 Basic stats: 
COMPLETE Column stats: NONE
+                    predicate: (cs_bill_customer_sk is not null and 
cs_sold_date_sk is not null) (type: boolean)
+                    Statistics: Num rows: 287989836 Data size: 38999608952 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: d_date_sk (type: int), d_date (type: string)
+                      expressions: cs_sold_date_sk (type: int), 
cs_bill_customer_sk (type: int)
                       outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
-                      Spark HashTable Sink Operator
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
+                      Statistics: Num rows: 287989836 Data size: 38999608952 
Basic stats: COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 287989836 Data size: 38999608952 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: int)
             Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
-
-  Stage: Stage-4
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 17 
+        Map 14 
             Map Operator Tree:
                 TableScan
                   alias: date_dim
@@ -110,66 +110,19 @@ STAGE PLANS:
                   Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: (d_date_sk is not null and d_month_seq BETWEEN 
1212 AND 1223) (type: boolean)
-                    Statistics: Num rows: 8116 Data size: 9081804 Basic stats: 
COMPLETE Column stats: NONE
+                    Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: d_date_sk (type: int), d_date (type: string)
                       outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
-                      Spark HashTable Sink Operator
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-            Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
-
-  Stage: Stage-1
-    Spark
-      Edges:
-        Reducer 10 <- Map 13 (PARTITION-LEVEL SORT, 873), Map 9 
(PARTITION-LEVEL SORT, 873)
-        Reducer 11 <- Reducer 10 (GROUP PARTITION-LEVEL SORT, 369)
-        Reducer 15 <- Map 13 (PARTITION-LEVEL SORT, 706), Map 14 
(PARTITION-LEVEL SORT, 706)
-        Reducer 16 <- Reducer 15 (GROUP PARTITION-LEVEL SORT, 186)
-        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 975), Map 13 
(PARTITION-LEVEL SORT, 975)
-        Reducer 3 <- Reducer 2 (GROUP PARTITION-LEVEL SORT, 481)
-        Reducer 4 <- Reducer 11 (GROUP PARTITION-LEVEL SORT, 213), Reducer 3 
(GROUP PARTITION-LEVEL SORT, 213)
-        Reducer 5 <- Reducer 16 (GROUP, 56), Reducer 4 (GROUP, 56)
-        Reducer 6 <- Reducer 5 (GROUP, 1)
-#### A masked pattern was here ####
-      Vertices:
-        Map 1 
-            Map Operator Tree:
-                TableScan
-                  alias: store_sales
-                  filterExpr: (ss_sold_date_sk is not null and ss_customer_sk 
is not null) (type: boolean)
-                  Statistics: Num rows: 575995635 Data size: 50814502088 Basic 
stats: COMPLETE Column stats: NONE
-                  Filter Operator
-                    predicate: (ss_customer_sk is not null and ss_sold_date_sk 
is not null) (type: boolean)
-                    Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: ss_sold_date_sk (type: int), ss_customer_sk 
(type: int)
-                      outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
-                      Map Join Operator
-                        condition map:
-                             Inner Join 0 to 1
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-                        outputColumnNames: _col1, _col3
-                        input vertices:
-                          1 Map 7
-                        Statistics: Num rows: 633595212 Data size: 55895953508 
Basic stats: COMPLETE Column stats: NONE
-                        Reduce Output Operator
-                          key expressions: _col1 (type: int)
-                          sort order: +
-                          Map-reduce partition columns: _col1 (type: int)
-                          Statistics: Num rows: 633595212 Data size: 
55895953508 Basic stats: COMPLETE Column stats: NONE
-                          value expressions: _col3 (type: string)
+                      Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 73049 Data size: 81741831 Basic 
stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: string)
             Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
-        Map 13 
+        Map 15 
             Map Operator Tree:
                 TableScan
                   alias: customer
@@ -189,7 +142,7 @@ STAGE PLANS:
                         Statistics: Num rows: 80000000 Data size: 68801615852 
Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col1 (type: string), _col2 (type: 
string)
             Execution mode: vectorized
-        Map 14 
+        Map 16 
             Map Operator Tree:
                 TableScan
                   alias: web_sales
@@ -202,58 +155,30 @@ STAGE PLANS:
                       expressions: ws_sold_date_sk (type: int), 
ws_bill_customer_sk (type: int)
                       outputColumnNames: _col0, _col1
                       Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
-                      Map Join Operator
-                        condition map:
-                             Inner Join 0 to 1
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-                        outputColumnNames: _col1, _col3
-                        input vertices:
-                          1 Map 17
-                        Statistics: Num rows: 158402938 Data size: 21538218500 
Basic stats: COMPLETE Column stats: NONE
-                        Reduce Output Operator
-                          key expressions: _col1 (type: int)
-                          sort order: +
-                          Map-reduce partition columns: _col1 (type: int)
-                          Statistics: Num rows: 158402938 Data size: 
21538218500 Basic stats: COMPLETE Column stats: NONE
-                          value expressions: _col3 (type: string)
-            Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
-        Map 9 
-            Map Operator Tree:
-                TableScan
-                  alias: catalog_sales
-                  filterExpr: (cs_sold_date_sk is not null and 
cs_bill_customer_sk is not null) (type: boolean)
-                  Statistics: Num rows: 287989836 Data size: 38999608952 Basic 
stats: COMPLETE Column stats: NONE
-                  Filter Operator
-                    predicate: (cs_bill_customer_sk is not null and 
cs_sold_date_sk is not null) (type: boolean)
-                    Statistics: Num rows: 287989836 Data size: 38999608952 
Basic stats: COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: cs_sold_date_sk (type: int), 
cs_bill_customer_sk (type: int)
-                      outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 287989836 Data size: 38999608952 
Basic stats: COMPLETE Column stats: NONE
-                      Map Join Operator
-                        condition map:
-                             Inner Join 0 to 1
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-                        outputColumnNames: _col1, _col3
-                        input vertices:
-                          1 Map 12
-                        Statistics: Num rows: 316788826 Data size: 42899570777 
Basic stats: COMPLETE Column stats: NONE
-                        Reduce Output Operator
-                          key expressions: _col1 (type: int)
-                          sort order: +
-                          Map-reduce partition columns: _col1 (type: int)
-                          Statistics: Num rows: 316788826 Data size: 
42899570777 Basic stats: COMPLETE Column stats: NONE
-                          value expressions: _col3 (type: string)
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: int)
             Execution mode: vectorized
-            Local Work:
-              Map Reduce Local Work
-        Reducer 10 
+        Reducer 11 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                keys:
+                  0 _col0 (type: int)
+                  1 _col0 (type: int)
+                outputColumnNames: _col1, _col3
+                Statistics: Num rows: 316788826 Data size: 42899570777 Basic 
stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col1 (type: int)
+                  sort order: +
+                  Map-reduce partition columns: _col1 (type: int)
+                  Statistics: Num rows: 316788826 Data size: 42899570777 Basic 
stats: COMPLETE Column stats: NONE
+                  value expressions: _col3 (type: string)
+        Reducer 12 
             Reduce Operator Tree:
               Join Operator
                 condition map:
@@ -273,7 +198,7 @@ STAGE PLANS:
                     sort order: +++
                     Map-reduce partition columns: _col0 (type: string), _col1 
(type: string), _col2 (type: string)
                     Statistics: Num rows: 348467716 Data size: 47189528877 
Basic stats: COMPLETE Column stats: NONE
-        Reducer 11 
+        Reducer 13 
             Execution mode: vectorized
             Reduce Operator Tree:
               Group By Operator
@@ -311,7 +236,23 @@ STAGE PLANS:
                             Map-reduce partition columns: _col0 (type: 
string), _col1 (type: string), _col2 (type: string)
                             Statistics: Num rows: 261355616 Data size: 
27168769766 Basic stats: COMPLETE Column stats: NONE
                             value expressions: _col3 (type: bigint), _col4 
(type: bigint)
-        Reducer 15 
+        Reducer 17 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                keys:
+                  0 _col0 (type: int)
+                  1 _col0 (type: int)
+                outputColumnNames: _col1, _col3
+                Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col1 (type: int)
+                  sort order: +
+                  Map-reduce partition columns: _col1 (type: int)
+                  Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
+                  value expressions: _col3 (type: string)
+        Reducer 18 
             Reduce Operator Tree:
               Join Operator
                 condition map:
@@ -331,7 +272,7 @@ STAGE PLANS:
                     sort order: +++
                     Map-reduce partition columns: _col0 (type: string), _col1 
(type: string), _col2 (type: string)
                     Statistics: Num rows: 174243235 Data size: 23692040863 
Basic stats: COMPLETE Column stats: NONE
-        Reducer 16 
+        Reducer 19 
             Execution mode: vectorized
             Reduce Operator Tree:
               Group By Operator
@@ -375,6 +316,22 @@ STAGE PLANS:
                 condition map:
                      Inner Join 0 to 1
                 keys:
+                  0 _col0 (type: int)
+                  1 _col0 (type: int)
+                outputColumnNames: _col1, _col3
+                Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col1 (type: int)
+                  sort order: +
+                  Map-reduce partition columns: _col1 (type: int)
+                  Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
+                  value expressions: _col3 (type: string)
+        Reducer 3 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col3, _col6, _col7
@@ -389,7 +346,7 @@ STAGE PLANS:
                     sort order: +++
                     Map-reduce partition columns: _col0 (type: string), _col1 
(type: string), _col2 (type: string)
                     Statistics: Num rows: 696954748 Data size: 61485550191 
Basic stats: COMPLETE Column stats: NONE
-        Reducer 3 
+        Reducer 4 
             Execution mode: vectorized
             Reduce Operator Tree:
               Group By Operator
@@ -427,7 +384,7 @@ STAGE PLANS:
                             Map-reduce partition columns: _col0 (type: 
string), _col1 (type: string), _col2 (type: string)
                             Statistics: Num rows: 261355616 Data size: 
27168769766 Basic stats: COMPLETE Column stats: NONE
                             value expressions: _col3 (type: bigint), _col4 
(type: bigint)
-        Reducer 4 
+        Reducer 5 
             Execution mode: vectorized
             Reduce Operator Tree:
               Group By Operator
@@ -469,7 +426,7 @@ STAGE PLANS:
                               Map-reduce partition columns: _col0 (type: 
string), _col1 (type: string), _col2 (type: string)
                               Statistics: Num rows: 54450625 Data size: 
7055042151 Basic stats: COMPLETE Column stats: NONE
                               value expressions: _col3 (type: bigint), _col4 
(type: bigint)
-        Reducer 5 
+        Reducer 6 
             Execution mode: vectorized
             Reduce Operator Tree:
               Group By Operator
@@ -496,7 +453,7 @@ STAGE PLANS:
                           sort order: 
                           Statistics: Num rows: 1 Data size: 24 Basic stats: 
COMPLETE Column stats: NONE
                           value expressions: _col0 (type: bigint)
-        Reducer 6 
+        Reducer 7 
             Execution mode: vectorized
             Reduce Operator Tree:
               Group By Operator

Reply via email to