Modified: 
hive/branches/spark/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_1.q.out
URL: 
http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_1.q.out?rev=1642997&r1=1642996&r2=1642997&view=diff
==============================================================================
--- 
hive/branches/spark/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_1.q.out
 (original)
+++ 
hive/branches/spark/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_1.q.out
 Tue Dec  2 19:57:10 2014
@@ -61,122 +61,112 @@ EXPLAIN
 SELECT * FROM T1 a JOIN T2 b ON a.key = b.key
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-2 is a root stage
-  Stage-1 depends on stages: Stage-2, Stage-3
-  Stage-3 depends on stages: Stage-2
+  Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
-  Stage: Stage-2
+  Stage: Stage-1
     Spark
+      Edges:
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 1), Map 4 (PARTITION-LEVEL 
SORT, 1)
+        Reducer 6 <- Map 5 (PARTITION-LEVEL SORT, 1), Map 7 (PARTITION-LEVEL 
SORT, 1)
+        Union 3 <- Reducer 2 (NONE, 0), Reducer 6 (NONE, 0)
 #### A masked pattern was here ####
       Vertices:
-        Map 3 
+        Map 1 
             Map Operator Tree:
                 TableScan
-                  alias: b
+                  alias: a
                   Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (key is not null and ((key = '2') or (key = 
'3'))) (type: boolean)
                     Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 {key} {val}
-                        1 {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-            Local Work:
-              Map Reduce Local Work
-
-  Stage: Stage-1
-    Spark
-      Edges:
-        Union 2 <- Map 1 (NONE, 0), Map 5 (NONE, 0)
-#### A masked pattern was here ####
-      Vertices:
-        Map 1 
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 4 
             Map Operator Tree:
                 TableScan
-                  alias: a
+                  alias: b
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (key is not null and ((key = '2') or (key = 
'3'))) (type: boolean)
-                    Map Join Operator
-                      condition map:
-                           Inner Join 0 to 1
-                      condition expressions:
-                        0 {key} {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                      outputColumnNames: _col0, _col1, _col5, _col6
-                      input vertices:
-                        1 Map 3
-                      Select Operator
-                        expressions: _col0 (type: string), _col1 (type: 
string), _col5 (type: string), _col6 (type: string)
-                        outputColumnNames: _col0, _col1, _col2, _col3
-                        File Output Operator
-                          compressed: false
-                          table:
-                              input format: 
org.apache.hadoop.mapred.TextInputFormat
-                              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                              serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-            Local Work:
-              Map Reduce Local Work
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
         Map 5 
             Map Operator Tree:
                 TableScan
-                  alias: a
+                  alias: b
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (key is not null and (not ((key = '2') or (key 
= '3')))) (type: boolean)
-                    Map Join Operator
-                      condition map:
-                           Inner Join 0 to 1
-                      condition expressions:
-                        0 {key} {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                      outputColumnNames: _col0, _col1, _col5, _col6
-                      input vertices:
-                        1 Map 4
-                      Select Operator
-                        expressions: _col0 (type: string), _col1 (type: 
string), _col5 (type: string), _col6 (type: string)
-                        outputColumnNames: _col0, _col1, _col2, _col3
-                        File Output Operator
-                          compressed: false
-                          table:
-                              input format: 
org.apache.hadoop.mapred.TextInputFormat
-                              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                              serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-            Local Work:
-              Map Reduce Local Work
-        Union 2 
-            Vertex: Union 2
-
-  Stage: Stage-3
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 4 
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 7 
             Map Operator Tree:
                 TableScan
-                  alias: b
+                  alias: a
                   Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (key is not null and (not ((key = '2') or (key 
= '3')))) (type: boolean)
                     Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 {key} {val}
-                        1 {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-            Local Work:
-              Map Reduce Local Work
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Reducer 2 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                condition expressions:
+                  0 {KEY.reducesinkkey0} {VALUE._col0}
+                  1 {KEY.reducesinkkey0} {VALUE._col0}
+                outputColumnNames: _col0, _col1, _col5, _col6
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col5 (type: string), _col6 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3
+                  File Output Operator
+                    compressed: false
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+        Reducer 6 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                condition expressions:
+                  0 {KEY.reducesinkkey0} {VALUE._col0}
+                  1 {KEY.reducesinkkey0} {VALUE._col0}
+                outputColumnNames: _col0, _col1, _col5, _col6
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col5 (type: string), _col6 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3
+                  File Output Operator
+                    compressed: false
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+        Union 3 
+            Vertex: Union 3
 
   Stage: Stage-0
     Fetch Operator
@@ -213,14 +203,16 @@ EXPLAIN
 SELECT a.*, b.* FROM T1 a RIGHT OUTER JOIN T2 b ON a.key = b.key
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-2 is a root stage
-  Stage-1 depends on stages: Stage-2, Stage-3
-  Stage-3 depends on stages: Stage-2
+  Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
-  Stage: Stage-2
+  Stage: Stage-1
     Spark
+      Edges:
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 3), Map 4 (PARTITION-LEVEL 
SORT, 3)
+        Reducer 6 <- Map 5 (PARTITION-LEVEL SORT, 3), Map 7 (PARTITION-LEVEL 
SORT, 3)
+        Union 3 <- Reducer 2 (NONE, 0), Reducer 6 (NONE, 0)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
@@ -231,88 +223,41 @@ STAGE PLANS:
                   Filter Operator
                     predicate: ((key = '2') or (key = '3')) (type: boolean)
                     Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-            Local Work:
-              Map Reduce Local Work
-
-  Stage: Stage-1
-    Spark
-      Edges:
-        Union 3 <- Map 2 (NONE, 0), Map 4 (NONE, 0)
-#### A masked pattern was here ####
-      Vertices:
-        Map 2 
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 4 
             Map Operator Tree:
                 TableScan
                   alias: b
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: ((key = '2') or (key = '3')) (type: boolean)
-                    Map Join Operator
-                      condition map:
-                           Right Outer Join0 to 1
-                      condition expressions:
-                        0 {key} {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                      outputColumnNames: _col0, _col1, _col5, _col6
-                      input vertices:
-                        0 Map 1
-                      Select Operator
-                        expressions: _col0 (type: string), _col1 (type: 
string), _col5 (type: string), _col6 (type: string)
-                        outputColumnNames: _col0, _col1, _col2, _col3
-                        File Output Operator
-                          compressed: false
-                          table:
-                              input format: 
org.apache.hadoop.mapred.TextInputFormat
-                              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                              serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-            Local Work:
-              Map Reduce Local Work
-        Map 4 
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 5 
             Map Operator Tree:
                 TableScan
                   alias: b
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (not ((key = '2') or (key = '3'))) (type: 
boolean)
-                    Map Join Operator
-                      condition map:
-                           Right Outer Join0 to 1
-                      condition expressions:
-                        0 {key} {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                      outputColumnNames: _col0, _col1, _col5, _col6
-                      input vertices:
-                        0 Map 5
-                      Select Operator
-                        expressions: _col0 (type: string), _col1 (type: 
string), _col5 (type: string), _col6 (type: string)
-                        outputColumnNames: _col0, _col1, _col2, _col3
-                        File Output Operator
-                          compressed: false
-                          table:
-                              input format: 
org.apache.hadoop.mapred.TextInputFormat
-                              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                              serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-            Local Work:
-              Map Reduce Local Work
-        Union 3 
-            Vertex: Union 3
-
-  Stage: Stage-3
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 5 
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 7 
             Map Operator Tree:
                 TableScan
                   alias: a
@@ -320,15 +265,50 @@ STAGE PLANS:
                   Filter Operator
                     predicate: (not ((key = '2') or (key = '3'))) (type: 
boolean)
                     Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-            Local Work:
-              Map Reduce Local Work
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Reducer 2 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Right Outer Join0 to 1
+                condition expressions:
+                  0 {KEY.reducesinkkey0} {VALUE._col0}
+                  1 {KEY.reducesinkkey0} {VALUE._col0}
+                outputColumnNames: _col0, _col1, _col5, _col6
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col5 (type: string), _col6 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3
+                  File Output Operator
+                    compressed: false
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+        Reducer 6 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Right Outer Join0 to 1
+                condition expressions:
+                  0 {KEY.reducesinkkey0} {VALUE._col0}
+                  1 {KEY.reducesinkkey0} {VALUE._col0}
+                outputColumnNames: _col0, _col1, _col5, _col6
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col5 (type: string), _col6 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3
+                  File Output Operator
+                    compressed: false
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+        Union 3 
+            Vertex: Union 3
 
   Stage: Stage-0
     Fetch Operator
@@ -373,102 +353,114 @@ INSERT OVERWRITE TABLE DEST1
 SELECT * FROM T1 a JOIN T2 b ON a.key = b.key
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-2 is a root stage
-  Stage-1 depends on stages: Stage-2, Stage-3
+  Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
-  Stage-3 depends on stages: Stage-2
 
 STAGE PLANS:
-  Stage: Stage-2
+  Stage: Stage-1
     Spark
+      Edges:
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 3), Map 4 (PARTITION-LEVEL 
SORT, 3)
+        Reducer 6 <- Map 5 (PARTITION-LEVEL SORT, 3), Map 7 (PARTITION-LEVEL 
SORT, 3)
+        Union 3 <- Reducer 2 (NONE, 0), Reducer 6 (NONE, 0)
 #### A masked pattern was here ####
       Vertices:
-        Map 3 
+        Map 1 
             Map Operator Tree:
                 TableScan
-                  alias: b
+                  alias: a
                   Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (key is not null and ((key = '2') or (key = 
'3'))) (type: boolean)
                     Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 {key} {val}
-                        1 {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-            Local Work:
-              Map Reduce Local Work
-
-  Stage: Stage-1
-    Spark
-      Edges:
-        Union 2 <- Map 1 (NONE, 0), Map 5 (NONE, 0)
-#### A masked pattern was here ####
-      Vertices:
-        Map 1 
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 4 
             Map Operator Tree:
                 TableScan
-                  alias: a
+                  alias: b
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (key is not null and ((key = '2') or (key = 
'3'))) (type: boolean)
-                    Map Join Operator
-                      condition map:
-                           Inner Join 0 to 1
-                      condition expressions:
-                        0 {key} {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                      outputColumnNames: _col0, _col1, _col5, _col6
-                      input vertices:
-                        1 Map 3
-                      Select Operator
-                        expressions: _col0 (type: string), _col1 (type: 
string), _col5 (type: string), _col6 (type: string)
-                        outputColumnNames: _col0, _col1, _col2, _col3
-                        File Output Operator
-                          compressed: false
-                          table:
-                              input format: 
org.apache.hadoop.mapred.TextInputFormat
-                              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                              serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                              name: default.dest1
-            Local Work:
-              Map Reduce Local Work
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
         Map 5 
             Map Operator Tree:
                 TableScan
+                  alias: b
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
+                  Filter Operator
+                    predicate: (key is not null and (not ((key = '2') or (key 
= '3')))) (type: boolean)
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 7 
+            Map Operator Tree:
+                TableScan
                   alias: a
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (key is not null and (not ((key = '2') or (key 
= '3')))) (type: boolean)
-                    Map Join Operator
-                      condition map:
-                           Inner Join 0 to 1
-                      condition expressions:
-                        0 {key} {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                      outputColumnNames: _col0, _col1, _col5, _col6
-                      input vertices:
-                        1 Map 4
-                      Select Operator
-                        expressions: _col0 (type: string), _col1 (type: 
string), _col5 (type: string), _col6 (type: string)
-                        outputColumnNames: _col0, _col1, _col2, _col3
-                        File Output Operator
-                          compressed: false
-                          table:
-                              input format: 
org.apache.hadoop.mapred.TextInputFormat
-                              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                              serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                              name: default.dest1
-            Local Work:
-              Map Reduce Local Work
-        Union 2 
-            Vertex: Union 2
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Reducer 2 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                condition expressions:
+                  0 {KEY.reducesinkkey0} {VALUE._col0}
+                  1 {KEY.reducesinkkey0} {VALUE._col0}
+                outputColumnNames: _col0, _col1, _col5, _col6
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col5 (type: string), _col6 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3
+                  File Output Operator
+                    compressed: false
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        name: default.dest1
+        Reducer 6 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                condition expressions:
+                  0 {KEY.reducesinkkey0} {VALUE._col0}
+                  1 {KEY.reducesinkkey0} {VALUE._col0}
+                outputColumnNames: _col0, _col1, _col5, _col6
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col5 (type: string), _col6 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3
+                  File Output Operator
+                    compressed: false
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        name: default.dest1
+        Union 3 
+            Vertex: Union 3
 
   Stage: Stage-0
     Move Operator
@@ -480,28 +472,6 @@ STAGE PLANS:
               serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
               name: default.dest1
 
-  Stage: Stage-3
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 4 
-            Map Operator Tree:
-                TableScan
-                  alias: b
-                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
-                  Filter Operator
-                    predicate: (key is not null and (not ((key = '2') or (key 
= '3')))) (type: boolean)
-                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 {key} {val}
-                        1 {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-            Local Work:
-              Map Reduce Local Work
-
 PREHOOK: query: INSERT OVERWRITE TABLE DEST1
 SELECT * FROM T1 a JOIN T2 b ON a.key = b.key
 PREHOOK: type: QUERY
@@ -543,14 +513,16 @@ INSERT OVERWRITE TABLE DEST1
 SELECT * FROM T1 a RIGHT OUTER JOIN T2 b ON a.key = b.key
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-2 is a root stage
-  Stage-1 depends on stages: Stage-2, Stage-3
+  Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
-  Stage-3 depends on stages: Stage-2
 
 STAGE PLANS:
-  Stage: Stage-2
+  Stage: Stage-1
     Spark
+      Edges:
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 3), Map 4 (PARTITION-LEVEL 
SORT, 3)
+        Reducer 6 <- Map 5 (PARTITION-LEVEL SORT, 3), Map 7 (PARTITION-LEVEL 
SORT, 3)
+        Union 3 <- Reducer 2 (NONE, 0), Reducer 6 (NONE, 0)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
@@ -561,82 +533,92 @@ STAGE PLANS:
                   Filter Operator
                     predicate: ((key = '2') or (key = '3')) (type: boolean)
                     Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-            Local Work:
-              Map Reduce Local Work
-
-  Stage: Stage-1
-    Spark
-      Edges:
-        Union 3 <- Map 2 (NONE, 0), Map 4 (NONE, 0)
-#### A masked pattern was here ####
-      Vertices:
-        Map 2 
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 4 
             Map Operator Tree:
                 TableScan
                   alias: b
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: ((key = '2') or (key = '3')) (type: boolean)
-                    Map Join Operator
-                      condition map:
-                           Right Outer Join0 to 1
-                      condition expressions:
-                        0 {key} {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                      outputColumnNames: _col0, _col1, _col5, _col6
-                      input vertices:
-                        0 Map 1
-                      Select Operator
-                        expressions: _col0 (type: string), _col1 (type: 
string), _col5 (type: string), _col6 (type: string)
-                        outputColumnNames: _col0, _col1, _col2, _col3
-                        File Output Operator
-                          compressed: false
-                          table:
-                              input format: 
org.apache.hadoop.mapred.TextInputFormat
-                              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                              serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                              name: default.dest1
-            Local Work:
-              Map Reduce Local Work
-        Map 4 
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 5 
             Map Operator Tree:
                 TableScan
                   alias: b
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
+                  Filter Operator
+                    predicate: (not ((key = '2') or (key = '3'))) (type: 
boolean)
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 7 
+            Map Operator Tree:
+                TableScan
+                  alias: a
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (not ((key = '2') or (key = '3'))) (type: 
boolean)
-                    Map Join Operator
-                      condition map:
-                           Right Outer Join0 to 1
-                      condition expressions:
-                        0 {key} {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                      outputColumnNames: _col0, _col1, _col5, _col6
-                      input vertices:
-                        0 Map 5
-                      Select Operator
-                        expressions: _col0 (type: string), _col1 (type: 
string), _col5 (type: string), _col6 (type: string)
-                        outputColumnNames: _col0, _col1, _col2, _col3
-                        File Output Operator
-                          compressed: false
-                          table:
-                              input format: 
org.apache.hadoop.mapred.TextInputFormat
-                              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                              serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                              name: default.dest1
-            Local Work:
-              Map Reduce Local Work
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Reducer 2 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Right Outer Join0 to 1
+                condition expressions:
+                  0 {KEY.reducesinkkey0} {VALUE._col0}
+                  1 {KEY.reducesinkkey0} {VALUE._col0}
+                outputColumnNames: _col0, _col1, _col5, _col6
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col5 (type: string), _col6 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3
+                  File Output Operator
+                    compressed: false
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        name: default.dest1
+        Reducer 6 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Right Outer Join0 to 1
+                condition expressions:
+                  0 {KEY.reducesinkkey0} {VALUE._col0}
+                  1 {KEY.reducesinkkey0} {VALUE._col0}
+                outputColumnNames: _col0, _col1, _col5, _col6
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col5 (type: string), _col6 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3
+                  File Output Operator
+                    compressed: false
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        name: default.dest1
         Union 3 
             Vertex: Union 3
 
@@ -650,28 +632,6 @@ STAGE PLANS:
               serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
               name: default.dest1
 
-  Stage: Stage-3
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 5 
-            Map Operator Tree:
-                TableScan
-                  alias: a
-                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
-                  Filter Operator
-                    predicate: (not ((key = '2') or (key = '3'))) (type: 
boolean)
-                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-            Local Work:
-              Map Reduce Local Work
-
 PREHOOK: query: INSERT OVERWRITE TABLE DEST1
 SELECT * FROM T1 a RIGHT OUTER JOIN T2 b ON a.key = b.key
 PREHOOK: type: QUERY

Modified: 
hive/branches/spark/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_2.q.out
URL: 
http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_2.q.out?rev=1642997&r1=1642996&r2=1642997&view=diff
==============================================================================
--- 
hive/branches/spark/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_2.q.out
 (original)
+++ 
hive/branches/spark/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_2.q.out
 Tue Dec  2 19:57:10 2014
@@ -73,135 +73,61 @@ EXPLAIN
 SELECT a.*, b.*, c.* FROM T1 a JOIN T2 b ON a.key = b.key JOIN T3 c on a.key = 
c.key
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-2 is a root stage
-  Stage-1 depends on stages: Stage-2, Stage-3
-  Stage-3 depends on stages: Stage-2
+  Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
-  Stage: Stage-2
+  Stage: Stage-1
     Spark
+      Edges:
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 1), Map 4 (PARTITION-LEVEL 
SORT, 1), Map 5 (PARTITION-LEVEL SORT, 1)
+        Reducer 7 <- Map 6 (PARTITION-LEVEL SORT, 1), Map 8 (PARTITION-LEVEL 
SORT, 1), Map 9 (PARTITION-LEVEL SORT, 1)
+        Union 3 <- Reducer 2 (NONE, 0), Reducer 7 (NONE, 0)
 #### A masked pattern was here ####
       Vertices:
-        Map 3 
+        Map 1 
             Map Operator Tree:
                 TableScan
-                  alias: b
+                  alias: a
                   Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (key is not null and (((key = '2') or (key = 
'8')) or (key = '3'))) (type: boolean)
                     Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 {key} {val}
-                        1 {val}
-                        2 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                        2 key (type: string)
-            Local Work:
-              Map Reduce Local Work
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
         Map 4 
             Map Operator Tree:
                 TableScan
-                  alias: c
-                  Statistics: Num rows: 0 Data size: 20 Basic stats: PARTIAL 
Column stats: NONE
+                  alias: b
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (key is not null and (((key = '2') or (key = 
'8')) or (key = '3'))) (type: boolean)
                     Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 {key} {val}
-                        1 {key} {val}
-                        2 {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                        2 key (type: string)
-            Local Work:
-              Map Reduce Local Work
-
-  Stage: Stage-1
-    Spark
-      Edges:
-        Union 2 <- Map 1 (NONE, 0), Map 7 (NONE, 0)
-#### A masked pattern was here ####
-      Vertices:
-        Map 1 
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 5 
             Map Operator Tree:
                 TableScan
-                  alias: a
+                  alias: c
+                  Statistics: Num rows: 0 Data size: 20 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (key is not null and (((key = '2') or (key = 
'8')) or (key = '3'))) (type: boolean)
-                    Map Join Operator
-                      condition map:
-                           Inner Join 0 to 1
-                           Inner Join 0 to 2
-                      condition expressions:
-                        0 {key} {val}
-                        1 {key} {val}
-                        2 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                        2 key (type: string)
-                      outputColumnNames: _col0, _col1, _col5, _col6, _col10, 
_col11
-                      input vertices:
-                        1 Map 3
-                        2 Map 4
-                      Select Operator
-                        expressions: _col0 (type: string), _col1 (type: 
string), _col5 (type: string), _col6 (type: string), _col10 (type: string), 
_col11 (type: string)
-                        outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5
-                        File Output Operator
-                          compressed: false
-                          table:
-                              input format: 
org.apache.hadoop.mapred.TextInputFormat
-                              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                              serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-            Local Work:
-              Map Reduce Local Work
-        Map 7 
-            Map Operator Tree:
-                TableScan
-                  alias: a
-                  Filter Operator
-                    predicate: (key is not null and (not (((key = '2') or (key 
= '8')) or (key = '3')))) (type: boolean)
-                    Map Join Operator
-                      condition map:
-                           Inner Join 0 to 1
-                           Inner Join 0 to 2
-                      condition expressions:
-                        0 {key} {val}
-                        1 {key} {val}
-                        2 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                        2 key (type: string)
-                      outputColumnNames: _col0, _col1, _col5, _col6, _col10, 
_col11
-                      input vertices:
-                        1 Map 5
-                        2 Map 6
-                      Select Operator
-                        expressions: _col0 (type: string), _col1 (type: 
string), _col5 (type: string), _col6 (type: string), _col10 (type: string), 
_col11 (type: string)
-                        outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5
-                        File Output Operator
-                          compressed: false
-                          table:
-                              input format: 
org.apache.hadoop.mapred.TextInputFormat
-                              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                              serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-            Local Work:
-              Map Reduce Local Work
-        Union 2 
-            Vertex: Union 2
-
-  Stage: Stage-3
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 5 
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 6 
             Map Operator Tree:
                 TableScan
                   alias: b
@@ -209,18 +135,13 @@ STAGE PLANS:
                   Filter Operator
                     predicate: (key is not null and (not (((key = '2') or (key 
= '8')) or (key = '3')))) (type: boolean)
                     Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 {key} {val}
-                        1 {val}
-                        2 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                        2 key (type: string)
-            Local Work:
-              Map Reduce Local Work
-        Map 6 
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 8 
             Map Operator Tree:
                 TableScan
                   alias: c
@@ -228,17 +149,68 @@ STAGE PLANS:
                   Filter Operator
                     predicate: (key is not null and (not (((key = '2') or (key 
= '8')) or (key = '3')))) (type: boolean)
                     Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 {key} {val}
-                        1 {key} {val}
-                        2 {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                        2 key (type: string)
-            Local Work:
-              Map Reduce Local Work
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 9 
+            Map Operator Tree:
+                TableScan
+                  alias: a
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
+                  Filter Operator
+                    predicate: (key is not null and (not (((key = '2') or (key 
= '8')) or (key = '3')))) (type: boolean)
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Reducer 2 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                     Inner Join 0 to 2
+                condition expressions:
+                  0 {KEY.reducesinkkey0} {VALUE._col0}
+                  1 {KEY.reducesinkkey0} {VALUE._col0}
+                  2 {KEY.reducesinkkey0} {VALUE._col0}
+                outputColumnNames: _col0, _col1, _col5, _col6, _col10, _col11
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col5 (type: string), _col6 (type: string), _col10 (type: string), _col11 
(type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+                  File Output Operator
+                    compressed: false
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+        Reducer 7 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                     Inner Join 0 to 2
+                condition expressions:
+                  0 {KEY.reducesinkkey0} {VALUE._col0}
+                  1 {KEY.reducesinkkey0} {VALUE._col0}
+                  2 {KEY.reducesinkkey0} {VALUE._col0}
+                outputColumnNames: _col0, _col1, _col5, _col6, _col10, _col11
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col5 (type: string), _col6 (type: string), _col10 (type: string), _col11 
(type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+                  File Output Operator
+                    compressed: false
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+        Union 3 
+            Vertex: Union 3
 
   Stage: Stage-0
     Fetch Operator

Modified: 
hive/branches/spark/ql/src/test/results/clientpositive/spark/skewjoinopt1.q.out
URL: 
http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/results/clientpositive/spark/skewjoinopt1.q.out?rev=1642997&r1=1642996&r2=1642997&view=diff
==============================================================================
--- 
hive/branches/spark/ql/src/test/results/clientpositive/spark/skewjoinopt1.q.out 
(original)
+++ 
hive/branches/spark/ql/src/test/results/clientpositive/spark/skewjoinopt1.q.out 
Tue Dec  2 19:57:10 2014
@@ -47,122 +47,112 @@ EXPLAIN
 SELECT a.*, b.* FROM T1 a JOIN T2 b ON a.key = b.key
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-2 is a root stage
-  Stage-1 depends on stages: Stage-2, Stage-3
-  Stage-3 depends on stages: Stage-2
+  Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
-  Stage: Stage-2
+  Stage: Stage-1
     Spark
+      Edges:
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 1), Map 4 (PARTITION-LEVEL 
SORT, 1)
+        Reducer 6 <- Map 5 (PARTITION-LEVEL SORT, 1), Map 7 (PARTITION-LEVEL 
SORT, 1)
+        Union 3 <- Reducer 2 (NONE, 0), Reducer 6 (NONE, 0)
 #### A masked pattern was here ####
       Vertices:
-        Map 3 
+        Map 1 
             Map Operator Tree:
                 TableScan
-                  alias: b
+                  alias: a
                   Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (key is not null and ((key = '2') or (key = 
'3'))) (type: boolean)
                     Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 {key} {val}
-                        1 {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-            Local Work:
-              Map Reduce Local Work
-
-  Stage: Stage-1
-    Spark
-      Edges:
-        Union 2 <- Map 1 (NONE, 0), Map 5 (NONE, 0)
-#### A masked pattern was here ####
-      Vertices:
-        Map 1 
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 4 
             Map Operator Tree:
                 TableScan
-                  alias: a
+                  alias: b
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (key is not null and ((key = '2') or (key = 
'3'))) (type: boolean)
-                    Map Join Operator
-                      condition map:
-                           Inner Join 0 to 1
-                      condition expressions:
-                        0 {key} {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                      outputColumnNames: _col0, _col1, _col5, _col6
-                      input vertices:
-                        1 Map 3
-                      Select Operator
-                        expressions: _col0 (type: string), _col1 (type: 
string), _col5 (type: string), _col6 (type: string)
-                        outputColumnNames: _col0, _col1, _col2, _col3
-                        File Output Operator
-                          compressed: false
-                          table:
-                              input format: 
org.apache.hadoop.mapred.TextInputFormat
-                              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                              serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-            Local Work:
-              Map Reduce Local Work
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
         Map 5 
             Map Operator Tree:
                 TableScan
-                  alias: a
+                  alias: b
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (key is not null and (not ((key = '2') or (key 
= '3')))) (type: boolean)
-                    Map Join Operator
-                      condition map:
-                           Inner Join 0 to 1
-                      condition expressions:
-                        0 {key} {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                      outputColumnNames: _col0, _col1, _col5, _col6
-                      input vertices:
-                        1 Map 4
-                      Select Operator
-                        expressions: _col0 (type: string), _col1 (type: 
string), _col5 (type: string), _col6 (type: string)
-                        outputColumnNames: _col0, _col1, _col2, _col3
-                        File Output Operator
-                          compressed: false
-                          table:
-                              input format: 
org.apache.hadoop.mapred.TextInputFormat
-                              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                              serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-            Local Work:
-              Map Reduce Local Work
-        Union 2 
-            Vertex: Union 2
-
-  Stage: Stage-3
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 4 
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 7 
             Map Operator Tree:
                 TableScan
-                  alias: b
+                  alias: a
                   Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (key is not null and (not ((key = '2') or (key 
= '3')))) (type: boolean)
                     Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 {key} {val}
-                        1 {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-            Local Work:
-              Map Reduce Local Work
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Reducer 2 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                condition expressions:
+                  0 {KEY.reducesinkkey0} {VALUE._col0}
+                  1 {KEY.reducesinkkey0} {VALUE._col0}
+                outputColumnNames: _col0, _col1, _col5, _col6
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col5 (type: string), _col6 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3
+                  File Output Operator
+                    compressed: false
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+        Reducer 6 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                condition expressions:
+                  0 {KEY.reducesinkkey0} {VALUE._col0}
+                  1 {KEY.reducesinkkey0} {VALUE._col0}
+                outputColumnNames: _col0, _col1, _col5, _col6
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col5 (type: string), _col6 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3
+                  File Output Operator
+                    compressed: false
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+        Union 3 
+            Vertex: Union 3
 
   Stage: Stage-0
     Fetch Operator
@@ -199,14 +189,16 @@ EXPLAIN
 SELECT a.*, b.* FROM T1 a RIGHT OUTER JOIN T2 b ON a.key = b.key
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-2 is a root stage
-  Stage-1 depends on stages: Stage-2, Stage-3
-  Stage-3 depends on stages: Stage-2
+  Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
-  Stage: Stage-2
+  Stage: Stage-1
     Spark
+      Edges:
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 3), Map 4 (PARTITION-LEVEL 
SORT, 3)
+        Reducer 6 <- Map 5 (PARTITION-LEVEL SORT, 3), Map 7 (PARTITION-LEVEL 
SORT, 3)
+        Union 3 <- Reducer 2 (NONE, 0), Reducer 6 (NONE, 0)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
@@ -217,88 +209,41 @@ STAGE PLANS:
                   Filter Operator
                     predicate: ((key = '2') or (key = '3')) (type: boolean)
                     Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-            Local Work:
-              Map Reduce Local Work
-
-  Stage: Stage-1
-    Spark
-      Edges:
-        Union 3 <- Map 2 (NONE, 0), Map 4 (NONE, 0)
-#### A masked pattern was here ####
-      Vertices:
-        Map 2 
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 4 
             Map Operator Tree:
                 TableScan
                   alias: b
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: ((key = '2') or (key = '3')) (type: boolean)
-                    Map Join Operator
-                      condition map:
-                           Right Outer Join0 to 1
-                      condition expressions:
-                        0 {key} {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                      outputColumnNames: _col0, _col1, _col5, _col6
-                      input vertices:
-                        0 Map 1
-                      Select Operator
-                        expressions: _col0 (type: string), _col1 (type: 
string), _col5 (type: string), _col6 (type: string)
-                        outputColumnNames: _col0, _col1, _col2, _col3
-                        File Output Operator
-                          compressed: false
-                          table:
-                              input format: 
org.apache.hadoop.mapred.TextInputFormat
-                              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                              serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-            Local Work:
-              Map Reduce Local Work
-        Map 4 
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 5 
             Map Operator Tree:
                 TableScan
                   alias: b
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (not ((key = '2') or (key = '3'))) (type: 
boolean)
-                    Map Join Operator
-                      condition map:
-                           Right Outer Join0 to 1
-                      condition expressions:
-                        0 {key} {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                      outputColumnNames: _col0, _col1, _col5, _col6
-                      input vertices:
-                        0 Map 5
-                      Select Operator
-                        expressions: _col0 (type: string), _col1 (type: 
string), _col5 (type: string), _col6 (type: string)
-                        outputColumnNames: _col0, _col1, _col2, _col3
-                        File Output Operator
-                          compressed: false
-                          table:
-                              input format: 
org.apache.hadoop.mapred.TextInputFormat
-                              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                              serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-            Local Work:
-              Map Reduce Local Work
-        Union 3 
-            Vertex: Union 3
-
-  Stage: Stage-3
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 5 
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Map 7 
             Map Operator Tree:
                 TableScan
                   alias: a
@@ -306,15 +251,50 @@ STAGE PLANS:
                   Filter Operator
                     predicate: (not ((key = '2') or (key = '3'))) (type: 
boolean)
                     Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 {val}
-                        1 {key} {val}
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-            Local Work:
-              Map Reduce Local Work
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      value expressions: val (type: string)
+        Reducer 2 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Right Outer Join0 to 1
+                condition expressions:
+                  0 {KEY.reducesinkkey0} {VALUE._col0}
+                  1 {KEY.reducesinkkey0} {VALUE._col0}
+                outputColumnNames: _col0, _col1, _col5, _col6
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col5 (type: string), _col6 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3
+                  File Output Operator
+                    compressed: false
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+        Reducer 6 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Right Outer Join0 to 1
+                condition expressions:
+                  0 {KEY.reducesinkkey0} {VALUE._col0}
+                  1 {KEY.reducesinkkey0} {VALUE._col0}
+                outputColumnNames: _col0, _col1, _col5, _col6
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col5 (type: string), _col6 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3
+                  File Output Operator
+                    compressed: false
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+        Union 3 
+            Vertex: Union 3
 
   Stage: Stage-0
     Fetch Operator
@@ -353,94 +333,87 @@ EXPLAIN
 SELECT count(1) FROM T1 a JOIN T2 b ON a.key = b.key
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-2 is a root stage
-  Stage-1 depends on stages: Stage-2, Stage-3
-  Stage-3 depends on stages: Stage-2
+  Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
-  Stage: Stage-2
+  Stage: Stage-1
     Spark
+      Edges:
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 3), Map 5 (PARTITION-LEVEL 
SORT, 3)
+        Reducer 7 <- Map 6 (PARTITION-LEVEL SORT, 3), Map 8 (PARTITION-LEVEL 
SORT, 3)
+        Union 3 <- Reducer 2 (NONE, 0), Reducer 7 (NONE, 0)
+        Reducer 4 <- Union 3 (GROUP, 1)
 #### A masked pattern was here ####
       Vertices:
-        Map 4 
+        Map 1 
             Map Operator Tree:
                 TableScan
-                  alias: b
+                  alias: a
                   Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (key is not null and ((key = '2') or (key = 
'3'))) (type: boolean)
                     Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 
-                        1 
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-            Local Work:
-              Map Reduce Local Work
-
-  Stage: Stage-1
-    Spark
-      Edges:
-        Union 2 <- Map 1 (NONE, 0), Map 6 (NONE, 0)
-        Reducer 3 <- Union 2 (GROUP, 1)
-#### A masked pattern was here ####
-      Vertices:
-        Map 1 
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+        Map 5 
             Map Operator Tree:
                 TableScan
-                  alias: a
+                  alias: b
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (key is not null and ((key = '2') or (key = 
'3'))) (type: boolean)
-                    Map Join Operator
-                      condition map:
-                           Inner Join 0 to 1
-                      condition expressions:
-                        0 
-                        1 
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                      input vertices:
-                        1 Map 4
-                      Group By Operator
-                        aggregations: count(1)
-                        mode: hash
-                        outputColumnNames: _col0
-                        Reduce Output Operator
-                          sort order: 
-                          value expressions: _col0 (type: bigint)
-            Local Work:
-              Map Reduce Local Work
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
         Map 6 
             Map Operator Tree:
                 TableScan
+                  alias: b
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
+                  Filter Operator
+                    predicate: (key is not null and (not ((key = '2') or (key 
= '3')))) (type: boolean)
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+        Map 8 
+            Map Operator Tree:
+                TableScan
                   alias: a
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (key is not null and (not ((key = '2') or (key 
= '3')))) (type: boolean)
-                    Map Join Operator
-                      condition map:
-                           Inner Join 0 to 1
-                      condition expressions:
-                        0 
-                        1 
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                      input vertices:
-                        1 Map 5
-                      Group By Operator
-                        aggregations: count(1)
-                        mode: hash
-                        outputColumnNames: _col0
-                        Reduce Output Operator
-                          sort order: 
-                          value expressions: _col0 (type: bigint)
-            Local Work:
-              Map Reduce Local Work
-        Reducer 3 
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+        Reducer 2 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                condition expressions:
+                  0 
+                  1 
+                Group By Operator
+                  aggregations: count(1)
+                  mode: hash
+                  outputColumnNames: _col0
+                  Reduce Output Operator
+                    sort order: 
+                    value expressions: _col0 (type: bigint)
+        Reducer 4 
             Reduce Operator Tree:
               Group By Operator
                 aggregations: count(VALUE._col0)
@@ -458,30 +431,23 @@ STAGE PLANS:
                         input format: org.apache.hadoop.mapred.TextInputFormat
                         output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                         serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-        Union 2 
-            Vertex: Union 2
-
-  Stage: Stage-3
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 5 
-            Map Operator Tree:
-                TableScan
-                  alias: b
-                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
-                  Filter Operator
-                    predicate: (key is not null and (not ((key = '2') or (key 
= '3')))) (type: boolean)
-                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 
-                        1 
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-            Local Work:
-              Map Reduce Local Work
+        Reducer 7 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                condition expressions:
+                  0 
+                  1 
+                Group By Operator
+                  aggregations: count(1)
+                  mode: hash
+                  outputColumnNames: _col0
+                  Reduce Output Operator
+                    sort order: 
+                    value expressions: _col0 (type: bigint)
+        Union 3 
+            Vertex: Union 3
 
   Stage: Stage-0
     Fetch Operator
@@ -507,14 +473,17 @@ POSTHOOK: query: EXPLAIN
 SELECT count(1) FROM T1 a RIGHT OUTER JOIN T2 b ON a.key = b.key
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-2 is a root stage
-  Stage-1 depends on stages: Stage-2, Stage-3
-  Stage-3 depends on stages: Stage-2
+  Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
-  Stage: Stage-2
+  Stage: Stage-1
     Spark
+      Edges:
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 3), Map 5 (PARTITION-LEVEL 
SORT, 3)
+        Reducer 7 <- Map 6 (PARTITION-LEVEL SORT, 3), Map 8 (PARTITION-LEVEL 
SORT, 3)
+        Union 3 <- Reducer 2 (NONE, 0), Reducer 7 (NONE, 0)
+        Reducer 4 <- Union 3 (GROUP, 1)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
@@ -525,75 +494,65 @@ STAGE PLANS:
                   Filter Operator
                     predicate: ((key = '2') or (key = '3')) (type: boolean)
                     Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 
-                        1 
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-            Local Work:
-              Map Reduce Local Work
-
-  Stage: Stage-1
-    Spark
-      Edges:
-        Union 3 <- Map 2 (NONE, 0), Map 5 (NONE, 0)
-        Reducer 4 <- Union 3 (GROUP, 1)
-#### A masked pattern was here ####
-      Vertices:
-        Map 2 
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+        Map 5 
             Map Operator Tree:
                 TableScan
                   alias: b
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: ((key = '2') or (key = '3')) (type: boolean)
-                    Map Join Operator
-                      condition map:
-                           Right Outer Join0 to 1
-                      condition expressions:
-                        0 
-                        1 
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                      input vertices:
-                        0 Map 1
-                      Group By Operator
-                        aggregations: count(1)
-                        mode: hash
-                        outputColumnNames: _col0
-                        Reduce Output Operator
-                          sort order: 
-                          value expressions: _col0 (type: bigint)
-            Local Work:
-              Map Reduce Local Work
-        Map 5 
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+        Map 6 
             Map Operator Tree:
                 TableScan
                   alias: b
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
                   Filter Operator
                     predicate: (not ((key = '2') or (key = '3'))) (type: 
boolean)
-                    Map Join Operator
-                      condition map:
-                           Right Outer Join0 to 1
-                      condition expressions:
-                        0 
-                        1 
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-                      input vertices:
-                        0 Map 6
-                      Group By Operator
-                        aggregations: count(1)
-                        mode: hash
-                        outputColumnNames: _col0
-                        Reduce Output Operator
-                          sort order: 
-                          value expressions: _col0 (type: bigint)
-            Local Work:
-              Map Reduce Local Work
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+        Map 8 
+            Map Operator Tree:
+                TableScan
+                  alias: a
+                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
+                  Filter Operator
+                    predicate: (not ((key = '2') or (key = '3'))) (type: 
boolean)
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+        Reducer 2 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Right Outer Join0 to 1
+                condition expressions:
+                  0 
+                  1 
+                Group By Operator
+                  aggregations: count(1)
+                  mode: hash
+                  outputColumnNames: _col0
+                  Reduce Output Operator
+                    sort order: 
+                    value expressions: _col0 (type: bigint)
         Reducer 4 
             Reduce Operator Tree:
               Group By Operator
@@ -612,31 +571,24 @@ STAGE PLANS:
                         input format: org.apache.hadoop.mapred.TextInputFormat
                         output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                         serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+        Reducer 7 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Right Outer Join0 to 1
+                condition expressions:
+                  0 
+                  1 
+                Group By Operator
+                  aggregations: count(1)
+                  mode: hash
+                  outputColumnNames: _col0
+                  Reduce Output Operator
+                    sort order: 
+                    value expressions: _col0 (type: bigint)
         Union 3 
             Vertex: Union 3
 
-  Stage: Stage-3
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 6 
-            Map Operator Tree:
-                TableScan
-                  alias: a
-                  Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL 
Column stats: NONE
-                  Filter Operator
-                    predicate: (not ((key = '2') or (key = '3'))) (type: 
boolean)
-                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
-                    Spark HashTable Sink Operator
-                      condition expressions:
-                        0 
-                        1 
-                      keys:
-                        0 key (type: string)
-                        1 key (type: string)
-            Local Work:
-              Map Reduce Local Work
-
   Stage: Stage-0
     Fetch Operator
       limit: -1


Reply via email to