You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jc...@apache.org on 2015/11/20 23:32:48 UTC

[21/51] [partial] hive git commit: HIVE-12017: Do not disable CBO by default when number of joins in a query is equal or less than 1 (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)

http://git-wip-us.apache.org/repos/asf/hive/blob/7dab21ac/ql/src/test/results/clientpositive/multiMapJoin1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/multiMapJoin1.q.out b/ql/src/test/results/clientpositive/multiMapJoin1.q.out
index 8548fc7..f0d86f2 100644
--- a/ql/src/test/results/clientpositive/multiMapJoin1.q.out
+++ b/ql/src/test/results/clientpositive/multiMapJoin1.q.out
@@ -189,35 +189,43 @@ STAGE PLANS:
   Stage: Stage-8
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        firstjoin:smalltbl1 
+        $hdt$_0:$hdt$_1:smalltbl1 
           Fetch Operator
             limit: -1
-        smalltbl2 
+        $hdt$_1:smalltbl2 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        firstjoin:smalltbl1 
+        $hdt$_0:$hdt$_1:smalltbl1 
           TableScan
             alias: smalltbl1
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 key (type: string)
-                  1 key (type: string)
-        smalltbl2 
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
+        $hdt$_1:smalltbl2 
           TableScan
             alias: smalltbl2
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: value is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col1 (type: string)
-                  1 value (type: string)
+              Select Operator
+                expressions: value (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
 
   Stage: Stage-3
     Map Reduce
@@ -228,30 +236,38 @@ STAGE PLANS:
             Filter Operator
               predicate: (key is not null and value is not null) (type: boolean)
               Statistics: Num rows: 1250 Data size: 13280 Basic stats: COMPLETE Column stats: NONE
-              Map Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 key (type: string)
-                  1 key (type: string)
-                outputColumnNames: _col1
-                Statistics: Num rows: 1375 Data size: 14608 Basic stats: COMPLETE Column stats: NONE
+              Select Operator
+                expressions: key (type: string), value (type: string)
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 1250 Data size: 13280 Basic stats: COMPLETE Column stats: NONE
                 Map Join Operator
                   condition map:
                        Inner Join 0 to 1
                   keys:
-                    0 _col1 (type: string)
-                    1 value (type: string)
-                  Statistics: Num rows: 1512 Data size: 16068 Basic stats: COMPLETE Column stats: NONE
-                  Group By Operator
-                    aggregations: count()
-                    mode: hash
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
+                  outputColumnNames: _col1
+                  Statistics: Num rows: 1375 Data size: 14608 Basic stats: COMPLETE Column stats: NONE
+                  Select Operator
+                    expressions: _col1 (type: string)
                     outputColumnNames: _col0
-                    Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
-                    Reduce Output Operator
-                      sort order: 
-                      Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
-                      value expressions: _col0 (type: bigint)
+                    Statistics: Num rows: 1375 Data size: 14608 Basic stats: COMPLETE Column stats: NONE
+                    Map Join Operator
+                      condition map:
+                           Inner Join 0 to 1
+                      keys:
+                        0 _col0 (type: string)
+                        1 _col0 (type: string)
+                      Statistics: Num rows: 1512 Data size: 16068 Basic stats: COMPLETE Column stats: NONE
+                      Group By Operator
+                        aggregations: count()
+                        mode: hash
+                        outputColumnNames: _col0
+                        Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                        Reduce Output Operator
+                          sort order: 
+                          Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                          value expressions: _col0 (type: bigint)
       Local Work:
         Map Reduce Local Work
       Reduce Operator Tree:
@@ -332,35 +348,43 @@ STAGE PLANS:
   Stage: Stage-8
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        firstjoin:smalltbl1 
+        $hdt$_0:$hdt$_1:smalltbl1 
           Fetch Operator
             limit: -1
-        smalltbl2 
+        $hdt$_1:smalltbl2 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        firstjoin:smalltbl1 
+        $hdt$_0:$hdt$_1:smalltbl1 
           TableScan
             alias: smalltbl1
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 key (type: string)
-                  1 key (type: string)
-        smalltbl2 
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
+        $hdt$_1:smalltbl2 
           TableScan
             alias: smalltbl2
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: value is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col1 (type: string)
-                  1 value (type: string)
+              Select Operator
+                expressions: value (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
 
   Stage: Stage-3
     Map Reduce
@@ -371,30 +395,38 @@ STAGE PLANS:
             Filter Operator
               predicate: (key is not null and value is not null) (type: boolean)
               Statistics: Num rows: 1250 Data size: 13280 Basic stats: COMPLETE Column stats: NONE
-              Map Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 key (type: string)
-                  1 key (type: string)
-                outputColumnNames: _col1
-                Statistics: Num rows: 1375 Data size: 14608 Basic stats: COMPLETE Column stats: NONE
+              Select Operator
+                expressions: key (type: string), value (type: string)
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 1250 Data size: 13280 Basic stats: COMPLETE Column stats: NONE
                 Map Join Operator
                   condition map:
                        Inner Join 0 to 1
                   keys:
-                    0 _col1 (type: string)
-                    1 value (type: string)
-                  Statistics: Num rows: 1512 Data size: 16068 Basic stats: COMPLETE Column stats: NONE
-                  Group By Operator
-                    aggregations: count()
-                    mode: hash
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
+                  outputColumnNames: _col1
+                  Statistics: Num rows: 1375 Data size: 14608 Basic stats: COMPLETE Column stats: NONE
+                  Select Operator
+                    expressions: _col1 (type: string)
                     outputColumnNames: _col0
-                    Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
-                    Reduce Output Operator
-                      sort order: 
-                      Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
-                      value expressions: _col0 (type: bigint)
+                    Statistics: Num rows: 1375 Data size: 14608 Basic stats: COMPLETE Column stats: NONE
+                    Map Join Operator
+                      condition map:
+                           Inner Join 0 to 1
+                      keys:
+                        0 _col0 (type: string)
+                        1 _col0 (type: string)
+                      Statistics: Num rows: 1512 Data size: 16068 Basic stats: COMPLETE Column stats: NONE
+                      Group By Operator
+                        aggregations: count()
+                        mode: hash
+                        outputColumnNames: _col0
+                        Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                        Reduce Output Operator
+                          sort order: 
+                          Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                          value expressions: _col0 (type: bigint)
       Local Work:
         Map Reduce Local Work
       Reduce Operator Tree:
@@ -479,35 +511,43 @@ STAGE PLANS:
   Stage: Stage-8
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        firstjoin:smalltbl1 
+        $hdt$_0:$hdt$_1:smalltbl1 
           Fetch Operator
             limit: -1
-        smalltbl2 
+        $hdt$_1:smalltbl2 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        firstjoin:smalltbl1 
+        $hdt$_0:$hdt$_1:smalltbl1 
           TableScan
             alias: smalltbl1
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 key (type: string)
-                  1 key (type: string)
-        smalltbl2 
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
+        $hdt$_1:smalltbl2 
           TableScan
             alias: smalltbl2
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: value is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col1 (type: string)
-                  1 value (type: string)
+              Select Operator
+                expressions: key (type: string), value (type: string)
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col0 (type: string)
+                    1 _col1 (type: string)
 
   Stage: Stage-3
     Map Reduce
@@ -518,34 +558,42 @@ STAGE PLANS:
             Filter Operator
               predicate: (key is not null and value is not null) (type: boolean)
               Statistics: Num rows: 1250 Data size: 13280 Basic stats: COMPLETE Column stats: NONE
-              Map Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 key (type: string)
-                  1 key (type: string)
-                outputColumnNames: _col1
-                Statistics: Num rows: 1375 Data size: 14608 Basic stats: COMPLETE Column stats: NONE
+              Select Operator
+                expressions: key (type: string), value (type: string)
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 1250 Data size: 13280 Basic stats: COMPLETE Column stats: NONE
                 Map Join Operator
                   condition map:
                        Inner Join 0 to 1
                   keys:
-                    0 _col1 (type: string)
-                    1 value (type: string)
-                  outputColumnNames: _col3
-                  Statistics: Num rows: 1512 Data size: 16068 Basic stats: COMPLETE Column stats: NONE
-                  Group By Operator
-                    aggregations: count()
-                    keys: _col3 (type: string)
-                    mode: hash
-                    outputColumnNames: _col0, _col1
-                    Statistics: Num rows: 1512 Data size: 16068 Basic stats: COMPLETE Column stats: NONE
-                    Reduce Output Operator
-                      key expressions: _col0 (type: string)
-                      sort order: +
-                      Map-reduce partition columns: _col0 (type: string)
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
+                  outputColumnNames: _col1
+                  Statistics: Num rows: 1375 Data size: 14608 Basic stats: COMPLETE Column stats: NONE
+                  Select Operator
+                    expressions: _col1 (type: string)
+                    outputColumnNames: _col0
+                    Statistics: Num rows: 1375 Data size: 14608 Basic stats: COMPLETE Column stats: NONE
+                    Map Join Operator
+                      condition map:
+                           Inner Join 0 to 1
+                      keys:
+                        0 _col0 (type: string)
+                        1 _col1 (type: string)
+                      outputColumnNames: _col1
                       Statistics: Num rows: 1512 Data size: 16068 Basic stats: COMPLETE Column stats: NONE
-                      value expressions: _col1 (type: bigint)
+                      Group By Operator
+                        aggregations: count()
+                        keys: _col1 (type: string)
+                        mode: hash
+                        outputColumnNames: _col0, _col1
+                        Statistics: Num rows: 1512 Data size: 16068 Basic stats: COMPLETE Column stats: NONE
+                        Reduce Output Operator
+                          key expressions: _col0 (type: string)
+                          sort order: +
+                          Map-reduce partition columns: _col0 (type: string)
+                          Statistics: Num rows: 1512 Data size: 16068 Basic stats: COMPLETE Column stats: NONE
+                          value expressions: _col1 (type: bigint)
       Local Work:
         Map Reduce Local Work
       Reduce Operator Tree:
@@ -788,21 +836,25 @@ STAGE PLANS:
   Stage: Stage-28
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        join3:join2:join1:smalltbl1 
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_0:$hdt$_1:smalltbl1 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        join3:join2:join1:smalltbl1 
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_0:$hdt$_1:smalltbl1 
           TableScan
             alias: smalltbl1
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 key1 (type: string)
-                  1 key (type: string)
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
 
   Stage: Stage-19
     Map Reduce
@@ -813,24 +865,28 @@ STAGE PLANS:
             Filter Operator
               predicate: ((key1 is not null and value is not null) and key2 is not null) (type: boolean)
               Statistics: Num rows: 625 Data size: 9022 Basic stats: COMPLETE Column stats: NONE
-              Map Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 key1 (type: string)
-                  1 key (type: string)
-                outputColumnNames: _col0, _col1, _col2, _col6
-                Statistics: Num rows: 687 Data size: 9924 Basic stats: COMPLETE Column stats: NONE
-                Select Operator
-                  expressions: _col0 (type: string), _col1 (type: string), _col6 (type: string), _col2 (type: string), _col2 (type: string)
-                  outputColumnNames: _col0, _col1, _col2, _col3, _col4
+              Select Operator
+                expressions: key1 (type: string), key2 (type: string), value (type: string)
+                outputColumnNames: _col0, _col1, _col2
+                Statistics: Num rows: 625 Data size: 9022 Basic stats: COMPLETE Column stats: NONE
+                Map Join Operator
+                  condition map:
+                       Inner Join 0 to 1
+                  keys:
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3
                   Statistics: Num rows: 687 Data size: 9924 Basic stats: COMPLETE Column stats: NONE
-                  File Output Operator
-                    compressed: false
-                    table:
-                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                        serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+                  Select Operator
+                    expressions: _col0 (type: string), _col1 (type: string), _col3 (type: string), _col2 (type: string), _col2 (type: string)
+                    outputColumnNames: _col0, _col1, _col2, _col3, _col4
+                    Statistics: Num rows: 687 Data size: 9924 Basic stats: COMPLETE Column stats: NONE
+                    File Output Operator
+                      compressed: false
+                      table:
+                          input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                          output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                          serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
       Local Work:
         Map Reduce Local Work
 
@@ -840,21 +896,25 @@ STAGE PLANS:
   Stage: Stage-26
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        join3:join2:smalltbl2 
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_1:smalltbl2 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        join3:join2:smalltbl2 
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_1:smalltbl2 
           TableScan
             alias: smalltbl2
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: value is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col3 (type: string)
-                  1 value (type: string)
+              Select Operator
+                expressions: key (type: string), value (type: string)
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col3 (type: string)
+                    1 _col1 (type: string)
 
   Stage: Stage-16
     Map Reduce
@@ -865,7 +925,7 @@ STAGE PLANS:
                    Inner Join 0 to 1
               keys:
                 0 _col3 (type: string)
-                1 value (type: string)
+                1 _col1 (type: string)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
               Statistics: Num rows: 755 Data size: 10916 Basic stats: COMPLETE Column stats: NONE
               Select Operator
@@ -887,21 +947,25 @@ STAGE PLANS:
   Stage: Stage-24
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        join3:smalltbl3 
+        $hdt$_0:$hdt$_0:$hdt$_1:smalltbl3 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        join3:smalltbl3 
+        $hdt$_0:$hdt$_0:$hdt$_1:smalltbl3 
           TableScan
             alias: smalltbl3
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col1 (type: string)
-                  1 key (type: string)
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col1 (type: string)
+                    1 _col0 (type: string)
 
   Stage: Stage-13
     Map Reduce
@@ -912,7 +976,7 @@ STAGE PLANS:
                    Inner Join 0 to 1
               keys:
                 0 _col1 (type: string)
-                1 key (type: string)
+                1 _col0 (type: string)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
               Statistics: Num rows: 830 Data size: 12007 Basic stats: COMPLETE Column stats: NONE
               Select Operator
@@ -934,21 +998,25 @@ STAGE PLANS:
   Stage: Stage-22
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        smalltbl4 
+        $hdt$_0:$hdt$_1:smalltbl4 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        smalltbl4 
+        $hdt$_0:$hdt$_1:smalltbl4 
           TableScan
             alias: smalltbl4
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col2 (type: string)
-                  1 key (type: string)
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col2 (type: string)
+                    1 _col0 (type: string)
 
   Stage: Stage-10
     Map Reduce
@@ -959,15 +1027,15 @@ STAGE PLANS:
                    Inner Join 0 to 1
               keys:
                 0 _col2 (type: string)
-                1 key (type: string)
+                1 _col0 (type: string)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
               Statistics: Num rows: 913 Data size: 13207 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col7 (type: string), _col5 (type: string), _col6 (type: string)
-                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col7, _col5, _col6
+                expressions: hash(_col0) (type: int), hash(_col1) (type: int), hash(_col2) (type: int), hash(_col3) (type: int), hash(_col4) (type: int), hash(_col7) (type: int), hash(_col5) (type: int), hash(_col6) (type: int)
+                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
                 Statistics: Num rows: 913 Data size: 13207 Basic stats: COMPLETE Column stats: NONE
                 Group By Operator
-                  aggregations: sum(hash(_col0)), sum(hash(_col1)), sum(hash(_col2)), sum(hash(_col3)), sum(hash(_col4)), sum(hash(_col7)), sum(hash(_col5)), sum(hash(_col6))
+                  aggregations: sum(_col0), sum(_col1), sum(_col2), sum(_col3), sum(_col4), sum(_col5), sum(_col6), sum(_col7)
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
                   Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE
@@ -1005,16 +1073,16 @@ STAGE PLANS:
   Stage: Stage-23
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        $INTNAME 
+        $hdt$_0:$INTNAME 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        $INTNAME 
+        $hdt$_0:$INTNAME 
           TableScan
             HashTable Sink Operator
               keys:
                 0 _col2 (type: string)
-                1 key (type: string)
+                1 _col0 (type: string)
 
   Stage: Stage-11
     Map Reduce
@@ -1025,29 +1093,33 @@ STAGE PLANS:
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              Map Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 _col2 (type: string)
-                  1 key (type: string)
-                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
-                Statistics: Num rows: 913 Data size: 13207 Basic stats: COMPLETE Column stats: NONE
-                Select Operator
-                  expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col7 (type: string), _col5 (type: string), _col6 (type: string)
-                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col7, _col5, _col6
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                Map Join Operator
+                  condition map:
+                       Inner Join 0 to 1
+                  keys:
+                    0 _col2 (type: string)
+                    1 _col0 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
                   Statistics: Num rows: 913 Data size: 13207 Basic stats: COMPLETE Column stats: NONE
-                  Group By Operator
-                    aggregations: sum(hash(_col0)), sum(hash(_col1)), sum(hash(_col2)), sum(hash(_col3)), sum(hash(_col4)), sum(hash(_col7)), sum(hash(_col5)), sum(hash(_col6))
-                    mode: hash
+                  Select Operator
+                    expressions: hash(_col0) (type: int), hash(_col1) (type: int), hash(_col2) (type: int), hash(_col3) (type: int), hash(_col4) (type: int), hash(_col7) (type: int), hash(_col5) (type: int), hash(_col6) (type: int)
                     outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
-                    Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE
-                    File Output Operator
-                      compressed: false
-                      table:
-                          input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                          output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                          serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+                    Statistics: Num rows: 913 Data size: 13207 Basic stats: COMPLETE Column stats: NONE
+                    Group By Operator
+                      aggregations: sum(_col0), sum(_col1), sum(_col2), sum(_col3), sum(_col4), sum(_col5), sum(_col6), sum(_col7)
+                      mode: hash
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
+                      Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE
+                      File Output Operator
+                        compressed: false
+                        table:
+                            input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                            output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                            serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
       Local Work:
         Map Reduce Local Work
 
@@ -1067,26 +1139,30 @@ STAGE PLANS:
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: key (type: string)
-                sort order: +
-                Map-reduce partition columns: key (type: string)
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
                 Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col0 (type: string)
+                  sort order: +
+                  Map-reduce partition columns: _col0 (type: string)
+                  Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
                Inner Join 0 to 1
           keys:
             0 _col2 (type: string)
-            1 key (type: string)
+            1 _col0 (type: string)
           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
           Statistics: Num rows: 913 Data size: 13207 Basic stats: COMPLETE Column stats: NONE
           Select Operator
-            expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col7 (type: string), _col5 (type: string), _col6 (type: string)
-            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col7, _col5, _col6
+            expressions: hash(_col0) (type: int), hash(_col1) (type: int), hash(_col2) (type: int), hash(_col3) (type: int), hash(_col4) (type: int), hash(_col7) (type: int), hash(_col5) (type: int), hash(_col6) (type: int)
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
             Statistics: Num rows: 913 Data size: 13207 Basic stats: COMPLETE Column stats: NONE
             Group By Operator
-              aggregations: sum(hash(_col0)), sum(hash(_col1)), sum(hash(_col2)), sum(hash(_col3)), sum(hash(_col4)), sum(hash(_col7)), sum(hash(_col5)), sum(hash(_col6))
+              aggregations: sum(_col0), sum(_col1), sum(_col2), sum(_col3), sum(_col4), sum(_col5), sum(_col6), sum(_col7)
               mode: hash
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
               Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE
@@ -1100,16 +1176,16 @@ STAGE PLANS:
   Stage: Stage-25
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        join3:$INTNAME 
+        $hdt$_0:$hdt$_0:$INTNAME 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        join3:$INTNAME 
+        $hdt$_0:$hdt$_0:$INTNAME 
           TableScan
             HashTable Sink Operator
               keys:
                 0 _col1 (type: string)
-                1 key (type: string)
+                1 _col0 (type: string)
 
   Stage: Stage-14
     Map Reduce
@@ -1120,24 +1196,28 @@ STAGE PLANS:
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              Map Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 _col1 (type: string)
-                  1 key (type: string)
-                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
-                Statistics: Num rows: 830 Data size: 12007 Basic stats: COMPLETE Column stats: NONE
-                Select Operator
-                  expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col6 (type: string), _col4 (type: string), _col5 (type: string)
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                Map Join Operator
+                  condition map:
+                       Inner Join 0 to 1
+                  keys:
+                    0 _col1 (type: string)
+                    1 _col0 (type: string)
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
                   Statistics: Num rows: 830 Data size: 12007 Basic stats: COMPLETE Column stats: NONE
-                  File Output Operator
-                    compressed: false
-                    table:
-                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                        serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+                  Select Operator
+                    expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col6 (type: string), _col4 (type: string), _col5 (type: string)
+                    outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
+                    Statistics: Num rows: 830 Data size: 12007 Basic stats: COMPLETE Column stats: NONE
+                    File Output Operator
+                      compressed: false
+                      table:
+                          input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                          output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                          serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
       Local Work:
         Map Reduce Local Work
 
@@ -1157,18 +1237,22 @@ STAGE PLANS:
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: key (type: string)
-                sort order: +
-                Map-reduce partition columns: key (type: string)
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
                 Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col0 (type: string)
+                  sort order: +
+                  Map-reduce partition columns: _col0 (type: string)
+                  Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
                Inner Join 0 to 1
           keys:
             0 _col1 (type: string)
-            1 key (type: string)
+            1 _col0 (type: string)
           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
           Statistics: Num rows: 830 Data size: 12007 Basic stats: COMPLETE Column stats: NONE
           Select Operator
@@ -1185,16 +1269,16 @@ STAGE PLANS:
   Stage: Stage-27
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        join3:join2:$INTNAME 
+        $hdt$_0:$hdt$_0:$hdt$_0:$INTNAME 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        join3:join2:$INTNAME 
+        $hdt$_0:$hdt$_0:$hdt$_0:$INTNAME 
           TableScan
             HashTable Sink Operator
               keys:
                 0 _col3 (type: string)
-                1 value (type: string)
+                1 _col1 (type: string)
 
   Stage: Stage-17
     Map Reduce
@@ -1205,24 +1289,28 @@ STAGE PLANS:
             Filter Operator
               predicate: value is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              Map Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 _col3 (type: string)
-                  1 value (type: string)
-                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                Statistics: Num rows: 755 Data size: 10916 Basic stats: COMPLETE Column stats: NONE
-                Select Operator
-                  expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col5 (type: string), _col3 (type: string), _col4 (type: string)
+              Select Operator
+                expressions: key (type: string), value (type: string)
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                Map Join Operator
+                  condition map:
+                       Inner Join 0 to 1
+                  keys:
+                    0 _col3 (type: string)
+                    1 _col1 (type: string)
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
                   Statistics: Num rows: 755 Data size: 10916 Basic stats: COMPLETE Column stats: NONE
-                  File Output Operator
-                    compressed: false
-                    table:
-                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                        serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+                  Select Operator
+                    expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col5 (type: string), _col3 (type: string), _col4 (type: string)
+                    outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+                    Statistics: Num rows: 755 Data size: 10916 Basic stats: COMPLETE Column stats: NONE
+                    File Output Operator
+                      compressed: false
+                      table:
+                          input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                          output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                          serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
       Local Work:
         Map Reduce Local Work
 
@@ -1242,19 +1330,23 @@ STAGE PLANS:
             Filter Operator
               predicate: value is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: value (type: string)
-                sort order: +
-                Map-reduce partition columns: value (type: string)
+              Select Operator
+                expressions: key (type: string), value (type: string)
+                outputColumnNames: _col0, _col1
                 Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-                value expressions: key (type: string)
+                Reduce Output Operator
+                  key expressions: _col1 (type: string)
+                  sort order: +
+                  Map-reduce partition columns: _col1 (type: string)
+                  Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                  value expressions: _col0 (type: string)
       Reduce Operator Tree:
         Join Operator
           condition map:
                Inner Join 0 to 1
           keys:
             0 _col3 (type: string)
-            1 value (type: string)
+            1 _col1 (type: string)
           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
           Statistics: Num rows: 755 Data size: 10916 Basic stats: COMPLETE Column stats: NONE
           Select Operator
@@ -1271,21 +1363,25 @@ STAGE PLANS:
   Stage: Stage-29
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        join3:join2:join1:bigtbl 
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_0:$hdt$_0:bigtbl 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        join3:join2:join1:bigtbl 
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_0:$hdt$_0:bigtbl 
           TableScan
             alias: bigtbl
             Statistics: Num rows: 5000 Data size: 72180 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((key1 is not null and value is not null) and key2 is not null) (type: boolean)
               Statistics: Num rows: 625 Data size: 9022 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 key1 (type: string)
-                  1 key (type: string)
+              Select Operator
+                expressions: key1 (type: string), key2 (type: string), value (type: string)
+                outputColumnNames: _col0, _col1, _col2
+                Statistics: Num rows: 625 Data size: 9022 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
 
   Stage: Stage-20
     Map Reduce
@@ -1296,24 +1392,28 @@ STAGE PLANS:
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              Map Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 key1 (type: string)
-                  1 key (type: string)
-                outputColumnNames: _col0, _col1, _col2, _col6
-                Statistics: Num rows: 687 Data size: 9924 Basic stats: COMPLETE Column stats: NONE
-                Select Operator
-                  expressions: _col0 (type: string), _col1 (type: string), _col6 (type: string), _col2 (type: string), _col2 (type: string)
-                  outputColumnNames: _col0, _col1, _col2, _col3, _col4
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                Map Join Operator
+                  condition map:
+                       Inner Join 0 to 1
+                  keys:
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3
                   Statistics: Num rows: 687 Data size: 9924 Basic stats: COMPLETE Column stats: NONE
-                  File Output Operator
-                    compressed: false
-                    table:
-                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                        serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+                  Select Operator
+                    expressions: _col0 (type: string), _col1 (type: string), _col3 (type: string), _col2 (type: string), _col2 (type: string)
+                    outputColumnNames: _col0, _col1, _col2, _col3, _col4
+                    Statistics: Num rows: 687 Data size: 9924 Basic stats: COMPLETE Column stats: NONE
+                    File Output Operator
+                      compressed: false
+                      table:
+                          input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                          output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                          serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
       Local Work:
         Map Reduce Local Work
 
@@ -1326,34 +1426,42 @@ STAGE PLANS:
             Filter Operator
               predicate: ((key1 is not null and value is not null) and key2 is not null) (type: boolean)
               Statistics: Num rows: 625 Data size: 9022 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: key1 (type: string)
-                sort order: +
-                Map-reduce partition columns: key1 (type: string)
+              Select Operator
+                expressions: key1 (type: string), key2 (type: string), value (type: string)
+                outputColumnNames: _col0, _col1, _col2
                 Statistics: Num rows: 625 Data size: 9022 Basic stats: COMPLETE Column stats: NONE
-                value expressions: key2 (type: string), value (type: string)
+                Reduce Output Operator
+                  key expressions: _col0 (type: string)
+                  sort order: +
+                  Map-reduce partition columns: _col0 (type: string)
+                  Statistics: Num rows: 625 Data size: 9022 Basic stats: COMPLETE Column stats: NONE
+                  value expressions: _col1 (type: string), _col2 (type: string)
           TableScan
             alias: smalltbl1
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: key (type: string)
-                sort order: +
-                Map-reduce partition columns: key (type: string)
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
                 Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col0 (type: string)
+                  sort order: +
+                  Map-reduce partition columns: _col0 (type: string)
+                  Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
                Inner Join 0 to 1
           keys:
-            0 key1 (type: string)
-            1 key (type: string)
-          outputColumnNames: _col0, _col1, _col2, _col6
+            0 _col0 (type: string)
+            1 _col0 (type: string)
+          outputColumnNames: _col0, _col1, _col2, _col3
           Statistics: Num rows: 687 Data size: 9924 Basic stats: COMPLETE Column stats: NONE
           Select Operator
-            expressions: _col0 (type: string), _col1 (type: string), _col6 (type: string), _col2 (type: string), _col2 (type: string)
+            expressions: _col0 (type: string), _col1 (type: string), _col3 (type: string), _col2 (type: string), _col2 (type: string)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4
             Statistics: Num rows: 687 Data size: 9924 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
@@ -1540,63 +1648,79 @@ STAGE PLANS:
   Stage: Stage-14
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        join3:join2:join1:smalltbl1 
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_0:$hdt$_1:smalltbl1 
           Fetch Operator
             limit: -1
-        join3:join2:smalltbl2 
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_1:smalltbl2 
           Fetch Operator
             limit: -1
-        join3:smalltbl3 
+        $hdt$_0:$hdt$_0:$hdt$_1:smalltbl3 
           Fetch Operator
             limit: -1
-        smalltbl4 
+        $hdt$_0:$hdt$_1:smalltbl4 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        join3:join2:join1:smalltbl1 
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_0:$hdt$_1:smalltbl1 
           TableScan
             alias: smalltbl1
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 key1 (type: string)
-                  1 key (type: string)
-        join3:join2:smalltbl2 
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_1:smalltbl2 
           TableScan
             alias: smalltbl2
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: value is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col3 (type: string)
-                  1 value (type: string)
-        join3:smalltbl3 
+              Select Operator
+                expressions: key (type: string), value (type: string)
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col3 (type: string)
+                    1 _col1 (type: string)
+        $hdt$_0:$hdt$_0:$hdt$_1:smalltbl3 
           TableScan
             alias: smalltbl3
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col1 (type: string)
-                  1 key (type: string)
-        smalltbl4 
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col1 (type: string)
+                    1 _col0 (type: string)
+        $hdt$_0:$hdt$_1:smalltbl4 
           TableScan
             alias: smalltbl4
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col2 (type: string)
-                  1 key (type: string)
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col2 (type: string)
+                    1 _col0 (type: string)
 
   Stage: Stage-5
     Map Reduce
@@ -1607,63 +1731,67 @@ STAGE PLANS:
             Filter Operator
               predicate: ((key1 is not null and value is not null) and key2 is not null) (type: boolean)
               Statistics: Num rows: 625 Data size: 9022 Basic stats: COMPLETE Column stats: NONE
-              Map Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 key1 (type: string)
-                  1 key (type: string)
-                outputColumnNames: _col0, _col1, _col2, _col6
-                Statistics: Num rows: 687 Data size: 9924 Basic stats: COMPLETE Column stats: NONE
-                Select Operator
-                  expressions: _col0 (type: string), _col1 (type: string), _col6 (type: string), _col2 (type: string), _col2 (type: string)
-                  outputColumnNames: _col0, _col1, _col2, _col3, _col4
+              Select Operator
+                expressions: key1 (type: string), key2 (type: string), value (type: string)
+                outputColumnNames: _col0, _col1, _col2
+                Statistics: Num rows: 625 Data size: 9022 Basic stats: COMPLETE Column stats: NONE
+                Map Join Operator
+                  condition map:
+                       Inner Join 0 to 1
+                  keys:
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3
                   Statistics: Num rows: 687 Data size: 9924 Basic stats: COMPLETE Column stats: NONE
-                  Map Join Operator
-                    condition map:
-                         Inner Join 0 to 1
-                    keys:
-                      0 _col3 (type: string)
-                      1 value (type: string)
-                    outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                    Statistics: Num rows: 755 Data size: 10916 Basic stats: COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col5 (type: string), _col3 (type: string), _col4 (type: string)
+                  Select Operator
+                    expressions: _col0 (type: string), _col1 (type: string), _col3 (type: string), _col2 (type: string), _col2 (type: string)
+                    outputColumnNames: _col0, _col1, _col2, _col3, _col4
+                    Statistics: Num rows: 687 Data size: 9924 Basic stats: COMPLETE Column stats: NONE
+                    Map Join Operator
+                      condition map:
+                           Inner Join 0 to 1
+                      keys:
+                        0 _col3 (type: string)
+                        1 _col1 (type: string)
                       outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
                       Statistics: Num rows: 755 Data size: 10916 Basic stats: COMPLETE Column stats: NONE
-                      Map Join Operator
-                        condition map:
-                             Inner Join 0 to 1
-                        keys:
-                          0 _col1 (type: string)
-                          1 key (type: string)
-                        outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
-                        Statistics: Num rows: 830 Data size: 12007 Basic stats: COMPLETE Column stats: NONE
-                        Select Operator
-                          expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col6 (type: string), _col4 (type: string), _col5 (type: string)
+                      Select Operator
+                        expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col5 (type: string), _col3 (type: string), _col4 (type: string)
+                        outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+                        Statistics: Num rows: 755 Data size: 10916 Basic stats: COMPLETE Column stats: NONE
+                        Map Join Operator
+                          condition map:
+                               Inner Join 0 to 1
+                          keys:
+                            0 _col1 (type: string)
+                            1 _col0 (type: string)
                           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
                           Statistics: Num rows: 830 Data size: 12007 Basic stats: COMPLETE Column stats: NONE
-                          Map Join Operator
-                            condition map:
-                                 Inner Join 0 to 1
-                            keys:
-                              0 _col2 (type: string)
-                              1 key (type: string)
-                            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
-                            Statistics: Num rows: 913 Data size: 13207 Basic stats: COMPLETE Column stats: NONE
-                            Select Operator
-                              expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col7 (type: string), _col5 (type: string), _col6 (type: string)
-                              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col7, _col5, _col6
+                          Select Operator
+                            expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col6 (type: string), _col4 (type: string), _col5 (type: string)
+                            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
+                            Statistics: Num rows: 830 Data size: 12007 Basic stats: COMPLETE Column stats: NONE
+                            Map Join Operator
+                              condition map:
+                                   Inner Join 0 to 1
+                              keys:
+                                0 _col2 (type: string)
+                                1 _col0 (type: string)
+                              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
                               Statistics: Num rows: 913 Data size: 13207 Basic stats: COMPLETE Column stats: NONE
-                              Group By Operator
-                                aggregations: sum(hash(_col0)), sum(hash(_col1)), sum(hash(_col2)), sum(hash(_col3)), sum(hash(_col4)), sum(hash(_col7)), sum(hash(_col5)), sum(hash(_col6))
-                                mode: hash
+                              Select Operator
+                                expressions: hash(_col0) (type: int), hash(_col1) (type: int), hash(_col2) (type: int), hash(_col3) (type: int), hash(_col4) (type: int), hash(_col7) (type: int), hash(_col5) (type: int), hash(_col6) (type: int)
                                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
-                                Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE
-                                Reduce Output Operator
-                                  sort order: 
+                                Statistics: Num rows: 913 Data size: 13207 Basic stats: COMPLETE Column stats: NONE
+                                Group By Operator
+                                  aggregations: sum(_col0), sum(_col1), sum(_col2), sum(_col3), sum(_col4), sum(_col5), sum(_col6), sum(_col7)
+                                  mode: hash
+                                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
                                   Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE
-                                  value expressions: _col0 (type: bigint), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: bigint), _col4 (type: bigint), _col5 (type: bigint), _col6 (type: bigint), _col7 (type: bigint)
+                                  Reduce Output Operator
+                                    sort order: 
+                                    Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE
+                                    value expressions: _col0 (type: bigint), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: bigint), _col4 (type: bigint), _col5 (type: bigint), _col6 (type: bigint), _col7 (type: bigint)
       Local Work:
         Map Reduce Local Work
       Reduce Operator Tree:
@@ -1850,35 +1978,43 @@ STAGE PLANS:
   Stage: Stage-15
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        join3:join2:join1:smalltbl1 
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_0:$hdt$_1:smalltbl1 
           Fetch Operator
             limit: -1
-        join3:join2:smalltbl2 
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_1:smalltbl2 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        join3:join2:join1:smalltbl1 
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_0:$hdt$_1:smalltbl1 
           TableScan
             alias: smalltbl1
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 key1 (type: string)
-                  1 key (type: string)
-        join3:join2:smalltbl2 
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_1:smalltbl2 
           TableScan
             alias: smalltbl2
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: value is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col3 (type: string)
-                  1 value (type: string)
+              Select Operator
+                expressions: key (type: string), value (type: string)
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col3 (type: string)
+                    1 _col1 (type: string)
 
   Stage: Stage-12
     Map Reduce
@@ -1889,71 +2025,83 @@ STAGE PLANS:
             Filter Operator
               predicate: ((key1 is not null and value is not null) and key2 is not null) (type: boolean)
               Statistics: Num rows: 625 Data size: 9022 Basic stats: COMPLETE Column stats: NONE
-              Map Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 key1 (type: string)
-                  1 key (type: string)
-                outputColumnNames: _col0, _col1, _col2, _col6
-                Statistics: Num rows: 687 Data size: 9924 Basic stats: COMPLETE Column stats: NONE
-                Select Operator
-                  expressions: _col0 (type: string), _col1 (type: string), _col6 (type: string), _col2 (type: string), _col2 (type: string)
-                  outputColumnNames: _col0, _col1, _col2, _col3, _col4
+              Select Operator
+                expressions: key1 (type: string), key2 (type: string), value (type: string)
+                outputColumnNames: _col0, _col1, _col2
+                Statistics: Num rows: 625 Data size: 9022 Basic stats: COMPLETE Column stats: NONE
+                Map Join Operator
+                  condition map:
+                       Inner Join 0 to 1
+                  keys:
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3
                   Statistics: Num rows: 687 Data size: 9924 Basic stats: COMPLETE Column stats: NONE
-                  Map Join Operator
-                    condition map:
-                         Inner Join 0 to 1
-                    keys:
-                      0 _col3 (type: string)
-                      1 value (type: string)
-                    outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                    Statistics: Num rows: 755 Data size: 10916 Basic stats: COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col5 (type: string), _col3 (type: string), _col4 (type: string)
+                  Select Operator
+                    expressions: _col0 (type: string), _col1 (type: string), _col3 (type: string), _col2 (type: string), _col2 (type: string)
+                    outputColumnNames: _col0, _col1, _col2, _col3, _col4
+                    Statistics: Num rows: 687 Data size: 9924 Basic stats: COMPLETE Column stats: NONE
+                    Map Join Operator
+                      condition map:
+                           Inner Join 0 to 1
+                      keys:
+                        0 _col3 (type: string)
+                        1 _col1 (type: string)
                       outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
                       Statistics: Num rows: 755 Data size: 10916 Basic stats: COMPLETE Column stats: NONE
-                      File Output Operator
-                        compressed: false
-                        table:
-                            input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                            output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                            serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+                      Select Operator
+                        expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col5 (type: string), _col3 (type: string), _col4 (type: string)
+                        outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+                        Statistics: Num rows: 755 Data size: 10916 Basic stats: COMPLETE Column stats: NONE
+                        File Output Operator
+                          compressed: false
+                          table:
+                              input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                              output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                              serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
       Local Work:
         Map Reduce Local Work
 
   Stage: Stage-14
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        join3:smalltbl3 
+        $hdt$_0:$hdt$_0:$hdt$_1:smalltbl3 
           Fetch Operator
             limit: -1
-        smalltbl4 
+        $hdt$_0:$hdt$_1:smalltbl4 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        join3:smalltbl3 
+        $hdt$_0:$hdt$_0:$hdt$_1:smalltbl3 
           TableScan
             alias: smalltbl3
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col1 (type: string)
-                  1 key (type: string)
-        smalltbl4 
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col1 (type: string)
+                    1 _col0 (type: string)
+        $hdt$_0:$hdt$_1:smalltbl4 
           TableScan
             alias: smalltbl4
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col2 (type: string)
-                  1 key (type: string)
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col2 (type: string)
+                    1 _col0 (type: string)
 
   Stage: Stage-5
     Map Reduce
@@ -1964,7 +2112,7 @@ STAGE PLANS:
                    Inner Join 0 to 1
               keys:
                 0 _col1 (type: string)
-                1 key (type: string)
+                1 _col0 (type: string)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
               Statistics: Num rows: 830 Data size: 12007 Basic stats: COMPLETE Column stats: NONE
               Select Operator
@@ -1976,15 +2124,15 @@ STAGE PLANS:
                        Inner Join 0 to 1
                   keys:
                     0 _col2 (type: string)
-                    1 key (type: string)
+                    1 _col0 (type: string)
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
                   Statistics: Num rows: 913 Data size: 13207 Basic stats: COMPLETE Column stats: NONE
                   Select Operator
-                    expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col7 (type: string), _col5 (type: string), _col6 (type: string)
-                    outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col7, _col5, _col6
+                    expressions: hash(_col0) (type: int), hash(_col1) (type: int), hash(_col2) (type: int), hash(_col3) (type: int), hash(_col4) (type: int), hash(_col7) (type: int), hash(_col5) (type: int), hash(_col6) (type: int)
+                    outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
                     Statistics: Num rows: 913 Data size: 13207 Basic stats: COMPLETE Column stats: NONE
                     Group By Operator
-                      aggregations: sum(hash(_col0)), sum(hash(_col1)), sum(hash(_col2)), sum(hash(_col3)), sum(hash(_col4)), sum(hash(_col7)), sum(hash(_col5)), sum(hash(_col6))
+                      aggregations: sum(_col0), sum(_col1), sum(_col2), sum(_col3), sum(_col4), sum(_col5), sum(_col6), sum(_col7)
                       mode: hash
                       outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
                       Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE
@@ -2200,21 +2348,25 @@ STAGE PLANS:
   Stage: Stage-28
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        join3:join2:join1:smalltbl1 
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_0:$hdt$_1:smalltbl1 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        join3:join2:join1:smalltbl1 
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_0:$hdt$_1:smalltbl1 
           TableScan
             alias: smalltbl1
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 key1 (type: string)
-                  1 key (type: string)
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
 
   Stage: Stage-19
     Map Reduce
@@ -2225,24 +2377,28 @@ STAGE PLANS:
             Filter Operator
               predicate: ((key1 is not null and value is not null) and key2 is not null) (type: boolean)
               Statistics: Num rows: 625 Data size: 9022 Basic stats: COMPLETE Column stats: NONE
-              Map Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 key1 (type: string)
-                  1 key (type: string)
-                outputColumnNames: _col0, _col1, _col2, _col6
-                Statistics: Num rows: 687 Data size: 9924 Basic stats: COMPLETE Column stats: NONE
-                Select Operator
-                  expressions: _col0 (type: string), _col1 (type: string), _col6 (type: string), _col2 (type: string), _col2 (type: string)
-                  outputColumnNames: _col0, _col1, _col2, _col3, _col4
+              Select Operator
+                expressions: key1 (type: string), key2 (type: string), value (type: string)
+                outputColumnNames: _col0, _col1, _col2
+                Statistics: Num rows: 625 Data size: 9022 Basic stats: COMPLETE Column stats: NONE
+                Map Join Operator
+                  condition map:
+                       Inner Join 0 to 1
+                  keys:
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3
                   Statistics: Num rows: 687 Data size: 9924 Basic stats: COMPLETE Column stats: NONE
-                  File Output Operator
-                    compressed: false
-                    table:
-                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                        serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+                  Select Operator
+                    expressions: _col0 (type: string), _col1 (type: string), _col3 (type: string), _col2 (type: string), _col2 (type: string)
+                    outputColumnNames: _col0, _col1, _col2, _col3, _col4
+                    Statistics: Num rows: 687 Data size: 9924 Basic stats: COMPLETE Column stats: NONE
+                    File Output Operator
+                      compressed: false
+                      table:
+                          input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                          output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                          serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
       Local Work:
         Map Reduce Local Work
 
@@ -2252,21 +2408,25 @@ STAGE PLANS:
   Stage: Stage-26
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        join3:join2:smalltbl2 
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_1:smalltbl2 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        join3:join2:smalltbl2 
+        $hdt$_0:$hdt$_0:$hdt$_0:$hdt$_1:smalltbl2 
           TableScan
             alias: smalltbl2
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: value is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col3 (type: string)
-                  1 value (type: string)
+              Select Operator
+                expressions: key (type: string), value (type: string)
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col3 (type: string)
+                    1 _col1 (type: string)
 
   Stage: Stage-16
     Map Reduce
@@ -2277,7 +2437,7 @@ STAGE PLANS:
                    Inner Join 0 to 1
               keys:
                 0 _col3 (type: string)
-                1 value (type: string)
+                1 _col1 (type: string)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
               Statistics: Num rows: 755 Data size: 10916 Basic stats: COMPLETE Column stats: NONE
               Select Operator
@@ -2299,21 +2459,25 @@ STAGE PLANS:
   Stage: Stage-24
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        join3:smalltbl3 
+        $hdt$_0:$hdt$_0:$hdt$_1:smalltbl3 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        join3:smalltbl3 
+        $hdt$_0:$hdt$_0:$hdt$_1:smalltbl3 
           TableScan
             alias: smalltbl3
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col1 (type: string)
-                  1 key (type: string)
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col1 (type: string)
+                    1 _col0 (type: string)
 
   Stage: Stage-13
     Map Reduce
@@ -2324,7 +2488,7 @@ STAGE PLANS:
                    Inner Join 0 to 1
               keys:
                 0 _col1 (type: string)
-                1 key (type: string)
+                1 _col0 (type: string)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
               Statistics: Num rows: 830 Data size: 12007 Basic stats: COMPLETE Column stats: NONE
               Select Operator
@@ -2346,21 +2510,25 @@ STAGE PLANS:
   Stage: Stage-22
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        smalltbl4 
+        $hdt$_0:$hdt$_1:smalltbl4 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        smalltbl4 
+        $hdt$_0:$hdt$_1:smalltbl4 
           TableScan
             alias: smalltbl4
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col2 (type: string)
-                  1 key (type: string)
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                HashTable Sink Operator
+                  keys:
+                    0 _col2 (type: string)
+                    1 _col0 (type: string)
 
   Stage: Stage-10
     Map Reduce
@@ -2371,15 +2539,15 @@ STAGE PLANS:
                    Inner Join 0 to 1
               keys:
                 0 _col2 (type: string)
-                1 key (type: string)
+                1 _col0 (type: string)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
               Statistics: Num rows: 913 Data size: 13207 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col7 (type: string), _col5 (type: string), _col6 (type: string)
-                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col7, _col5, _col6
+                expressions: hash(_col0) (type: int), hash(_col1) (type: int), hash(_col2) (type: int), hash(_col3) (type: int), hash(_col4) (type: int), hash(_col7) (type: int), hash(_col5) (type: int), hash(_col6) (type: int)
+                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
                 Statistics: Num rows: 913 Data size: 13207 Basic stats: COMPLETE Column stats: NONE
                 Group By Operator
-                  aggregations: sum(hash(_col0)), sum(hash(_col1)), sum(hash(_col2)), sum(hash(_col3)), sum(hash(_col4)), sum(hash(_col7)), sum(hash(_col5)), sum(hash(_col6))
+                  aggregations: sum(_col0), sum(_col1), sum(_col2), sum(_col3), sum(_col4), sum(_col5), sum(_col6), sum(_col7)
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
                   Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE
@@ -2417,16 +2585,16 @@ STAGE PLANS:
   Stage: Stage-23
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        $INTNAME 
+        $hdt$_0:$INTNAME 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        $INTNAME 
+        $hdt$_0:$INTNAME 
           TableScan
             HashTable Sink Operator
               keys:
                 0 _col2 (type: string)
-                1 key (type: string)
+                1 _col0 (type: string)
 
   Stage: Stage-11
     Map Reduce
@@ -2437,29 +2605,33 @@ STAGE PLANS:
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              Map Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 _col2 (type: string)
-                  1 key (type: string)
-                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
-                Statistics: Num rows: 913 Data size: 13207 Basic stats: COMPLETE Column stats: NONE
-                Select Operator
-                  expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col7 (type: string), _col5 (type: string), _col6 (type: string)
-                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col7, _col5, _col6
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
+                Map Join Operator
+                  condition map:
+                       Inner Join 0 to 1
+                  keys:
+                    0 _col2 (type: string)
+                    1 _col0 (type: string)
+                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
                   Statistics: Num rows: 913 Data size: 13207 Basic stats: COMPLETE Column stats: NONE
-                  Group By Operator
-                    aggregations: sum(hash(_col0)), sum(hash(_col1)), sum(hash(_col2)), sum(hash(_col3)), sum(hash(_col4)), sum(hash(_col7)), sum(hash(_col5)), sum(hash(_col6))
-                    mode: hash
+                  Select Operator
+                    expressions: hash(_col0) (type: int), hash(_col1) (type: int), hash(_col2) (type: int), hash(_col3) (type: int), hash(_col4) (type: int), hash(_col7) (type: int), hash(_col5) (type: int), hash(_col6) (type: int)
                     outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
-                    Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE
-                    File Output Operator
-                      compressed: false
-                      table:
-                          input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                          output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                          serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+                    Statistics: Num rows: 913 Data size: 13207 Basic stats: COMPLETE Column stats: NONE
+                    Group By Operator
+                      aggregations: sum(_col0), sum(_col1), sum(_col2), sum(_col3), sum(_col4), sum(_col5), sum(_col6), sum(_col7)
+                      mode: hash
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
+                      Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE
+                      File Output Operator
+                        compressed: false
+                        table:
+                            input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                            output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                            serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
       Local Work:
         Map Reduce Local Work
 
@@ -2479,26 +2651,30 @@ STAGE PLANS:
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: key (type: string)
-                sort order: +
-                Map-reduce partition columns: key (type: string)
+              Select Operator
+                expressions: key (type: string)
+      

<TRUNCATED>