You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by kg...@apache.org on 2018/06/11 06:35:15 UTC

[01/14] hive git commit: HIVE-19237: Only use an operatorId once in a plan (Zoltan Haindrich reviewed by Ashutosh Chauhan)

Repository: hive
Updated Branches:
  refs/heads/master 24a98ea24 -> f37fef06f


http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/tez/explainanalyze_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/tez/explainanalyze_1.q.out b/ql/src/test/results/clientpositive/tez/explainanalyze_1.q.out
index c253fd2..f32397a 100644
--- a/ql/src/test/results/clientpositive/tez/explainanalyze_1.q.out
+++ b/ql/src/test/results/clientpositive/tez/explainanalyze_1.q.out
@@ -22,20 +22,20 @@ Stage-0
     Stage-1
       Union 2
       <-Map 1 [CONTAINS]
-        File Output Operator [FS_7]
-          Limit [LIM_6] (rows=10/20 width=178)
+        File Output Operator [FS_12]
+          Limit [LIM_11] (rows=10/10 width=178)
             Number of rows:10
-            Select Operator [SEL_1] (rows=500/12 width=178)
+            Select Operator [SEL_9] (rows=500/12 width=178)
               Output:["_col0","_col1"]
-              TableScan [TS_0] (rows=500/13 width=178)
+              TableScan [TS_8] (rows=500/13 width=178)
                 Output:["key","value"]
       <-Map 3 [CONTAINS]
-        File Output Operator [FS_7]
-          Limit [LIM_6] (rows=10/20 width=178)
+        File Output Operator [FS_17]
+          Limit [LIM_16] (rows=10/10 width=178)
             Number of rows:10
-            Select Operator [SEL_3] (rows=500/12 width=178)
+            Select Operator [SEL_14] (rows=500/12 width=178)
               Output:["_col0","_col1"]
-              TableScan [TS_2] (rows=500/13 width=178)
+              TableScan [TS_13] (rows=500/13 width=178)
                 Output:["key","value"]
 
 PREHOOK: query: select key from src
@@ -132,8 +132,8 @@ Stage-3
           Dependency Collection{}
             Stage-1
               Reducer 2
-              File Output Operator [FS_5]
-                Group By Operator [GBY_3] (rows=1/1 width=440)
+              File Output Operator [FS_8]
+                Group By Operator [GBY_6] (rows=1/1 width=440)
                   Output:["_col0"],aggregations:["compute_stats(VALUE._col0, 'hll')"]
                 <-Map 1 [CUSTOM_SIMPLE_EDGE]
                   File Output Operator [FS_2]
@@ -142,8 +142,8 @@ Stage-3
                       Output:["_col0"]
                       TableScan [TS_0] (rows=500/500 width=87)
                         default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
-                  PARTITION_ONLY_SHUFFLE [RS_2]
-                    Select Operator [SEL_1] (rows=500/500 width=87)
+                  PARTITION_ONLY_SHUFFLE [RS_5]
+                    Select Operator [SEL_4] (rows=500/500 width=87)
                       Output:["key"]
                        Please refer to the previous Select Operator [SEL_1]
 
@@ -401,16 +401,16 @@ Stage-0
     Stage-1
       Union 2
       <-Map 1 [CONTAINS]
-        File Output Operator [FS_6]
-          Select Operator [SEL_1] (rows=500/500 width=178)
+        File Output Operator [FS_10]
+          Select Operator [SEL_8] (rows=500/500 width=178)
             Output:["_col0","_col1"]
-            TableScan [TS_0] (rows=500/500 width=178)
+            TableScan [TS_7] (rows=500/500 width=178)
               Output:["key","value"]
       <-Map 3 [CONTAINS]
-        File Output Operator [FS_6]
-          Select Operator [SEL_3] (rows=500/500 width=178)
+        File Output Operator [FS_14]
+          Select Operator [SEL_12] (rows=500/500 width=178)
             Output:["_col0","_col1"]
-            TableScan [TS_2] (rows=500/500 width=178)
+            TableScan [TS_11] (rows=500/500 width=178)
               Output:["key","value"]
 
 PREHOOK: query: select count(*) from (select * from src a union all select * from src b)subq

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/tez/explainanalyze_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/tez/explainanalyze_3.q.out b/ql/src/test/results/clientpositive/tez/explainanalyze_3.q.out
index 42bad01..a6eb4e5 100644
--- a/ql/src/test/results/clientpositive/tez/explainanalyze_3.q.out
+++ b/ql/src/test/results/clientpositive/tez/explainanalyze_3.q.out
@@ -669,22 +669,22 @@ Stage-3
                   Conditional Operator
                     Stage-1
                       Reducer 2
-                      File Output Operator [FS_5]
-                        Group By Operator [GBY_3] (rows=1/1 width=2760)
+                      File Output Operator [FS_9]
+                        Group By Operator [GBY_7] (rows=1/1 width=2760)
                           Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["compute_stats(VALUE._col0, 'hll')","compute_stats(VALUE._col2, 'hll')","compute_stats(VALUE._col3, 'hll')","compute_stats(VALUE._col4, 'hll')","compute_stats(VALUE._col5, 'hll')"]
                         <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized
-                          File Output Operator [FS_8]
+                          File Output Operator [FS_14]
                             table:{"name:":"default.orc_merge5_n1"}
-                            Select Operator [SEL_7] (rows=1/3 width=352)
+                            Select Operator [SEL_13] (rows=1/3 width=352)
                               Output:["_col0","_col1","_col2","_col3","_col4"]
-                              Filter Operator [FIL_6] (rows=1/3 width=352)
+                              Filter Operator [FIL_12] (rows=1/3 width=352)
                                 predicate:(userid <= 13L)
                                 TableScan [TS_0] (rows=1/15000 width=352)
                                   default@orc_merge5_n1,orc_merge5_n1,Tbl:COMPLETE,Col:NONE,Output:["userid","string1","subtype","decimal1","ts"]
-                          PARTITION_ONLY_SHUFFLE [RS_7]
-                            Select Operator [SEL_6] (rows=1/3 width=352)
+                          PARTITION_ONLY_SHUFFLE [RS_16]
+                            Select Operator [SEL_15] (rows=1/3 width=352)
                               Output:["userid","string1","subtype","decimal1","ts"]
-                               Please refer to the previous Select Operator [SEL_7]
+                               Please refer to the previous Select Operator [SEL_13]
             Stage-4(CONDITIONAL)
               File Merge
                  Please refer to the previous Stage-8(CONDITIONAL CHILD TASKS: Stage-5, Stage-4, Stage-6)

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/tez/explainanalyze_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/tez/explainanalyze_5.q.out b/ql/src/test/results/clientpositive/tez/explainanalyze_5.q.out
index 75f29fa..7df06ba 100644
--- a/ql/src/test/results/clientpositive/tez/explainanalyze_5.q.out
+++ b/ql/src/test/results/clientpositive/tez/explainanalyze_5.q.out
@@ -108,22 +108,22 @@ Stage-3
           Dependency Collection{}
             Stage-1
               Reducer 5
-              File Output Operator [FS_5]
-                Group By Operator [GBY_3] (rows=1/1 width=880)
+              File Output Operator [FS_25]
+                Group By Operator [GBY_23] (rows=1/1 width=880)
                   Output:["_col0","_col1"],aggregations:["compute_stats(VALUE._col0, 'hll')","compute_stats(VALUE._col2, 'hll')"]
                 <-Reducer 4 [CUSTOM_SIMPLE_EDGE]
                   File Output Operator [FS_19]
                     table:{"name:":"default.src_multi2_n7"}
                     Select Operator [SEL_18] (rows=830/508 width=178)
                       Output:["_col0","_col1"]
-                      Merge Join Operator [MERGEJOIN_26] (rows=830/508 width=178)
+                      Merge Join Operator [MERGEJOIN_32] (rows=830/508 width=178)
                         Conds:RS_15._col0=RS_16._col0(Inner),Output:["_col0","_col3"]
                       <-Map 7 [SIMPLE_EDGE]
                         SHUFFLE [RS_16]
                           PartitionCols:_col0
                           Select Operator [SEL_14] (rows=500/500 width=178)
                             Output:["_col0","_col1"]
-                            Filter Operator [FIL_25] (rows=500/500 width=178)
+                            Filter Operator [FIL_31] (rows=500/500 width=178)
                               predicate:key is not null
                               TableScan [TS_12] (rows=500/500 width=178)
                                 default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
@@ -136,25 +136,25 @@ Stage-3
                               Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                             <-Union 2 [SIMPLE_EDGE]
                               <-Map 1 [CONTAINS]
-                                Reduce Output Operator [RS_9]
+                                Reduce Output Operator [RS_37]
                                   PartitionCols:_col0, _col1
-                                  Select Operator [SEL_2] (rows=500/500 width=178)
+                                  Select Operator [SEL_35] (rows=500/500 width=178)
                                     Output:["_col0","_col1"]
-                                    Filter Operator [FIL_23] (rows=500/500 width=178)
+                                    Filter Operator [FIL_34] (rows=500/500 width=178)
                                       predicate:key is not null
-                                      TableScan [TS_0] (rows=500/500 width=178)
+                                      TableScan [TS_33] (rows=500/500 width=178)
                                         Output:["key","value"]
                               <-Map 6 [CONTAINS]
-                                Reduce Output Operator [RS_9]
+                                Reduce Output Operator [RS_42]
                                   PartitionCols:_col0, _col1
-                                  Select Operator [SEL_5] (rows=25/25 width=175)
+                                  Select Operator [SEL_40] (rows=25/25 width=175)
                                     Output:["_col0","_col1"]
-                                    Filter Operator [FIL_24] (rows=25/25 width=175)
+                                    Filter Operator [FIL_39] (rows=25/25 width=175)
                                       predicate:key is not null
-                                      TableScan [TS_3] (rows=25/25 width=175)
+                                      TableScan [TS_38] (rows=25/25 width=175)
                                         Output:["key","value"]
-                  PARTITION_ONLY_SHUFFLE [RS_2]
-                    Select Operator [SEL_1] (rows=830/508 width=178)
+                  PARTITION_ONLY_SHUFFLE [RS_22]
+                    Select Operator [SEL_21] (rows=830/508 width=178)
                       Output:["key","value"]
                        Please refer to the previous Select Operator [SEL_18]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/tez/explainuser_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/tez/explainuser_3.q.out b/ql/src/test/results/clientpositive/tez/explainuser_3.q.out
index d993905..4196b31 100644
--- a/ql/src/test/results/clientpositive/tez/explainuser_3.q.out
+++ b/ql/src/test/results/clientpositive/tez/explainuser_3.q.out
@@ -511,22 +511,22 @@ Stage-3
                   Conditional Operator
                     Stage-1
                       Reducer 2
-                      File Output Operator [FS_6]
-                        Group By Operator [GBY_4] (rows=1 width=2760)
+                      File Output Operator [FS_10]
+                        Group By Operator [GBY_8] (rows=1 width=2760)
                           Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["compute_stats(VALUE._col0)","compute_stats(VALUE._col1)","compute_stats(VALUE._col2)","compute_stats(VALUE._col3)","compute_stats(VALUE._col4)"]
                         <-Map 1 [CUSTOM_SIMPLE_EDGE]
                           File Output Operator [FS_3]
                             table:{"name:":"default.orc_merge5_n0"}
                             Select Operator [SEL_2] (rows=1 width=352)
                               Output:["_col0","_col1","_col2","_col3","_col4"]
-                              Filter Operator [FIL_4] (rows=1 width=352)
+                              Filter Operator [FIL_11] (rows=1 width=352)
                                 predicate:(userid <= 13L)
                                 TableScan [TS_0] (rows=1 width=352)
                                   default@orc_merge5_n0,orc_merge5_n0,Tbl:COMPLETE,Col:NONE,Output:["userid","string1","subtype","decimal1","ts"]
-                          PARTITION_ONLY_SHUFFLE [RS_3]
-                            Group By Operator [GBY_2] (rows=1 width=2696)
+                          PARTITION_ONLY_SHUFFLE [RS_7]
+                            Group By Operator [GBY_6] (rows=1 width=2696)
                               Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["compute_stats(userid, 'hll')","compute_stats(string1, 'hll')","compute_stats(subtype, 'hll')","compute_stats(decimal1, 'hll')","compute_stats(ts, 'hll')"]
-                              Select Operator [SEL_1] (rows=1 width=352)
+                              Select Operator [SEL_5] (rows=1 width=352)
                                 Output:["userid","string1","subtype","decimal1","ts"]
                                  Please refer to the previous Select Operator [SEL_2]
             Stage-4(CONDITIONAL)

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/vector_groupby_mapjoin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vector_groupby_mapjoin.q.out b/ql/src/test/results/clientpositive/vector_groupby_mapjoin.q.out
index 01c5096..4be1272 100644
--- a/ql/src/test/results/clientpositive/vector_groupby_mapjoin.q.out
+++ b/ql/src/test/results/clientpositive/vector_groupby_mapjoin.q.out
@@ -1,4 +1,4 @@
-Warning: Map Join MAPJOIN[34][bigTable=?] in task 'Stage-8:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[42][bigTable=?] in task 'Stage-8:MAPRED' is a cross product
 PREHOOK: query: explain vectorization expression
 select *
 from src
@@ -389,7 +389,7 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-Warning: Map Join MAPJOIN[34][bigTable=?] in task 'Stage-8:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[42][bigTable=?] in task 'Stage-8:MAPRED' is a cross product
 PREHOOK: query: select *
 from src
 where not key in
@@ -418,7 +418,7 @@ POSTHOOK: Output: database:default
 POSTHOOK: Output: default@orcsrc
 POSTHOOK: Lineage: orcsrc.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: orcsrc.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-Warning: Map Join MAPJOIN[34][bigTable=?] in task 'Stage-8:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[42][bigTable=?] in task 'Stage-8:MAPRED' is a cross product
 PREHOOK: query: select *
 from orcsrc
 where not key in
@@ -435,7 +435,7 @@ order by key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orcsrc
 #### A masked pattern was here ####
-Warning: Map Join MAPJOIN[34][bigTable=?] in task 'Stage-8:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[42][bigTable=?] in task 'Stage-8:MAPRED' is a cross product
 PREHOOK: query: select *
 from orcsrc
 where not key in


[10/14] hive git commit: HIVE-19237: Only use an operatorId once in a plan (Zoltan Haindrich reviewed by Ashutosh Chauhan)

Posted by kg...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/llap/explainuser_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/explainuser_2.q.out b/ql/src/test/results/clientpositive/llap/explainuser_2.q.out
index 735915e..ea32d34 100644
--- a/ql/src/test/results/clientpositive/llap/explainuser_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/explainuser_2.q.out
@@ -460,124 +460,124 @@ Stage-0
     limit:-1
     Stage-1
       Reducer 5 vectorized, llap
-      File Output Operator [FS_96]
-        Group By Operator [GBY_95] (rows=33 width=177)
+      File Output Operator [FS_130]
+        Group By Operator [GBY_129] (rows=33 width=177)
           Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
         <-Union 4 [SIMPLE_EDGE]
           <-Reducer 3 [CONTAINS] llap
-            Reduce Output Operator [RS_56]
+            Reduce Output Operator [RS_88]
               PartitionCols:_col0, _col1
-              Group By Operator [GBY_55] (rows=33 width=177)
+              Group By Operator [GBY_87] (rows=33 width=177)
                 Output:["_col0","_col1"],keys:_col0, _col1
-                Select Operator [SEL_25] (rows=33 width=177)
+                Select Operator [SEL_85] (rows=33 width=177)
                   Output:["_col0","_col1"]
-                  Merge Join Operator [MERGEJOIN_82] (rows=33 width=177)
-                    Conds:RS_22._col2=RS_94._col1(Inner),Output:["_col1","_col4"]
+                  Merge Join Operator [MERGEJOIN_84] (rows=33 width=177)
+                    Conds:RS_22._col2=RS_128._col1(Inner),Output:["_col1","_col4"]
                   <-Reducer 11 [SIMPLE_EDGE] vectorized, llap
-                    SHUFFLE [RS_94]
+                    SHUFFLE [RS_128]
                       PartitionCols:_col1
-                      Select Operator [SEL_93] (rows=262 width=178)
+                      Select Operator [SEL_127] (rows=262 width=178)
                         Output:["_col1"]
-                        Group By Operator [GBY_92] (rows=262 width=178)
+                        Group By Operator [GBY_126] (rows=262 width=178)
                           Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                         <-Union 10 [SIMPLE_EDGE]
                           <-Map 12 [CONTAINS] vectorized, llap
-                            Reduce Output Operator [RS_107]
+                            Reduce Output Operator [RS_141]
                               PartitionCols:_col0, _col1
-                              Group By Operator [GBY_106] (rows=262 width=178)
+                              Group By Operator [GBY_140] (rows=262 width=178)
                                 Output:["_col0","_col1"],keys:_col1, _col0
-                                Select Operator [SEL_105] (rows=500 width=178)
+                                Select Operator [SEL_139] (rows=500 width=178)
                                   Output:["_col0","_col1"]
-                                  Filter Operator [FIL_104] (rows=500 width=178)
+                                  Filter Operator [FIL_138] (rows=500 width=178)
                                     predicate:value is not null
-                                    TableScan [TS_9] (rows=500 width=178)
+                                    TableScan [TS_100] (rows=500 width=178)
                                       Output:["key","value"]
                           <-Map 9 [CONTAINS] vectorized, llap
-                            Reduce Output Operator [RS_103]
+                            Reduce Output Operator [RS_137]
                               PartitionCols:_col0, _col1
-                              Group By Operator [GBY_102] (rows=262 width=178)
+                              Group By Operator [GBY_136] (rows=262 width=178)
                                 Output:["_col0","_col1"],keys:_col1, _col0
-                                Select Operator [SEL_101] (rows=25 width=175)
+                                Select Operator [SEL_135] (rows=25 width=175)
                                   Output:["_col0","_col1"]
-                                  Filter Operator [FIL_100] (rows=25 width=175)
+                                  Filter Operator [FIL_134] (rows=25 width=175)
                                     predicate:value is not null
-                                    TableScan [TS_6] (rows=25 width=175)
+                                    TableScan [TS_94] (rows=25 width=175)
                                       Output:["key","value"]
                   <-Reducer 2 [SIMPLE_EDGE] llap
                     SHUFFLE [RS_22]
                       PartitionCols:_col2
                       Merge Join Operator [MERGEJOIN_80] (rows=39 width=175)
-                        Conds:RS_86._col0=RS_90._col0(Inner),Output:["_col1","_col2"]
+                        Conds:RS_120._col0=RS_124._col0(Inner),Output:["_col1","_col2"]
                       <-Map 1 [SIMPLE_EDGE] vectorized, llap
-                        SHUFFLE [RS_86]
+                        SHUFFLE [RS_120]
                           PartitionCols:_col0
-                          Select Operator [SEL_85] (rows=500 width=87)
+                          Select Operator [SEL_119] (rows=500 width=87)
                             Output:["_col0"]
-                            Filter Operator [FIL_84] (rows=500 width=87)
+                            Filter Operator [FIL_118] (rows=500 width=87)
                               predicate:key is not null
                               TableScan [TS_0] (rows=500 width=87)
                                 default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
                       <-Map 8 [SIMPLE_EDGE] vectorized, llap
-                        SHUFFLE [RS_90]
+                        SHUFFLE [RS_124]
                           PartitionCols:_col0
-                          Select Operator [SEL_89] (rows=25 width=175)
+                          Select Operator [SEL_123] (rows=25 width=175)
                             Output:["_col0","_col1"]
-                            Filter Operator [FIL_88] (rows=25 width=175)
+                            Filter Operator [FIL_122] (rows=25 width=175)
                               predicate:(key is not null and value is not null)
                               TableScan [TS_3] (rows=25 width=175)
                                 default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
           <-Reducer 7 [CONTAINS] llap
-            Reduce Output Operator [RS_56]
+            Reduce Output Operator [RS_93]
               PartitionCols:_col0, _col1
-              Group By Operator [GBY_55] (rows=33 width=177)
+              Group By Operator [GBY_92] (rows=33 width=177)
                 Output:["_col0","_col1"],keys:_col0, _col1
-                Select Operator [SEL_51] (rows=33 width=177)
+                Select Operator [SEL_90] (rows=33 width=177)
                   Output:["_col0","_col1"]
-                  Merge Join Operator [MERGEJOIN_83] (rows=33 width=177)
-                    Conds:RS_48._col2=RS_99._col1(Inner),Output:["_col1","_col4"]
+                  Merge Join Operator [MERGEJOIN_89] (rows=33 width=177)
+                    Conds:RS_48._col2=RS_133._col1(Inner),Output:["_col1","_col4"]
                   <-Reducer 15 [SIMPLE_EDGE] vectorized, llap
-                    SHUFFLE [RS_99]
+                    SHUFFLE [RS_133]
                       PartitionCols:_col1
-                      Select Operator [SEL_98] (rows=262 width=178)
+                      Select Operator [SEL_132] (rows=262 width=178)
                         Output:["_col1"]
-                        Group By Operator [GBY_97] (rows=262 width=178)
+                        Group By Operator [GBY_131] (rows=262 width=178)
                           Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                         <-Union 14 [SIMPLE_EDGE]
                           <-Map 13 [CONTAINS] vectorized, llap
-                            Reduce Output Operator [RS_111]
+                            Reduce Output Operator [RS_145]
                               PartitionCols:_col0, _col1
-                              Group By Operator [GBY_110] (rows=262 width=178)
+                              Group By Operator [GBY_144] (rows=262 width=178)
                                 Output:["_col0","_col1"],keys:_col1, _col0
-                                Select Operator [SEL_109] (rows=25 width=175)
+                                Select Operator [SEL_143] (rows=25 width=175)
                                   Output:["_col0","_col1"]
-                                  Filter Operator [FIL_108] (rows=25 width=175)
+                                  Filter Operator [FIL_142] (rows=25 width=175)
                                     predicate:value is not null
-                                    TableScan [TS_32] (rows=25 width=175)
+                                    TableScan [TS_106] (rows=25 width=175)
                                       Output:["key","value"]
                           <-Map 16 [CONTAINS] vectorized, llap
-                            Reduce Output Operator [RS_115]
+                            Reduce Output Operator [RS_149]
                               PartitionCols:_col0, _col1
-                              Group By Operator [GBY_114] (rows=262 width=178)
+                              Group By Operator [GBY_148] (rows=262 width=178)
                                 Output:["_col0","_col1"],keys:_col1, _col0
-                                Select Operator [SEL_113] (rows=500 width=178)
+                                Select Operator [SEL_147] (rows=500 width=178)
                                   Output:["_col0","_col1"]
-                                  Filter Operator [FIL_112] (rows=500 width=178)
+                                  Filter Operator [FIL_146] (rows=500 width=178)
                                     predicate:value is not null
-                                    TableScan [TS_35] (rows=500 width=178)
+                                    TableScan [TS_112] (rows=500 width=178)
                                       Output:["key","value"]
                   <-Reducer 6 [SIMPLE_EDGE] llap
                     SHUFFLE [RS_48]
                       PartitionCols:_col2
                       Merge Join Operator [MERGEJOIN_81] (rows=39 width=175)
-                        Conds:RS_87._col0=RS_91._col0(Inner),Output:["_col1","_col2"]
+                        Conds:RS_121._col0=RS_125._col0(Inner),Output:["_col1","_col2"]
                       <-Map 1 [SIMPLE_EDGE] vectorized, llap
-                        SHUFFLE [RS_87]
+                        SHUFFLE [RS_121]
                           PartitionCols:_col0
-                           Please refer to the previous Select Operator [SEL_85]
+                           Please refer to the previous Select Operator [SEL_119]
                       <-Map 8 [SIMPLE_EDGE] vectorized, llap
-                        SHUFFLE [RS_91]
+                        SHUFFLE [RS_125]
                           PartitionCols:_col0
-                           Please refer to the previous Select Operator [SEL_89]
+                           Please refer to the previous Select Operator [SEL_123]
 
 PREHOOK: query: explain
 SELECT x.key, y.value
@@ -636,237 +636,237 @@ Stage-0
     limit:-1
     Stage-1
       Reducer 7 vectorized, llap
-      File Output Operator [FS_180]
-        Group By Operator [GBY_179] (rows=47 width=177)
+      File Output Operator [FS_268]
+        Group By Operator [GBY_267] (rows=47 width=177)
           Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
         <-Union 6 [SIMPLE_EDGE]
           <-Reducer 5 [CONTAINS] vectorized, llap
-            Reduce Output Operator [RS_178]
+            Reduce Output Operator [RS_266]
               PartitionCols:_col0, _col1
-              Group By Operator [GBY_177] (rows=47 width=177)
+              Group By Operator [GBY_265] (rows=47 width=177)
                 Output:["_col0","_col1"],keys:_col0, _col1
-                Group By Operator [GBY_176] (rows=40 width=177)
+                Group By Operator [GBY_264] (rows=40 width=177)
                   Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                 <-Union 4 [SIMPLE_EDGE]
                   <-Reducer 10 [CONTAINS] llap
-                    Reduce Output Operator [RS_66]
+                    Reduce Output Operator [RS_183]
                       PartitionCols:_col0, _col1
-                      Group By Operator [GBY_65] (rows=40 width=177)
+                      Group By Operator [GBY_182] (rows=40 width=177)
                         Output:["_col0","_col1"],keys:_col0, _col1
-                        Select Operator [SEL_61] (rows=48 width=177)
+                        Select Operator [SEL_180] (rows=48 width=177)
                           Output:["_col0","_col1"]
-                          Merge Join Operator [MERGEJOIN_163] (rows=48 width=177)
-                            Conds:RS_58._col3=RS_186._col1(Inner),Output:["_col1","_col2"]
+                          Merge Join Operator [MERGEJOIN_179] (rows=48 width=177)
+                            Conds:RS_58._col3=RS_274._col1(Inner),Output:["_col1","_col2"]
                           <-Reducer 20 [SIMPLE_EDGE] vectorized, llap
-                            SHUFFLE [RS_186]
+                            SHUFFLE [RS_274]
                               PartitionCols:_col1
-                              Select Operator [SEL_185] (rows=381 width=178)
+                              Select Operator [SEL_273] (rows=381 width=178)
                                 Output:["_col1"]
-                                Group By Operator [GBY_184] (rows=381 width=178)
+                                Group By Operator [GBY_272] (rows=381 width=178)
                                   Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                 <-Union 19 [SIMPLE_EDGE]
                                   <-Map 22 [CONTAINS] vectorized, llap
-                                    Reduce Output Operator [RS_210]
+                                    Reduce Output Operator [RS_298]
                                       PartitionCols:_col0, _col1
-                                      Group By Operator [GBY_209] (rows=381 width=178)
+                                      Group By Operator [GBY_297] (rows=381 width=178)
                                         Output:["_col0","_col1"],keys:_col1, _col0
-                                        Select Operator [SEL_208] (rows=500 width=178)
+                                        Select Operator [SEL_296] (rows=500 width=178)
                                           Output:["_col0","_col1"]
-                                          Filter Operator [FIL_207] (rows=500 width=178)
+                                          Filter Operator [FIL_295] (rows=500 width=178)
                                             predicate:value is not null
-                                            TableScan [TS_45] (rows=500 width=178)
+                                            TableScan [TS_213] (rows=500 width=178)
                                               Output:["key","value"]
                                   <-Reducer 18 [CONTAINS] vectorized, llap
-                                    Reduce Output Operator [RS_202]
+                                    Reduce Output Operator [RS_290]
                                       PartitionCols:_col0, _col1
-                                      Group By Operator [GBY_201] (rows=381 width=178)
+                                      Group By Operator [GBY_289] (rows=381 width=178)
                                         Output:["_col0","_col1"],keys:_col1, _col0
-                                        Select Operator [SEL_200] (rows=262 width=178)
+                                        Select Operator [SEL_288] (rows=262 width=178)
                                           Output:["_col0","_col1"]
-                                          Group By Operator [GBY_199] (rows=262 width=178)
+                                          Group By Operator [GBY_287] (rows=262 width=178)
                                             Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                           <-Union 17 [SIMPLE_EDGE]
                                             <-Map 16 [CONTAINS] vectorized, llap
-                                              Reduce Output Operator [RS_198]
+                                              Reduce Output Operator [RS_286]
                                                 PartitionCols:_col0, _col1
-                                                Group By Operator [GBY_197] (rows=262 width=178)
+                                                Group By Operator [GBY_285] (rows=262 width=178)
                                                   Output:["_col0","_col1"],keys:_col1, _col0
-                                                  Select Operator [SEL_196] (rows=25 width=175)
+                                                  Select Operator [SEL_284] (rows=25 width=175)
                                                     Output:["_col0","_col1"]
-                                                    Filter Operator [FIL_195] (rows=25 width=175)
+                                                    Filter Operator [FIL_283] (rows=25 width=175)
                                                       predicate:value is not null
-                                                      TableScan [TS_32] (rows=25 width=175)
+                                                      TableScan [TS_196] (rows=25 width=175)
                                                         Output:["key","value"]
                                             <-Map 21 [CONTAINS] vectorized, llap
-                                              Reduce Output Operator [RS_206]
+                                              Reduce Output Operator [RS_294]
                                                 PartitionCols:_col0, _col1
-                                                Group By Operator [GBY_205] (rows=262 width=178)
+                                                Group By Operator [GBY_293] (rows=262 width=178)
                                                   Output:["_col0","_col1"],keys:_col1, _col0
-                                                  Select Operator [SEL_204] (rows=500 width=178)
+                                                  Select Operator [SEL_292] (rows=500 width=178)
                                                     Output:["_col0","_col1"]
-                                                    Filter Operator [FIL_203] (rows=500 width=178)
+                                                    Filter Operator [FIL_291] (rows=500 width=178)
                                                       predicate:value is not null
-                                                      TableScan [TS_35] (rows=500 width=178)
+                                                      TableScan [TS_207] (rows=500 width=178)
                                                         Output:["key","value"]
                           <-Reducer 9 [SIMPLE_EDGE] llap
                             SHUFFLE [RS_58]
                               PartitionCols:_col3
                               Merge Join Operator [MERGEJOIN_160] (rows=39 width=266)
-                                Conds:RS_168._col0=RS_172._col0(Inner),Output:["_col1","_col2","_col3"]
+                                Conds:RS_256._col0=RS_260._col0(Inner),Output:["_col1","_col2","_col3"]
                               <-Map 1 [SIMPLE_EDGE] vectorized, llap
-                                SHUFFLE [RS_168]
+                                SHUFFLE [RS_256]
                                   PartitionCols:_col0
-                                  Select Operator [SEL_166] (rows=500 width=178)
+                                  Select Operator [SEL_254] (rows=500 width=178)
                                     Output:["_col0","_col1"]
-                                    Filter Operator [FIL_165] (rows=500 width=178)
+                                    Filter Operator [FIL_253] (rows=500 width=178)
                                       predicate:key is not null
                                       TableScan [TS_0] (rows=500 width=178)
                                         default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
                               <-Map 11 [SIMPLE_EDGE] vectorized, llap
-                                SHUFFLE [RS_172]
+                                SHUFFLE [RS_260]
                                   PartitionCols:_col0
-                                  Select Operator [SEL_170] (rows=25 width=175)
+                                  Select Operator [SEL_258] (rows=25 width=175)
                                     Output:["_col0","_col1"]
-                                    Filter Operator [FIL_169] (rows=25 width=175)
+                                    Filter Operator [FIL_257] (rows=25 width=175)
                                       predicate:(key is not null and value is not null)
                                       TableScan [TS_3] (rows=25 width=175)
                                         default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
                   <-Reducer 3 [CONTAINS] llap
-                    Reduce Output Operator [RS_66]
+                    Reduce Output Operator [RS_169]
                       PartitionCols:_col0, _col1
-                      Group By Operator [GBY_65] (rows=40 width=177)
+                      Group By Operator [GBY_168] (rows=40 width=177)
                         Output:["_col0","_col1"],keys:_col0, _col1
-                        Select Operator [SEL_25] (rows=33 width=177)
+                        Select Operator [SEL_166] (rows=33 width=177)
                           Output:["_col0","_col1"]
-                          Merge Join Operator [MERGEJOIN_162] (rows=33 width=177)
-                            Conds:RS_22._col3=RS_175._col1(Inner),Output:["_col1","_col2"]
+                          Merge Join Operator [MERGEJOIN_165] (rows=33 width=177)
+                            Conds:RS_22._col3=RS_263._col1(Inner),Output:["_col1","_col2"]
                           <-Reducer 2 [SIMPLE_EDGE] llap
                             SHUFFLE [RS_22]
                               PartitionCols:_col3
                               Merge Join Operator [MERGEJOIN_159] (rows=39 width=266)
-                                Conds:RS_167._col0=RS_171._col0(Inner),Output:["_col1","_col2","_col3"]
+                                Conds:RS_255._col0=RS_259._col0(Inner),Output:["_col1","_col2","_col3"]
                               <-Map 1 [SIMPLE_EDGE] vectorized, llap
-                                SHUFFLE [RS_167]
+                                SHUFFLE [RS_255]
                                   PartitionCols:_col0
-                                   Please refer to the previous Select Operator [SEL_166]
+                                   Please refer to the previous Select Operator [SEL_254]
                               <-Map 11 [SIMPLE_EDGE] vectorized, llap
-                                SHUFFLE [RS_171]
+                                SHUFFLE [RS_259]
                                   PartitionCols:_col0
-                                   Please refer to the previous Select Operator [SEL_170]
+                                   Please refer to the previous Select Operator [SEL_258]
                           <-Reducer 14 [SIMPLE_EDGE] vectorized, llap
-                            SHUFFLE [RS_175]
+                            SHUFFLE [RS_263]
                               PartitionCols:_col1
-                              Select Operator [SEL_174] (rows=262 width=178)
+                              Select Operator [SEL_262] (rows=262 width=178)
                                 Output:["_col1"]
-                                Group By Operator [GBY_173] (rows=262 width=178)
+                                Group By Operator [GBY_261] (rows=262 width=178)
                                   Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                 <-Union 13 [SIMPLE_EDGE]
                                   <-Map 12 [CONTAINS] vectorized, llap
-                                    Reduce Output Operator [RS_190]
+                                    Reduce Output Operator [RS_278]
                                       PartitionCols:_col0, _col1
-                                      Group By Operator [GBY_189] (rows=262 width=178)
+                                      Group By Operator [GBY_277] (rows=262 width=178)
                                         Output:["_col0","_col1"],keys:_col1, _col0
-                                        Select Operator [SEL_188] (rows=25 width=175)
+                                        Select Operator [SEL_276] (rows=25 width=175)
                                           Output:["_col0","_col1"]
-                                          Filter Operator [FIL_187] (rows=25 width=175)
+                                          Filter Operator [FIL_275] (rows=25 width=175)
                                             predicate:value is not null
-                                            TableScan [TS_6] (rows=25 width=175)
+                                            TableScan [TS_184] (rows=25 width=175)
                                               Output:["key","value"]
                                   <-Map 15 [CONTAINS] vectorized, llap
-                                    Reduce Output Operator [RS_194]
+                                    Reduce Output Operator [RS_282]
                                       PartitionCols:_col0, _col1
-                                      Group By Operator [GBY_193] (rows=262 width=178)
+                                      Group By Operator [GBY_281] (rows=262 width=178)
                                         Output:["_col0","_col1"],keys:_col1, _col0
-                                        Select Operator [SEL_192] (rows=500 width=178)
+                                        Select Operator [SEL_280] (rows=500 width=178)
                                           Output:["_col0","_col1"]
-                                          Filter Operator [FIL_191] (rows=500 width=178)
+                                          Filter Operator [FIL_279] (rows=500 width=178)
                                             predicate:value is not null
-                                            TableScan [TS_9] (rows=500 width=178)
+                                            TableScan [TS_190] (rows=500 width=178)
                                               Output:["key","value"]
           <-Reducer 8 [CONTAINS] llap
-            Reduce Output Operator [RS_119]
+            Reduce Output Operator [RS_178]
               PartitionCols:_col0, _col1
-              Group By Operator [GBY_118] (rows=47 width=177)
+              Group By Operator [GBY_177] (rows=47 width=177)
                 Output:["_col0","_col1"],keys:_col0, _col1
-                Select Operator [SEL_114] (rows=55 width=177)
+                Select Operator [SEL_175] (rows=55 width=177)
                   Output:["_col0","_col1"]
-                  Merge Join Operator [MERGEJOIN_164] (rows=55 width=177)
-                    Conds:RS_111._col3=RS_183._col1(Inner),Output:["_col1","_col2"]
+                  Merge Join Operator [MERGEJOIN_174] (rows=55 width=177)
+                    Conds:RS_111._col3=RS_271._col1(Inner),Output:["_col1","_col2"]
                   <-Reducer 2 [SIMPLE_EDGE] llap
                     SHUFFLE [RS_111]
                       PartitionCols:_col3
                        Please refer to the previous Merge Join Operator [MERGEJOIN_159]
                   <-Reducer 29 [SIMPLE_EDGE] vectorized, llap
-                    SHUFFLE [RS_183]
+                    SHUFFLE [RS_271]
                       PartitionCols:_col1
-                      Select Operator [SEL_182] (rows=440 width=178)
+                      Select Operator [SEL_270] (rows=440 width=178)
                         Output:["_col1"]
-                        Group By Operator [GBY_181] (rows=440 width=178)
+                        Group By Operator [GBY_269] (rows=440 width=178)
                           Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                         <-Union 28 [SIMPLE_EDGE]
                           <-Map 32 [CONTAINS] vectorized, llap
-                            Reduce Output Operator [RS_234]
+                            Reduce Output Operator [RS_322]
                               PartitionCols:_col0, _col1
-                              Group By Operator [GBY_233] (rows=440 width=178)
+                              Group By Operator [GBY_321] (rows=440 width=178)
                                 Output:["_col0","_col1"],keys:_col1, _col0
-                                Select Operator [SEL_232] (rows=500 width=178)
+                                Select Operator [SEL_320] (rows=500 width=178)
                                   Output:["_col0","_col1"]
-                                  Filter Operator [FIL_231] (rows=500 width=178)
+                                  Filter Operator [FIL_319] (rows=500 width=178)
                                     predicate:value is not null
-                                    TableScan [TS_98] (rows=500 width=178)
+                                    TableScan [TS_247] (rows=500 width=178)
                                       Output:["key","value"]
                           <-Reducer 27 [CONTAINS] vectorized, llap
-                            Reduce Output Operator [RS_222]
+                            Reduce Output Operator [RS_310]
                               PartitionCols:_col0, _col1
-                              Group By Operator [GBY_221] (rows=440 width=178)
+                              Group By Operator [GBY_309] (rows=440 width=178)
                                 Output:["_col0","_col1"],keys:_col1, _col0
-                                Select Operator [SEL_220] (rows=381 width=178)
+                                Select Operator [SEL_308] (rows=381 width=178)
                                   Output:["_col0","_col1"]
-                                  Group By Operator [GBY_219] (rows=381 width=178)
+                                  Group By Operator [GBY_307] (rows=381 width=178)
                                     Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                   <-Union 26 [SIMPLE_EDGE]
                                     <-Map 31 [CONTAINS] vectorized, llap
-                                      Reduce Output Operator [RS_230]
+                                      Reduce Output Operator [RS_318]
                                         PartitionCols:_col0, _col1
-                                        Group By Operator [GBY_229] (rows=381 width=178)
+                                        Group By Operator [GBY_317] (rows=381 width=178)
                                           Output:["_col0","_col1"],keys:_col1, _col0
-                                          Select Operator [SEL_228] (rows=500 width=178)
+                                          Select Operator [SEL_316] (rows=500 width=178)
                                             Output:["_col0","_col1"]
-                                            Filter Operator [FIL_227] (rows=500 width=178)
+                                            Filter Operator [FIL_315] (rows=500 width=178)
                                               predicate:value is not null
-                                              TableScan [TS_88] (rows=500 width=178)
+                                              TableScan [TS_241] (rows=500 width=178)
                                                 Output:["key","value"]
                                     <-Reducer 25 [CONTAINS] vectorized, llap
-                                      Reduce Output Operator [RS_218]
+                                      Reduce Output Operator [RS_306]
                                         PartitionCols:_col0, _col1
-                                        Group By Operator [GBY_217] (rows=381 width=178)
+                                        Group By Operator [GBY_305] (rows=381 width=178)
                                           Output:["_col0","_col1"],keys:_col1, _col0
-                                          Select Operator [SEL_216] (rows=262 width=178)
+                                          Select Operator [SEL_304] (rows=262 width=178)
                                             Output:["_col0","_col1"]
-                                            Group By Operator [GBY_215] (rows=262 width=178)
+                                            Group By Operator [GBY_303] (rows=262 width=178)
                                               Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                             <-Union 24 [SIMPLE_EDGE]
                                               <-Map 23 [CONTAINS] vectorized, llap
-                                                Reduce Output Operator [RS_214]
+                                                Reduce Output Operator [RS_302]
                                                   PartitionCols:_col0, _col1
-                                                  Group By Operator [GBY_213] (rows=262 width=178)
+                                                  Group By Operator [GBY_301] (rows=262 width=178)
                                                     Output:["_col0","_col1"],keys:_col1, _col0
-                                                    Select Operator [SEL_212] (rows=25 width=175)
+                                                    Select Operator [SEL_300] (rows=25 width=175)
                                                       Output:["_col0","_col1"]
-                                                      Filter Operator [FIL_211] (rows=25 width=175)
+                                                      Filter Operator [FIL_299] (rows=25 width=175)
                                                         predicate:value is not null
-                                                        TableScan [TS_75] (rows=25 width=175)
+                                                        TableScan [TS_219] (rows=25 width=175)
                                                           Output:["key","value"]
                                               <-Map 30 [CONTAINS] vectorized, llap
-                                                Reduce Output Operator [RS_226]
+                                                Reduce Output Operator [RS_314]
                                                   PartitionCols:_col0, _col1
-                                                  Group By Operator [GBY_225] (rows=262 width=178)
+                                                  Group By Operator [GBY_313] (rows=262 width=178)
                                                     Output:["_col0","_col1"],keys:_col1, _col0
-                                                    Select Operator [SEL_224] (rows=500 width=178)
+                                                    Select Operator [SEL_312] (rows=500 width=178)
                                                       Output:["_col0","_col1"]
-                                                      Filter Operator [FIL_223] (rows=500 width=178)
+                                                      Filter Operator [FIL_311] (rows=500 width=178)
                                                         predicate:value is not null
-                                                        TableScan [TS_78] (rows=500 width=178)
+                                                        TableScan [TS_235] (rows=500 width=178)
                                                           Output:["key","value"]
 
 PREHOOK: query: EXPLAIN
@@ -1128,116 +1128,116 @@ Stage-0
     limit:-1
     Stage-1
       Reducer 7 vectorized, llap
-      File Output Operator [FS_107]
-        Group By Operator [GBY_106] (rows=605 width=10)
+      File Output Operator [FS_147]
+        Group By Operator [GBY_146] (rows=605 width=10)
           Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
         <-Union 6 [SIMPLE_EDGE]
           <-Reducer 12 [CONTAINS] vectorized, llap
-            Reduce Output Operator [RS_125]
+            Reduce Output Operator [RS_165]
               PartitionCols:_col0, _col1
-              Group By Operator [GBY_124] (rows=1210 width=10)
+              Group By Operator [GBY_164] (rows=1210 width=10)
                 Output:["_col0","_col1"],keys:_col0, _col1
-                Select Operator [SEL_123] (rows=605 width=10)
+                Select Operator [SEL_163] (rows=605 width=10)
                   Output:["_col0","_col1"]
-                  Map Join Operator [MAPJOIN_122] (rows=605 width=10)
-                    Conds:RS_119._col2=SEL_121._col1(Inner),Output:["_col1","_col4"]
+                  Map Join Operator [MAPJOIN_162] (rows=605 width=10)
+                    Conds:RS_159._col2=SEL_161._col1(Inner),Output:["_col1","_col4"]
                   <-Map 9 [BROADCAST_EDGE] vectorized, llap
-                    BROADCAST [RS_119]
+                    BROADCAST [RS_159]
                       PartitionCols:_col2
-                      Map Join Operator [MAPJOIN_118] (rows=550 width=10)
-                        Conds:SEL_117._col0=RS_95._col0(Inner),Output:["_col1","_col2"]
+                      Map Join Operator [MAPJOIN_158] (rows=550 width=10)
+                        Conds:SEL_157._col0=RS_135._col0(Inner),Output:["_col1","_col2"]
                       <-Map 2 [BROADCAST_EDGE] vectorized, llap
-                        BROADCAST [RS_95]
+                        BROADCAST [RS_135]
                           PartitionCols:_col0
-                          Select Operator [SEL_93] (rows=25 width=7)
+                          Select Operator [SEL_133] (rows=25 width=7)
                             Output:["_col0","_col1"]
-                            Filter Operator [FIL_92] (rows=25 width=7)
+                            Filter Operator [FIL_132] (rows=25 width=7)
                               predicate:(key is not null and value is not null)
                               TableScan [TS_3] (rows=25 width=7)
                                 default@src1,x,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
-                      <-Select Operator [SEL_117] (rows=500 width=10)
+                      <-Select Operator [SEL_157] (rows=500 width=10)
                           Output:["_col0"]
-                          Filter Operator [FIL_116] (rows=500 width=10)
+                          Filter Operator [FIL_156] (rows=500 width=10)
                             predicate:key is not null
                             TableScan [TS_26] (rows=500 width=10)
                               default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key"]
-                  <-Select Operator [SEL_121] (rows=262 width=10)
+                  <-Select Operator [SEL_161] (rows=262 width=10)
                       Output:["_col1"]
-                      Group By Operator [GBY_120] (rows=262 width=10)
+                      Group By Operator [GBY_160] (rows=262 width=10)
                         Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                       <-Union 11 [SIMPLE_EDGE]
                         <-Map 10 [CONTAINS] vectorized, llap
-                          Reduce Output Operator [RS_115]
+                          Reduce Output Operator [RS_155]
                             PartitionCols:_col0, _col1
-                            Group By Operator [GBY_114] (rows=525 width=10)
+                            Group By Operator [GBY_154] (rows=525 width=10)
                               Output:["_col0","_col1"],keys:_col1, _col0
-                              Select Operator [SEL_113] (rows=25 width=7)
+                              Select Operator [SEL_153] (rows=25 width=7)
                                 Output:["_col0","_col1"]
-                                Filter Operator [FIL_112] (rows=25 width=7)
+                                Filter Operator [FIL_152] (rows=25 width=7)
                                   predicate:value is not null
-                                  TableScan [TS_32] (rows=25 width=7)
+                                  TableScan [TS_108] (rows=25 width=7)
                                     Output:["key","value"]
                         <-Map 13 [CONTAINS] vectorized, llap
-                          Reduce Output Operator [RS_129]
+                          Reduce Output Operator [RS_169]
                             PartitionCols:_col0, _col1
-                            Group By Operator [GBY_128] (rows=525 width=10)
+                            Group By Operator [GBY_168] (rows=525 width=10)
                               Output:["_col0","_col1"],keys:_col1, _col0
-                              Select Operator [SEL_127] (rows=500 width=10)
+                              Select Operator [SEL_167] (rows=500 width=10)
                                 Output:["_col0","_col1"]
-                                Filter Operator [FIL_126] (rows=500 width=10)
+                                Filter Operator [FIL_166] (rows=500 width=10)
                                   predicate:value is not null
-                                  TableScan [TS_35] (rows=500 width=10)
+                                  TableScan [TS_122] (rows=500 width=10)
                                     Output:["key","value"]
           <-Reducer 5 [CONTAINS] vectorized, llap
-            Reduce Output Operator [RS_105]
+            Reduce Output Operator [RS_145]
               PartitionCols:_col0, _col1
-              Group By Operator [GBY_104] (rows=1210 width=10)
+              Group By Operator [GBY_144] (rows=1210 width=10)
                 Output:["_col0","_col1"],keys:_col0, _col1
-                Select Operator [SEL_103] (rows=605 width=10)
+                Select Operator [SEL_143] (rows=605 width=10)
                   Output:["_col0","_col1"]
-                  Map Join Operator [MAPJOIN_102] (rows=605 width=10)
-                    Conds:RS_99._col2=SEL_101._col1(Inner),Output:["_col1","_col4"]
+                  Map Join Operator [MAPJOIN_142] (rows=605 width=10)
+                    Conds:RS_139._col2=SEL_141._col1(Inner),Output:["_col1","_col4"]
                   <-Map 1 [BROADCAST_EDGE] vectorized, llap
-                    BROADCAST [RS_99]
+                    BROADCAST [RS_139]
                       PartitionCols:_col2
-                      Map Join Operator [MAPJOIN_98] (rows=550 width=10)
-                        Conds:SEL_97._col0=RS_94._col0(Inner),Output:["_col1","_col2"]
+                      Map Join Operator [MAPJOIN_138] (rows=550 width=10)
+                        Conds:SEL_137._col0=RS_134._col0(Inner),Output:["_col1","_col2"]
                       <-Map 2 [BROADCAST_EDGE] vectorized, llap
-                        BROADCAST [RS_94]
+                        BROADCAST [RS_134]
                           PartitionCols:_col0
-                           Please refer to the previous Select Operator [SEL_93]
-                      <-Select Operator [SEL_97] (rows=500 width=10)
+                           Please refer to the previous Select Operator [SEL_133]
+                      <-Select Operator [SEL_137] (rows=500 width=10)
                           Output:["_col0"]
-                          Filter Operator [FIL_96] (rows=500 width=10)
+                          Filter Operator [FIL_136] (rows=500 width=10)
                             predicate:key is not null
                             TableScan [TS_0] (rows=500 width=10)
                               default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key"]
-                  <-Select Operator [SEL_101] (rows=262 width=10)
+                  <-Select Operator [SEL_141] (rows=262 width=10)
                       Output:["_col1"]
-                      Group By Operator [GBY_100] (rows=262 width=10)
+                      Group By Operator [GBY_140] (rows=262 width=10)
                         Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                       <-Union 4 [SIMPLE_EDGE]
                         <-Map 3 [CONTAINS] vectorized, llap
-                          Reduce Output Operator [RS_91]
+                          Reduce Output Operator [RS_131]
                             PartitionCols:_col0, _col1
-                            Group By Operator [GBY_90] (rows=525 width=10)
+                            Group By Operator [GBY_130] (rows=525 width=10)
                               Output:["_col0","_col1"],keys:_col1, _col0
-                              Select Operator [SEL_89] (rows=25 width=7)
+                              Select Operator [SEL_129] (rows=25 width=7)
                                 Output:["_col0","_col1"]
-                                Filter Operator [FIL_88] (rows=25 width=7)
+                                Filter Operator [FIL_128] (rows=25 width=7)
                                   predicate:value is not null
-                                  TableScan [TS_6] (rows=25 width=7)
+                                  TableScan [TS_88] (rows=25 width=7)
                                     Output:["key","value"]
                         <-Map 8 [CONTAINS] vectorized, llap
-                          Reduce Output Operator [RS_111]
+                          Reduce Output Operator [RS_151]
                             PartitionCols:_col0, _col1
-                            Group By Operator [GBY_110] (rows=525 width=10)
+                            Group By Operator [GBY_150] (rows=525 width=10)
                               Output:["_col0","_col1"],keys:_col1, _col0
-                              Select Operator [SEL_109] (rows=500 width=10)
+                              Select Operator [SEL_149] (rows=500 width=10)
                                 Output:["_col0","_col1"]
-                                Filter Operator [FIL_108] (rows=500 width=10)
+                                Filter Operator [FIL_148] (rows=500 width=10)
                                   predicate:value is not null
-                                  TableScan [TS_9] (rows=500 width=10)
+                                  TableScan [TS_102] (rows=500 width=10)
                                     Output:["key","value"]
 
 PREHOOK: query: explain
@@ -1294,227 +1294,227 @@ Stage-0
     limit:-1
     Stage-1
       Reducer 9 vectorized, llap
-      File Output Operator [FS_193]
-        Group By Operator [GBY_192] (rows=605 width=10)
+      File Output Operator [FS_290]
+        Group By Operator [GBY_289] (rows=605 width=10)
           Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
         <-Union 8 [SIMPLE_EDGE]
           <-Reducer 25 [CONTAINS] vectorized, llap
-            Reduce Output Operator [RS_241]
+            Reduce Output Operator [RS_338]
               PartitionCols:_col0, _col1
-              Group By Operator [GBY_240] (rows=1210 width=10)
+              Group By Operator [GBY_337] (rows=1210 width=10)
                 Output:["_col0","_col1"],keys:_col0, _col1
-                Select Operator [SEL_239] (rows=605 width=10)
+                Select Operator [SEL_336] (rows=605 width=10)
                   Output:["_col0","_col1"]
-                  Map Join Operator [MAPJOIN_238] (rows=605 width=10)
-                    Conds:RS_182._col3=SEL_237._col1(Inner),Output:["_col1","_col2"]
+                  Map Join Operator [MAPJOIN_335] (rows=605 width=10)
+                    Conds:RS_279._col3=SEL_334._col1(Inner),Output:["_col1","_col2"]
                   <-Map 1 [BROADCAST_EDGE] vectorized, llap
-                    BROADCAST [RS_182]
+                    BROADCAST [RS_279]
                       PartitionCols:_col3
-                      Map Join Operator [MAPJOIN_180] (rows=550 width=10)
-                        Conds:SEL_179._col0=RS_176._col0(Inner),Output:["_col1","_col2","_col3"]
+                      Map Join Operator [MAPJOIN_277] (rows=550 width=10)
+                        Conds:SEL_276._col0=RS_273._col0(Inner),Output:["_col1","_col2","_col3"]
                       <-Map 2 [BROADCAST_EDGE] vectorized, llap
-                        BROADCAST [RS_176]
+                        BROADCAST [RS_273]
                           PartitionCols:_col0
-                          Select Operator [SEL_175] (rows=25 width=7)
+                          Select Operator [SEL_272] (rows=25 width=7)
                             Output:["_col0","_col1"]
-                            Filter Operator [FIL_174] (rows=25 width=7)
+                            Filter Operator [FIL_271] (rows=25 width=7)
                               predicate:(key is not null and value is not null)
                               TableScan [TS_3] (rows=25 width=7)
                                 default@src1,x,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
-                      <-Select Operator [SEL_179] (rows=500 width=10)
+                      <-Select Operator [SEL_276] (rows=500 width=10)
                           Output:["_col0","_col1"]
-                          Filter Operator [FIL_178] (rows=500 width=10)
+                          Filter Operator [FIL_275] (rows=500 width=10)
                             predicate:key is not null
                             TableScan [TS_0] (rows=500 width=10)
                               default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
-                  <-Select Operator [SEL_237] (rows=440 width=10)
+                  <-Select Operator [SEL_334] (rows=440 width=10)
                       Output:["_col1"]
-                      Group By Operator [GBY_236] (rows=440 width=10)
+                      Group By Operator [GBY_333] (rows=440 width=10)
                         Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                       <-Union 24 [SIMPLE_EDGE]
                         <-Map 28 [CONTAINS] vectorized, llap
-                          Reduce Output Operator [RS_253]
+                          Reduce Output Operator [RS_350]
                             PartitionCols:_col0, _col1
-                            Group By Operator [GBY_252] (rows=881 width=10)
+                            Group By Operator [GBY_349] (rows=881 width=10)
                               Output:["_col0","_col1"],keys:_col1, _col0
-                              Select Operator [SEL_251] (rows=500 width=10)
+                              Select Operator [SEL_348] (rows=500 width=10)
                                 Output:["_col0","_col1"]
-                                Filter Operator [FIL_250] (rows=500 width=10)
+                                Filter Operator [FIL_347] (rows=500 width=10)
                                   predicate:value is not null
-                                  TableScan [TS_98] (rows=500 width=10)
+                                  TableScan [TS_261] (rows=500 width=10)
                                     Output:["key","value"]
                         <-Reducer 23 [CONTAINS] vectorized, llap
-                          Reduce Output Operator [RS_235]
+                          Reduce Output Operator [RS_332]
                             PartitionCols:_col0, _col1
-                            Group By Operator [GBY_234] (rows=881 width=10)
+                            Group By Operator [GBY_331] (rows=881 width=10)
                               Output:["_col0","_col1"],keys:_col1, _col0
-                              Select Operator [SEL_233] (rows=381 width=10)
+                              Select Operator [SEL_330] (rows=381 width=10)
                                 Output:["_col0","_col1"]
-                                Group By Operator [GBY_232] (rows=381 width=10)
+                                Group By Operator [GBY_329] (rows=381 width=10)
                                   Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                 <-Union 22 [SIMPLE_EDGE]
                                   <-Map 27 [CONTAINS] vectorized, llap
-                                    Reduce Output Operator [RS_249]
+                                    Reduce Output Operator [RS_346]
                                       PartitionCols:_col0, _col1
-                                      Group By Operator [GBY_248] (rows=762 width=10)
+                                      Group By Operator [GBY_345] (rows=762 width=10)
                                         Output:["_col0","_col1"],keys:_col1, _col0
-                                        Select Operator [SEL_247] (rows=500 width=10)
+                                        Select Operator [SEL_344] (rows=500 width=10)
                                           Output:["_col0","_col1"]
-                                          Filter Operator [FIL_246] (rows=500 width=10)
+                                          Filter Operator [FIL_343] (rows=500 width=10)
                                             predicate:value is not null
-                                            TableScan [TS_88] (rows=500 width=10)
+                                            TableScan [TS_255] (rows=500 width=10)
                                               Output:["key","value"]
                                   <-Reducer 21 [CONTAINS] vectorized, llap
-                                    Reduce Output Operator [RS_231]
+                                    Reduce Output Operator [RS_328]
                                       PartitionCols:_col0, _col1
-                                      Group By Operator [GBY_230] (rows=762 width=10)
+                                      Group By Operator [GBY_327] (rows=762 width=10)
                                         Output:["_col0","_col1"],keys:_col1, _col0
-                                        Select Operator [SEL_229] (rows=262 width=10)
+                                        Select Operator [SEL_326] (rows=262 width=10)
                                           Output:["_col0","_col1"]
-                                          Group By Operator [GBY_228] (rows=262 width=10)
+                                          Group By Operator [GBY_325] (rows=262 width=10)
                                             Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                           <-Union 20 [SIMPLE_EDGE]
                                             <-Map 19 [CONTAINS] vectorized, llap
-                                              Reduce Output Operator [RS_227]
+                                              Reduce Output Operator [RS_324]
                                                 PartitionCols:_col0, _col1
-                                                Group By Operator [GBY_226] (rows=525 width=10)
+                                                Group By Operator [GBY_323] (rows=525 width=10)
                                                   Output:["_col0","_col1"],keys:_col1, _col0
-                                                  Select Operator [SEL_225] (rows=25 width=7)
+                                                  Select Operator [SEL_322] (rows=25 width=7)
                                                     Output:["_col0","_col1"]
-                                                    Filter Operator [FIL_224] (rows=25 width=7)
+                                                    Filter Operator [FIL_321] (rows=25 width=7)
                                                       predicate:value is not null
-                                                      TableScan [TS_75] (rows=25 width=7)
+                                                      TableScan [TS_225] (rows=25 width=7)
                                                         Output:["key","value"]
                                             <-Map 26 [CONTAINS] vectorized, llap
-                                              Reduce Output Operator [RS_245]
+                                              Reduce Output Operator [RS_342]
                                                 PartitionCols:_col0, _col1
-                                                Group By Operator [GBY_244] (rows=525 width=10)
+                                                Group By Operator [GBY_341] (rows=525 width=10)
                                                   Output:["_col0","_col1"],keys:_col1, _col0
-                                                  Select Operator [SEL_243] (rows=500 width=10)
+                                                  Select Operator [SEL_340] (rows=500 width=10)
                                                     Output:["_col0","_col1"]
-                                                    Filter Operator [FIL_242] (rows=500 width=10)
+                                                    Filter Operator [FIL_339] (rows=500 width=10)
                                                       predicate:value is not null
-                                                      TableScan [TS_78] (rows=500 width=10)
+                                                      TableScan [TS_249] (rows=500 width=10)
                                                         Output:["key","value"]
           <-Reducer 7 [CONTAINS] vectorized, llap
-            Reduce Output Operator [RS_191]
+            Reduce Output Operator [RS_288]
               PartitionCols:_col0, _col1
-              Group By Operator [GBY_190] (rows=1210 width=10)
+              Group By Operator [GBY_287] (rows=1210 width=10)
                 Output:["_col0","_col1"],keys:_col0, _col1
-                Group By Operator [GBY_189] (rows=605 width=10)
+                Group By Operator [GBY_286] (rows=605 width=10)
                   Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                 <-Union 6 [SIMPLE_EDGE]
                   <-Reducer 16 [CONTAINS] vectorized, llap
-                    Reduce Output Operator [RS_215]
+                    Reduce Output Operator [RS_312]
                       PartitionCols:_col0, _col1
-                      Group By Operator [GBY_214] (rows=1210 width=10)
+                      Group By Operator [GBY_311] (rows=1210 width=10)
                         Output:["_col0","_col1"],keys:_col0, _col1
-                        Select Operator [SEL_213] (rows=605 width=10)
+                        Select Operator [SEL_310] (rows=605 width=10)
                           Output:["_col0","_col1"]
-                          Map Join Operator [MAPJOIN_212] (rows=605 width=10)
-                            Conds:RS_209._col3=SEL_211._col1(Inner),Output:["_col1","_col2"]
+                          Map Join Operator [MAPJOIN_309] (rows=605 width=10)
+                            Conds:RS_306._col3=SEL_308._col1(Inner),Output:["_col1","_col2"]
                           <-Map 11 [BROADCAST_EDGE] vectorized, llap
-                            BROADCAST [RS_209]
+                            BROADCAST [RS_306]
                               PartitionCols:_col3
-                              Map Join Operator [MAPJOIN_208] (rows=550 width=10)
-                                Conds:SEL_207._col0=RS_177._col0(Inner),Output:["_col1","_col2","_col3"]
+                              Map Join Operator [MAPJOIN_305] (rows=550 width=10)
+                                Conds:SEL_304._col0=RS_274._col0(Inner),Output:["_col1","_col2","_col3"]
                               <-Map 2 [BROADCAST_EDGE] vectorized, llap
-                                BROADCAST [RS_177]
+                                BROADCAST [RS_274]
                                   PartitionCols:_col0
-                                   Please refer to the previous Select Operator [SEL_175]
-                              <-Select Operator [SEL_207] (rows=500 width=10)
+                                   Please refer to the previous Select Operator [SEL_272]
+                              <-Select Operator [SEL_304] (rows=500 width=10)
                                   Output:["_col0","_col1"]
-                                  Filter Operator [FIL_206] (rows=500 width=10)
+                                  Filter Operator [FIL_303] (rows=500 width=10)
                                     predicate:key is not null
                                     TableScan [TS_26] (rows=500 width=10)
                                       default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
-                          <-Select Operator [SEL_211] (rows=381 width=10)
+                          <-Select Operator [SEL_308] (rows=381 width=10)
                               Output:["_col1"]
-                              Group By Operator [GBY_210] (rows=381 width=10)
+                              Group By Operator [GBY_307] (rows=381 width=10)
                                 Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                               <-Union 15 [SIMPLE_EDGE]
                                 <-Map 18 [CONTAINS] vectorized, llap
-                                  Reduce Output Operator [RS_223]
+                                  Reduce Output Operator [RS_320]
                                     PartitionCols:_col0, _col1
-                                    Group By Operator [GBY_222] (rows=762 width=10)
+                                    Group By Operator [GBY_319] (rows=762 width=10)
                                       Output:["_col0","_col1"],keys:_col1, _col0
-                                      Select Operator [SEL_221] (rows=500 width=10)
+                                      Select Operator [SEL_318] (rows=500 width=10)
                                         Output:["_col0","_col1"]
-                                        Filter Operator [FIL_220] (rows=500 width=10)
+                                        Filter Operator [FIL_317] (rows=500 width=10)
                                           predicate:value is not null
-                                          TableScan [TS_45] (rows=500 width=10)
+                                          TableScan [TS_219] (rows=500 width=10)
                                             Output:["key","value"]
                                 <-Reducer 14 [CONTAINS] vectorized, llap
-                                  Reduce Output Operator [RS_205]
+                                  Reduce Output Operator [RS_302]
                                     PartitionCols:_col0, _col1
-                                    Group By Operator [GBY_204] (rows=762 width=10)
+                                    Group By Operator [GBY_301] (rows=762 width=10)
                                       Output:["_col0","_col1"],keys:_col1, _col0
-                                      Select Operator [SEL_203] (rows=262 width=10)
+                                      Select Operator [SEL_300] (rows=262 width=10)
                                         Output:["_col0","_col1"]
-                                        Group By Operator [GBY_202] (rows=262 width=10)
+                                        Group By Operator [GBY_299] (rows=262 width=10)
                                           Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                         <-Union 13 [SIMPLE_EDGE]
                                           <-Map 12 [CONTAINS] vectorized, llap
-                                            Reduce Output Operator [RS_201]
+                                            Reduce Output Operator [RS_298]
                                               PartitionCols:_col0, _col1
-                                              Group By Operator [GBY_200] (rows=525 width=10)
+                                              Group By Operator [GBY_297] (rows=525 width=10)
                                                 Output:["_col0","_col1"],keys:_col1, _col0
-                                                Select Operator [SEL_199] (rows=25 width=7)
+                                                Select Operator [SEL_296] (rows=25 width=7)
                                                   Output:["_col0","_col1"]
-                                                  Filter Operator [FIL_198] (rows=25 width=7)
+                                                  Filter Operator [FIL_295] (rows=25 width=7)
                                                     predicate:value is not null
-                                                    TableScan [TS_32] (rows=25 width=7)
+                                                    TableScan [TS_194] (rows=25 width=7)
                                                       Output:["key","value"]
                                           <-Map 17 [CONTAINS] vectorized, llap
-                                            Reduce Output Operator [RS_219]
+                                            Reduce Output Operator [RS_316]
                                               PartitionCols:_col0, _col1
-                                              Group By Operator [GBY_218] (rows=525 width=10)
+                                              Group By Operator [GBY_315] (rows=525 width=10)
                                                 Output:["_col0","_col1"],keys:_col1, _col0
-                                                Select Operator [SEL_217] (rows=500 width=10)
+                                                Select Operator [SEL_314] (rows=500 width=10)
                                                   Output:["_col0","_col1"]
-                                                  Filter Operator [FIL_216] (rows=500 width=10)
+                                                  Filter Operator [FIL_313] (rows=500 width=10)
                                                     predicate:value is not null
-                                                    TableScan [TS_35] (rows=500 width=10)
+                                                    TableScan [TS_213] (rows=500 width=10)
                                                       Output:["key","value"]
                   <-Reducer 5 [CONTAINS] vectorized, llap
-                    Reduce Output Operator [RS_188]
+                    Reduce Output Operator [RS_285]
                       PartitionCols:_col0, _col1
-                      Group By Operator [GBY_187] (rows=1210 width=10)
+                      Group By Operator [GBY_284] (rows=1210 width=10)
                         Output:["_col0","_col1"],keys:_col0, _col1
-                        Select Operator [SEL_186] (rows=605 width=10)
+                        Select Operator [SEL_283] (rows=605 width=10)
                           Output:["_col0","_col1"]
-                          Map Join Operator [MAPJOIN_185] (rows=605 width=10)
-                            Conds:RS_181._col3=SEL_184._col1(Inner),Output:["_col1","_col2"]
+                          Map Join Operator [MAPJOIN_282] (rows=605 width=10)
+                            Conds:RS_278._col3=SEL_281._col1(Inner),Output:["_col1","_col2"]
                           <-Map 1 [BROADCAST_EDGE] vectorized, llap
-                            BROADCAST [RS_181]
+                            BROADCAST [RS_278]
                               PartitionCols:_col3
-                               Please refer to the previous Map Join Operator [MAPJOIN_180]
-                          <-Select Operator [SEL_184] (rows=262 width=10)
+                               Please refer to the previous Map Join Operator [MAPJOIN_277]
+                          <-Select Operator [SEL_281] (rows=262 width=10)
                               Output:["_col1"]
-                              Group By Operator [GBY_183] (rows=262 width=10)
+                              Group By Operator [GBY_280] (rows=262 width=10)
                                 Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                               <-Union 4 [SIMPLE_EDGE]
                                 <-Map 10 [CONTAINS] vectorized, llap
-                                  Reduce Output Operator [RS_197]
+                                  Reduce Output Operator [RS_294]
                                     PartitionCols:_col0, _col1
-                                    Group By Operator [GBY_196] (rows=525 width=10)
+                                    Group By Operator [GBY_293] (rows=525 width=10)
                                       Output:["_col0","_col1"],keys:_col1, _col0
-                                      Select Operator [SEL_195] (rows=500 width=10)
+                                      Select Operator [SEL_292] (rows=500 width=10)
                                         Output:["_col0","_col1"]
-                                        Filter Operator [FIL_194] (rows=500 width=10)
+                                        Filter Operator [FIL_291] (rows=500 width=10)
                                           predicate:value is not null
-                                          TableScan [TS_9] (rows=500 width=10)
+                                          TableScan [TS_188] (rows=500 width=10)
                                             Output:["key","value"]
                                 <-Map 3 [CONTAINS] vectorized, llap
-                                  Reduce Output Operator [RS_173]
+                                  Reduce Output Operator [RS_270]
                                     PartitionCols:_col0, _col1
-                                    Group By Operator [GBY_172] (rows=525 width=10)
+                                    Group By Operator [GBY_269] (rows=525 width=10)
                                       Output:["_col0","_col1"],keys:_col1, _col0
-                                      Select Operator [SEL_171] (rows=25 width=7)
+                                      Select Operator [SEL_268] (rows=25 width=7)
                                         Output:["_col0","_col1"]
-                                        Filter Operator [FIL_170] (rows=25 width=7)
+                                        Filter Operator [FIL_267] (rows=25 width=7)
                                           predicate:value is not null
-                                          TableScan [TS_6] (rows=25 width=7)
+                                          TableScan [TS_170] (rows=25 width=7)
                                             Output:["key","value"]
 
 PREHOOK: query: CREATE TABLE srcbucket_mapjoin_n22(key int, value string) partitioned by (ds string) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
@@ -1824,50 +1824,50 @@ Stage-0
     limit:-1
     Stage-1
       Reducer 4 vectorized, llap
-      File Output Operator [FS_44]
-        Group By Operator [GBY_43] (rows=1 width=8)
+      File Output Operator [FS_59]
+        Group By Operator [GBY_58] (rows=1 width=8)
           Output:["_col0"],aggregations:["count(VALUE._col0)"]
         <-Reducer 3 [CUSTOM_SIMPLE_EDGE] llap
           PARTITION_ONLY_SHUFFLE [RS_23]
             Group By Operator [GBY_22] (rows=1 width=8)
               Output:["_col0"],aggregations:["count()"]
               Merge Join Operator [MERGEJOIN_39] (rows=558 width=10)
-                Conds:Union 2._col0=RS_42._col0(Inner)
+                Conds:Union 2._col0=RS_57._col0(Inner)
               <-Map 7 [SIMPLE_EDGE] vectorized, llap
-                SHUFFLE [RS_42]
+                SHUFFLE [RS_57]
                   PartitionCols:_col0
-                  Select Operator [SEL_41] (rows=500 width=10)
+                  Select Operator [SEL_56] (rows=500 width=10)
                     Output:["_col0"]
-                    Filter Operator [FIL_40] (rows=500 width=10)
+                    Filter Operator [FIL_55] (rows=500 width=10)
                       predicate:key is not null
                       TableScan [TS_15] (rows=500 width=10)
                         default@tab_part_n14,b_n15,Tbl:COMPLETE,Col:NONE,Output:["key"]
               <-Union 2 [SIMPLE_EDGE]
                 <-Map 1 [CONTAINS] llap
-                  Reduce Output Operator [RS_18]
+                  Reduce Output Operator [RS_49]
                     PartitionCols:_col0
-                    Merge Join Operator [MERGEJOIN_37] (rows=266 width=10)
-                      Conds:SEL_2._col0=SEL_5._col0(Inner),Output:["_col0"]
+                    Merge Join Operator [MERGEJOIN_46] (rows=266 width=10)
+                      Conds:SEL_44._col0=SEL_5._col0(Inner),Output:["_col0"]
                     <-Select Operator [SEL_5] (rows=242 width=10)
                         Output:["_col0"]
                         Filter Operator [FIL_34] (rows=242 width=10)
                           predicate:key is not null
                           TableScan [TS_3] (rows=242 width=10)
                             default@tab_n15,s3,Tbl:COMPLETE,Col:NONE,Output:["key"]
-                    <-Select Operator [SEL_2] (rows=242 width=10)
+                    <-Select Operator [SEL_44] (rows=242 width=10)
                         Output:["_col0"]
-                        Filter Operator [FIL_33] (rows=242 width=10)
+                        Filter Operator [FIL_42] (rows=242 width=10)
                           predicate:key is not null
-                          TableScan [TS_0] (rows=242 width=10)
+                          TableScan [TS_40] (rows=242 width=10)
                             Output:["key"]
                 <-Map 6 [CONTAINS] vectorized, llap
-                  Reduce Output Operator [RS_47]
+                  Reduce Output Operator [RS_62]
                     PartitionCols:_col0
-                    Select Operator [SEL_46] (rows=242 width=10)
+                    Select Operator [SEL_61] (rows=242 width=10)
                       Output:["_col0"]
-                      Filter Operator [FIL_45] (rows=242 width=10)
+                      Filter Operator [FIL_60] (rows=242 width=10)
                         predicate:key is not null
-                        TableScan [TS_10] (rows=242 width=10)
+                        TableScan [TS_50] (rows=242 width=10)
                           Output:["key"]
 
 PREHOOK: query: explain
@@ -1895,39 +1895,39 @@ Stage-0
     limit:-1
     Stage-1
       Reducer 5 vectorized, llap
-      File Output Operator [FS_59]
-        Group By Operator [GBY_58] (rows=1 width=8)
+      File Output Operator [FS_67]
+        Group By Operator [GBY_66] (rows=1 width=8)
           Output:["_col0"],aggregations:["count(VALUE._col0)"]
         <-Reducer 4 [CUSTOM_SIMPLE_EDGE] llap
           PARTITION_ONLY_SHUFFLE [RS_29]
             Group By Operator [GBY_28] (rows=1 width=8)
               Output:["_col0"],aggregations:["count()"]
               Merge Join Operator [MERGEJOIN_51] (rows=587 width=10)
-                Conds:Union 3._col0=RS_57._col0(Inner)
+                Conds:Union 3._col0=RS_65._col0(Inner)
               <-Map 9 [SIMPLE_EDGE] vectorized, llap
-                SHUFFLE [RS_57]
+                SHUFFLE [RS_65]
                   PartitionCols:_col0
-                  Select Operator [SEL_56] (rows=500 width=10)
+                  Select Operator [SEL_64] (rows=500 width=10)
                     Output:["_col0"]
-                    Filter Operator [FIL_55] (rows=500 width=10)
+                    Filter Operator [FIL_63] (rows=500 width=10)
                       predicate:key is not null
                       TableScan [TS_21] (rows=500 width=10)
                         default@tab_part_n14,b_n15,Tbl:COMPLETE,Col:NONE,Output:["key"]
               <-Union 3 [SIMPLE_EDGE]
                 <-Map 8 [CONTAINS] vectorized, llap
-                  Reduce Output Operator [RS_62]
+                  Reduce Output Operator [RS_70]
                     PartitionCols:_col0
-                    Select Operator [SEL_61] (rows=242 width=10)
+                    Select Operator [SEL_69] (rows=242 width=10)
                       Output:["_col0"]
-                      Filter Operator [FIL_60] (rows=242 width=10)
+                      Filter Operator [FIL_68] (rows=242 width=10)
                         predicate:key is not null
-                        TableScan [TS_16] (rows=242 width=10)
+                        TableScan [TS_55] (rows=242 width=10)
                           Output:["key"]
                 <-Reducer 2 [CONTAINS] llap
-                  Reduce Output Operator [RS_24]
+                  Reduce Output Operator [RS_54]
                     PartitionCols:_col0
-                    Merge Join Operator [MERGEJOIN_50] (rows=292 width=10)
-                      Conds:RS_12._col1=RS_54._col0(Inner),Output:["_col0"]
+                    Merge Join Operator [MERGEJOIN_52] (rows=292 width=10)
+                      Conds:RS_12._col1=RS_62._col0(Inner),Output:["_col0"]
                     <-Map 1 [SIMPLE_EDGE] llap
                       SHUFFLE [RS_12]
                         PartitionCols:_col1
@@ -1946,11 +1946,11 @@ Stage-0
                               TableScan [TS_0] (rows=242 width=10)
                                 default@tab_n15,s1,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
                     <-Map 7 [SIMPLE_EDGE] vectorized, llap
-                      SHUFFLE [RS_54]
+                      SHUFFLE [RS_62]
                         PartitionCols:_col0
-                        Select Operator [SEL_53] (rows=242 width=10)
+                        Select Operator [SEL_61] (rows=242 width=10)
                           Output:["_col0"]
-                          Filter Operator [FIL_52] (rows=242 width=10)
+                          Filter Operator [FIL_60] (rows=242 width=10)
                             predicate:value is not null
                             TableScan [TS_6] (rows=242 width=10)
                               default@tab_n15,s2,Tbl:COMPLETE,Col:NONE,Output:["value"]
@@ -2005,180 +2005,180 @@ Stage-0
     Stage-1
       Union 3
       <-Map 16 [CONTAINS] vectorized, llap
-        File Output Operator [FS_163]
-          Select Operator [SEL_162] (rows=1677 width=10)
+        File Output Operator [FS_232]
+          Select Operator [SEL_231] (rows=1677 width=10)
             Output:["_col0","_col1"]
-            Map Join Operator [MAPJOIN_161] (rows=1677 width=10)
-              Conds:RS_130._col1=SEL_160._col0(Inner),Output:["_col0","_col3"]
+            Map Join Operator [MAPJOIN_230] (rows=1677 width=10)
+              Conds:RS_199._col1=SEL_229._col0(Inner),Output:["_col0","_col3"]
             <-Map 6 [BROADCAST_EDGE] vectorized, llap
-              BROADCAST [RS_130]
+              BROADCAST [RS_199]
                 PartitionCols:_col1
-                Map Join Operator [MAPJOIN_129] (rows=27 width=7)
-                  Conds:SEL_127._col0=RS_125._col0(Inner),Output:["_col0","_col1","_col3"]
+                Map Join Operator [MAPJOIN_198] (rows=27 width=7)
+                  Conds:SEL_196._col0=RS_194._col0(Inner),Output:["_col0","_col1","_col3"]
                 <-Map 15 [BROADCAST_EDGE] vectorized, llap
-                  BROADCAST [RS_125]
+                  BROADCAST [RS_194]
                     PartitionCols:_col0
-                    Select Operator [SEL_124] (rows=25 width=7)
+                    Select Operator [SEL_193] (rows=25 width=7)
                       Output:["_col0","_col1"]
-                      Filter Operator [FIL_123] (rows=25 width=7)
+                      Filter Operator [FIL_192] (rows=25 width=7)
                         predicate:key is not null
                         TableScan [TS_49] (rows=25 width=7)
                           default@src1,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
-                <-Select Operator [SEL_127] (rows=25 width=7)
+                <-Select Operator [SEL_196] (rows=25 width=7)
                     Output:["_col0","_col1"]
-                    Filter Operator [FIL_126] (rows=25 width=7)
+                    Filter Operator [FIL_195] (rows=25 width=7)
                       predicate:(key is not null and value is not null)
                       TableScan [TS_3] (rows=25 width=7)
                         default@src1,x,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
-            <-Select Operator [SEL_160] (rows=25 width=7)
+            <-Select Operator [SEL_229] (rows=25 width=7)
                 Output:["_col0"]
-                Filter Operator [FIL_159] (rows=25 width=7)
+                Filter Operator [FIL_228] (rows=25 width=7)
                   predicate:value is not null
-                  TableScan [TS_52] (rows=25 width=7)
+                  TableScan [TS_156] (rows=25 width=7)
                     Output:["value"]
       <-Map 17 [CONTAINS] vectorized, llap
-        File Output Operator [FS_168]
-          Select Operator [SEL_167] (rows=1677 width=10)
+        File Output Operator [FS_237]
+          Select Operator [SEL_236] (rows=1677 width=10)
             Output:["_col0","_col1"]
-            Map Join Operator [MAPJOIN_166] (rows=1677 width=10)
-              Conds:RS_131._col1=SEL_165._col0(Inner),Output:["_col0","_col3"]
+            Map Join Operator [MAPJOIN_235] (rows=1677 width=10)
+              Conds:RS_200._col1=SEL_234._col0(Inner),Output:["_col0","_col3"]
             <-Map 6 [BROADCAST_EDGE] vectorized, llap
-              BROADCAST [RS_131]
+              BROADCAST [RS_200]
                 PartitionCols:_col1
-                 Please refer to the previous Map Join Operator [MAPJOIN_129]
-            <-Select Operator [SEL_165] (rows=500 width=10)
+                 Please refer to the previous Map Join Operator [MAPJOIN_198]
+            <-Select Operator [SEL_234] (rows=500 width=10)
                 Output:["_col0"]
-                Filter Operator [FIL_164] (rows=500 width=10)
+                Filter Operator [FIL_233] (rows=500 width=10)
                   predicate:value is not null
-                  TableScan [TS_55] (rows=500 width=10)
+                  TableScan [TS_165] (rows=500 width=10)
                     Output:["value"]
       <-Map 18 [CONTAINS] vectorized, llap
-        File Output Operator [FS_173]
-          Select Operator [SEL_172] (rows=1677 width=10)
+        File Output Operator [FS_242]
+          Select Operator [SEL_241] (rows=1677 width=10)
             Output:["_col0","_col1"]
-            Map Join Operator [MAPJOIN_171] (rows=1677 width=10)
-              Conds:RS_132._col1=SEL_170._col0(Inner),Output:["_col0","_col3"]
+            Map Join Operator [MAPJOIN_240] (rows=1677 width=10)
+              Conds:RS_201._col1=SEL_239._col0(Inner),Output:["_col0","_col3"]
             <-Map 6 [BROADCAST_EDGE] vectorized, llap
-              BROADCAST [RS_132]
+              BROADCAST [RS_201]
                 PartitionCols:_col1
-                 Please refer to the previous Map Join Operator [MAPJOIN_129]
-            <-Select Operator [SEL_170] (rows=500 width=10)
+                 Please refer to the previous Map Join Operator [MAPJOIN_198]
+            <-Select Operator [SEL_239] (rows=500 width=10)
                 Output:["_col0"]
-                Filter Operator [FIL_169] (rows=500 width=10)
+                Filter Operator [FIL_238] (rows=500 width=10)
                   predicate:value is not null
-                  TableScan [TS_59] (rows=500 width=10)
+                  TableScan [TS_174] (rows=500 width=10)
                     Output:["value"]
       <-Map 19 [CONTAINS] vectorized, llap
-        File Output Operator [FS_178]
-          Select Operator [SEL_177] (rows=1677 width=10)
+        File Output Operator [FS_247]
+          Select Operator [SEL_246] (rows=1677 width=10)
             Output:["_col0","_col1"]
-            Map Join Operator [MAPJOIN_176] (rows=1677 width=10)
-              Conds:RS_133._col1=SEL_175._col0(Inner),Output:["_col0","_col3"]
+            Map Join Operator [MAPJOIN_245] (rows=1677 width=10)
+              Conds:RS_202._col1=SEL_244._col0(Inner),Output:["_col0","_col3"]
             <-Map 6 [BROADCAST_EDGE] vectorized, llap
-              BROADCAST [RS_133]
+              BROADCAST [RS_202]
                 PartitionCols:_col1
-                 Please refer to the previous Map Join Operator [MAPJOIN_129]
-            <-Select Operator [SEL_175] (rows=500 width=10)
+                 Please refer to the previous Map Join Operator [MAPJOIN_198]
+            <-Select Operator [SEL_244] (rows=500 width=10)
                 Output:["_col0"]
-                Filter Operator [FIL_174] (rows=500 width=10)
+                Filter Operator [FIL_243] (rows=500 width=10)
                   predicate:value is not null
-                  TableScan [TS_62] (rows=500 width=10)
+                  TableScan [TS_183] (rows=500 width=10)
                     Output:["value"]
       <-Reducer 2 [CONTAINS] llap
-        File Output Operator [FS_74]
-          Select Operator [SEL_20] (rows=605 width=10)
+        File Output Operator [FS_126]
+          Select Operator [SEL_124] (rows=605 width=10)
             Output:["_col0","_col1"]
-            Merge Join Operator [MERGEJOIN_114] (rows=605 width=10)
-              Conds:RS_140._col3=Union 8._col0(Inner),Output:["_col1","_col2"]
+            Merge Join Operator [MERGEJOIN_123] (rows=605 width=10)
+              Conds:RS_209._col3=Union 8._col0(Inner),Output:["_col1","_col2"]
             <-Map 1 [SIMPLE_EDGE] vectorized, llap
-              SHUFFLE [RS_140]
+              SHUFFLE [RS_209]
                 PartitionCols:_col3
-                Map Join Operator [MAPJOIN_138] (rows=550 width=10)
-                  Conds:SEL_136._col0=RS_128._col0(Inner),Output:["_col1","_col2","_col3"]
+                Map Join Operator [MAPJOIN_207] (rows=550 width=10)
+                  Conds:SEL_205._col0=RS_197._col0(Inner),Output:["_col1","_col2","_col3"]
                 <-Map 6 [BROADCAST_EDGE] vectorized, llap
-                  BROADCAST [RS_128]
+                  BROADCAST [RS_197]
                     PartitionCols:_col0
-                     Please refer to the previous Select Operator [SEL_127]
-                <-Select Operator [SEL_136] (rows=500 width=10)
+                     Please refer to the previous Select Operator [SEL_196]
+                <-Select Operator [SEL_205] (rows=500 width=10)
                     Output:["_col0","_col1"]
-                    Filter Operator [FIL_134] (rows=500 width=10)
+                    Filter Operator [FIL_203] (rows=500 width=10)
                       predicate:key is not null
                       TableScan [TS_0] (rows=500 width=10)
                         default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
             <-Union 8 [SIMPLE_EDGE]
               <-Map 7 [CONTAINS] vectorized, llap
-                Reduce Output Operator [RS_146]
+                Reduce Output Operator [RS_215]
                   PartitionCols:_col0
-                  Select Operator [SEL_145] (rows=25 width=7)
+                  Select Operator [SEL_214] (rows=25 width=7)
                     Output:["_col0"]
-                    Filter Operator [FIL_144] (rows=25 width=7)
+                    Filter Operator [FIL_213] (rows=25 width=7)
                       predicate:value is not null
-                      TableScan [TS_6] (rows=25 width=7)
+                      TableScan [TS_131] (rows=25 width=7)
                         Output:["value"]
               <-Map 9 [CONTAINS] vectorized, llap
-                Reduce Output Operator [RS_149]
+                Reduce Output Operator [RS_218]
                   PartitionCols:_col0
-                  Select Operator [SEL_148] (rows=500 width=10)
+                  Select Operator [SEL_217] (rows=500 width=10)
                     Output:["_col0"]
-                    Filter Operator [FIL_147] (rows=500 width=10)
+                    Filter Operator [FIL_216] (rows=500 width=10)
                       predicate:value is not null
-                      TableScan [TS_9] (rows=500 width=10)
+                      TableScan [TS_136] (rows=500 width=10)
                         Output:["value"]
       <-Reducer 5 [CONTAINS] llap
-        File Output Operator [FS_74]
-          Select Operator [SEL_44] (rows=1127 width=10)
+        File Output Operator [FS_130]
+          Select Operator [SEL_128] (rows=1127 width=10)
             Output:["_col0","_col1"]
-            Merge Join Operator [MERGEJOIN_115] (rows=1127 width=10)
+            Merge Join Operator [MERGEJOIN_127] (rows=1127 width=10)
               Conds:RS_41._col1=Union 12._col0(Inner),Output:["_col0","_col3"]
             <-Reducer 4 [SIMPLE_EDGE] llap
               SHUFFLE [RS_41]
                 PartitionCols:_col1
                 Merge Join Operator [MERGEJOIN_112] (rows=550 width=10)
-                  Conds:RS_139._col0=RS_143._col0(Inner),Output:["_col0","_col1","_col3"]
+                  Conds:RS_208._col0=RS_212._col0(Inner),Output:["_col0","_col1","_col3"]
                 <-Map 1 [SIMPLE_EDGE] vectorized, llap
-                  SHUFFLE [RS_139]
+                  SHUFFLE [

<TRUNCATED>

[07/14] hive git commit: HIVE-19237: Only use an operatorId once in a plan (Zoltan Haindrich reviewed by Ashutosh Chauhan)

Posted by kg...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query14.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query14.q.out b/ql/src/test/results/clientpositive/perf/tez/query14.q.out
index 6366d14..4d27064 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query14.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query14.q.out
@@ -1,6 +1,6 @@
-Warning: Shuffle Join MERGEJOIN[893][tables = [$hdt$_1, $hdt$_2, $hdt$_0]] in Stage 'Reducer 5' is a cross product
-Warning: Shuffle Join MERGEJOIN[894][tables = [$hdt$_1, $hdt$_2, $hdt$_0]] in Stage 'Reducer 12' is a cross product
-Warning: Shuffle Join MERGEJOIN[895][tables = [$hdt$_2, $hdt$_3, $hdt$_1]] in Stage 'Reducer 16' is a cross product
+Warning: Shuffle Join MERGEJOIN[902][tables = [$hdt$_1, $hdt$_2, $hdt$_0]] in Stage 'Reducer 5' is a cross product
+Warning: Shuffle Join MERGEJOIN[914][tables = [$hdt$_1, $hdt$_2, $hdt$_0]] in Stage 'Reducer 12' is a cross product
+Warning: Shuffle Join MERGEJOIN[926][tables = [$hdt$_2, $hdt$_3, $hdt$_1]] in Stage 'Reducer 16' is a cross product
 PREHOOK: query: explain
 with  cross_items as
  (select i_item_sk ss_item_sk
@@ -281,203 +281,203 @@ Stage-0
     limit:100
     Stage-1
       Reducer 8 vectorized
-      File Output Operator [FS_972]
-        Limit [LIM_971] (rows=100 width=237)
+      File Output Operator [FS_1134]
+        Limit [LIM_1133] (rows=100 width=237)
           Number of rows:100
-          Select Operator [SEL_970] (rows=1016388080 width=237)
+          Select Operator [SEL_1132] (rows=1016388080 width=237)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
           <-Reducer 7 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_969]
-              Select Operator [SEL_968] (rows=1016388080 width=237)
+            SHUFFLE [RS_1131]
+              Select Operator [SEL_1130] (rows=1016388080 width=237)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                Group By Operator [GBY_967] (rows=1016388080 width=237)
+                Group By Operator [GBY_1129] (rows=1016388080 width=237)
                   Output:["_col0","_col1","_col2","_col3","_col5","_col6"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4
                 <-Union 6 [SIMPLE_EDGE]
                   <-Reducer 12 [CONTAINS]
-                    Reduce Output Operator [RS_571]
+                    Reduce Output Operator [RS_919]
                       PartitionCols:_col0, _col1, _col2, _col3, _col4
-                      Group By Operator [GBY_570] (rows=2032776160 width=237)
+                      Group By Operator [GBY_918] (rows=2032776160 width=237)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col4)","sum(_col5)"],keys:_col0, _col1, _col2, _col3, 0L
-                        Select Operator [SEL_377] (rows=116155905 width=264)
+                        Select Operator [SEL_916] (rows=116155905 width=264)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                          Filter Operator [FIL_376] (rows=116155905 width=264)
+                          Filter Operator [FIL_915] (rows=116155905 width=264)
                             predicate:(_col5 > _col1)
-                            Merge Join Operator [MERGEJOIN_894] (rows=348467716 width=264)
+                            Merge Join Operator [MERGEJOIN_914] (rows=348467716 width=264)
                               Conds:(Inner),(Inner),Output:["_col1","_col2","_col3","_col4","_col5","_col6"]
                             <-Reducer 11 [CUSTOM_SIMPLE_EDGE] vectorized
-                              PARTITION_ONLY_SHUFFLE [RS_978]
-                                Select Operator [SEL_977] (rows=1 width=8)
-                                  Filter Operator [FIL_976] (rows=1 width=8)
+                              PARTITION_ONLY_SHUFFLE [RS_1140]
+                                Select Operator [SEL_1139] (rows=1 width=8)
+                                  Filter Operator [FIL_1138] (rows=1 width=8)
                                     predicate:(sq_count_check(_col0) <= 1)
-                                    Group By Operator [GBY_975] (rows=1 width=8)
+                                    Group By Operator [GBY_1137] (rows=1 width=8)
                                       Output:["_col0"],aggregations:["count()"]
-                                      Select Operator [SEL_974] (rows=1 width=8)
-                                        Group By Operator [GBY_973] (rows=1 width=8)
+                                      Select Operator [SEL_1136] (rows=1 width=8)
+                                        Group By Operator [GBY_1135] (rows=1 width=8)
                                           Output:["_col0"],aggregations:["count(VALUE._col0)"]
                                         <-Union 10 [CUSTOM_SIMPLE_EDGE]
                                           <-Reducer 19 [CONTAINS]
-                                            Reduce Output Operator [RS_223]
-                                              Group By Operator [GBY_222] (rows=1 width=8)
+                                            Reduce Output Operator [RS_943]
+                                              Group By Operator [GBY_942] (rows=1 width=8)
                                                 Output:["_col0"],aggregations:["count(_col0)"]
-                                                Select Operator [SEL_220] (rows=1108786976 width=108)
+                                                Select Operator [SEL_941] (rows=1108786976 width=108)
                                                   Output:["_col0"]
-                                                  Select Operator [SEL_208] (rows=316788826 width=135)
+                                                  Select Operator [SEL_939] (rows=316788826 width=135)
                                                     Output:["_col0"]
-                                                    Merge Join Operator [MERGEJOIN_864] (rows=316788826 width=135)
-                                                      Conds:RS_1016._col0=RS_1022._col0(Inner),Output:["_col1"]
+                                                    Merge Join Operator [MERGEJOIN_938] (rows=316788826 width=135)
+                                                      Conds:RS_1178._col0=RS_1184._col0(Inner),Output:["_col1"]
                                                     <-Map 21 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_1022]
+                                                      SHUFFLE [RS_1184]
                                                         PartitionCols:_col0
-                                                        Select Operator [SEL_1019] (rows=8116 width=1119)
+                                                        Select Operator [SEL_1181] (rows=8116 width=1119)
                                                           Output:["_col0"]
-                                                          Filter Operator [FIL_1018] (rows=8116 width=1119)
+                                                          Filter Operator [FIL_1180] (rows=8116 width=1119)
                                                             predicate:(d_date_sk is not null and d_year BETWEEN 1998 AND 2000)
                                                             TableScan [TS_13] (rows=73049 width=1119)
                                                               default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
                                                     <-Map 17 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_1016]
+                                                      SHUFFLE [RS_1178]
                                                         PartitionCols:_col0
-                                                        Select Operator [SEL_1014] (rows=287989836 width=135)
+                                                        Select Operator [SEL_1176] (rows=287989836 width=135)
                                                           Output:["_col0","_col1"]
-                                                          Filter Operator [FIL_1013] (rows=287989836 width=135)
+                                                          Filter Operator [FIL_1175] (rows=287989836 width=135)
                                                             predicate:cs_sold_date_sk is not null
                                                             TableScan [TS_10] (rows=287989836 width=135)
                                                               default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_quantity"]
                                           <-Reducer 33 [CONTAINS]
-                                            Reduce Output Operator [RS_223]
-                                              Group By Operator [GBY_222] (rows=1 width=8)
+                                            Reduce Output Operator [RS_979]
+                                              Group By Operator [GBY_978] (rows=1 width=8)
                                                 Output:["_col0"],aggregations:["count(_col0)"]
-                                                Select Operator [SEL_220] (rows=1108786976 width=108)
+                                                Select Operator [SEL_977] (rows=1108786976 width=108)
                                                   Output:["_col0"]
-                                                  Select Operator [SEL_219] (rows=158402938 width=135)
+                                                  Select Operator [SEL_975] (rows=158402938 width=135)
                                                     Output:["_col0"]
-                                                    Merge Join Operator [MERGEJOIN_865] (rows=158402938 width=135)
-                                                      Conds:RS_1034._col0=RS_1040._col0(Inner),Output:["_col1"]
+                                                    Merge Join Operator [MERGEJOIN_974] (rows=158402938 width=135)
+                                                      Conds:RS_1196._col0=RS_1202._col0(Inner),Output:["_col1"]
                                                     <-Map 35 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_1040]
+                                                      SHUFFLE [RS_1202]
                                                         PartitionCols:_col0
-                                                        Select Operator [SEL_1037] (rows=8116 width=1119)
+                                                        Select Operator [SEL_1199] (rows=8116 width=1119)
                                                           Output:["_col0"]
-                                                          Filter Operator [FIL_1036] (rows=8116 width=1119)
+                                                          Filter Operator [FIL_1198] (rows=8116 width=1119)
                                                             predicate:(d_date_sk is not null and d_year BETWEEN 1998 AND 2000)
                                                             TableScan [TS_24] (rows=73049 width=1119)
                                                               default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
                                                     <-Map 31 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_1034]
+                                                      SHUFFLE [RS_1196]
                                                         PartitionCols:_col0
-                                                        Select Operator [SEL_1032] (rows=144002668 width=135)
+                                                        Select Operator [SEL_1194] (rows=144002668 width=135)
                                                           Output:["_col0","_col1"]
-                                                          Filter Operator [FIL_1031] (rows=144002668 width=135)
+                                                          Filter Operator [FIL_1193] (rows=144002668 width=135)
                                                             predicate:ws_sold_date_sk is not null
                                                             TableScan [TS_21] (rows=144002668 width=135)
                                                               default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_quantity"]
                                           <-Reducer 9 [CONTAINS]
-                                            Reduce Output Operator [RS_223]
-                                              Group By Operator [GBY_222] (rows=1 width=8)
+                                            Reduce Output Operator [RS_913]
+                                              Group By Operator [GBY_912] (rows=1 width=8)
                                                 Output:["_col0"],aggregations:["count(_col0)"]
-                                                Select Operator [SEL_220] (rows=1108786976 width=108)
+                                                Select Operator [SEL_911] (rows=1108786976 width=108)
                                                   Output:["_col0"]
-                                                  Select Operator [SEL_198] (rows=633595212 width=88)
+                                                  Select Operator [SEL_909] (rows=633595212 width=88)
                                                     Output:["_col0"]
-                                                    Merge Join Operator [MERGEJOIN_863] (rows=633595212 width=88)
-                                                      Conds:RS_899._col0=RS_908._col0(Inner),Output:["_col1"]
+                                                    Merge Join Operator [MERGEJOIN_908] (rows=633595212 width=88)
+                                                      Conds:RS_1061._col0=RS_1070._col0(Inner),Output:["_col1"]
                                                     <-Map 86 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_908]
+                                                      SHUFFLE [RS_1070]
                                                         PartitionCols:_col0
-                                                        Select Operator [SEL_902] (rows=8116 width=1119)
+                                                        Select Operator [SEL_1064] (rows=8116 width=1119)
                                                           Output:["_col0"]
-                                                          Filter Operator [FIL_901] (rows=8116 width=1119)
+                                                          Filter Operator [FIL_1063] (rows=8116 width=1119)
                                                             predicate:(d_date_sk is not null and d_year BETWEEN 1999 AND 2001)
                                                             TableScan [TS_97] (rows=73049 width=1119)
                                                               default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
                                                     <-Map 1 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_899]
+                                                      SHUFFLE [RS_1061]
                                                         PartitionCols:_col0
-                                                        Select Operator [SEL_897] (rows=575995635 width=88)
+                                                        Select Operator [SEL_1059] (rows=575995635 width=88)
                                                           Output:["_col0","_col1"]
-                                                          Filter Operator [FIL_896] (rows=575995635 width=88)
+                                                          Filter Operator [FIL_1058] (rows=575995635 width=88)
                                                             predicate:ss_sold_date_sk is not null
                                                             TableScan [TS_0] (rows=575995635 width=88)
                                                               default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_quantity"]
                             <-Reducer 27 [CUSTOM_SIMPLE_EDGE] vectorized
-                              PARTITION_ONLY_SHUFFLE [RS_981]
-                                Select Operator [SEL_980] (rows=1 width=120)
+                              PARTITION_ONLY_SHUFFLE [RS_1143]
+                                Select Operator [SEL_1142] (rows=1 width=120)
                                   Output:["_col0"]
-                                  Group By Operator [GBY_979] (rows=1 width=120)
+                                  Group By Operator [GBY_1141] (rows=1 width=120)
                                     Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)"]
                                   <-Union 26 [CUSTOM_SIMPLE_EDGE]
                                     <-Reducer 25 [CONTAINS]
-                                      Reduce Output Operator [RS_268]
-                                        Group By Operator [GBY_267] (rows=1 width=120)
+                                      Reduce Output Operator [RS_961]
+                                        Group By Operator [GBY_960] (rows=1 width=120)
                                           Output:["_col0","_col1"],aggregations:["sum(_col0)","count(_col0)"]
-                                          Select Operator [SEL_265] (rows=1108786976 width=108)
+                                          Select Operator [SEL_959] (rows=1108786976 width=108)
                                             Output:["_col0"]
-                                            Select Operator [SEL_253] (rows=316788826 width=135)
+                                            Select Operator [SEL_957] (rows=316788826 width=135)
                                               Output:["_col0","_col1"]
-                                              Merge Join Operator [MERGEJOIN_867] (rows=316788826 width=135)
-                                                Conds:RS_1029._col0=RS_1023._col0(Inner),Output:["_col1","_col2"]
+                                              Merge Join Operator [MERGEJOIN_956] (rows=316788826 width=135)
+                                                Conds:RS_1191._col0=RS_1185._col0(Inner),Output:["_col1","_col2"]
                                               <-Map 21 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_1023]
+                                                SHUFFLE [RS_1185]
                                                   PartitionCols:_col0
-                                                   Please refer to the previous Select Operator [SEL_1019]
+                                                   Please refer to the previous Select Operator [SEL_1181]
                                               <-Map 43 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_1029]
+                                                SHUFFLE [RS_1191]
                                                   PartitionCols:_col0
-                                                  Select Operator [SEL_1027] (rows=287989836 width=135)
+                                                  Select Operator [SEL_1189] (rows=287989836 width=135)
                                                     Output:["_col0","_col1","_col2"]
-                                                    Filter Operator [FIL_1026] (rows=287989836 width=135)
+                                                    Filter Operator [FIL_1188] (rows=287989836 width=135)
                                                       predicate:cs_sold_date_sk is not null
                                                       TableScan [TS_55] (rows=287989836 width=135)
                                                         default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_quantity","cs_list_price"]
                                     <-Reducer 37 [CONTAINS]
-                                      Reduce Output Operator [RS_268]
-                                        Group By Operator [GBY_267] (rows=1 width=120)
+                                      Reduce Output Operator [RS_997]
+                                        Group By Operator [GBY_996] (rows=1 width=120)
                                           Output:["_col0","_col1"],aggregations:["sum(_col0)","count(_col0)"]
-                                          Select Operator [SEL_265] (rows=1108786976 width=108)
+                                          Select Operator [SEL_995] (rows=1108786976 width=108)
                                             Output:["_col0"]
-                                            Select Operator [SEL_264] (rows=158402938 width=135)
+                                            Select Operator [SEL_993] (rows=158402938 width=135)
                                               Output:["_col0","_col1"]
-                                              Merge Join Operator [MERGEJOIN_868] (rows=158402938 width=135)
-                                                Conds:RS_1047._col0=RS_1041._col0(Inner),Output:["_col1","_col2"]
+                                              Merge Join Operator [MERGEJOIN_992] (rows=158402938 width=135)
+                                                Conds:RS_1209._col0=RS_1203._col0(Inner),Output:["_col1","_col2"]
                                               <-Map 35 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_1041]
+                                                SHUFFLE [RS_1203]
                                                   PartitionCols:_col0
-                                                   Please refer to the previous Select Operator [SEL_1037]
+                                                   Please refer to the previous Select Operator [SEL_1199]
                                               <-Map 44 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_1047]
+                                                SHUFFLE [RS_1209]
                                                   PartitionCols:_col0
-                                                  Select Operator [SEL_1045] (rows=144002668 width=135)
+                                                  Select Operator [SEL_1207] (rows=144002668 width=135)
                                                     Output:["_col0","_col1","_col2"]
-                                                    Filter Operator [FIL_1044] (rows=144002668 width=135)
+                                                    Filter Operator [FIL_1206] (rows=144002668 width=135)
                                                       predicate:ws_sold_date_sk is not null
                                                       TableScan [TS_66] (rows=144002668 width=135)
                                                         default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_quantity","ws_list_price"]
                                     <-Reducer 41 [CONTAINS]
-                                      Reduce Output Operator [RS_268]
-                                        Group By Operator [GBY_267] (rows=1 width=120)
+                                      Reduce Output Operator [RS_1015]
+                                        Group By Operator [GBY_1014] (rows=1 width=120)
                                           Output:["_col0","_col1"],aggregations:["sum(_col0)","count(_col0)"]
-                                          Select Operator [SEL_265] (rows=1108786976 width=108)
+                                          Select Operator [SEL_1013] (rows=1108786976 width=108)
                                             Output:["_col0"]
-                                            Select Operator [SEL_243] (rows=633595212 width=88)
+                                            Select Operator [SEL_1011] (rows=633595212 width=88)
                                               Output:["_col0","_col1"]
-                                              Merge Join Operator [MERGEJOIN_866] (rows=633595212 width=88)
-                                                Conds:RS_1052._col0=RS_909._col0(Inner),Output:["_col1","_col2"]
+                                              Merge Join Operator [MERGEJOIN_1010] (rows=633595212 width=88)
+                                                Conds:RS_1214._col0=RS_1071._col0(Inner),Output:["_col1","_col2"]
                                               <-Map 86 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_909]
+                                                SHUFFLE [RS_1071]
                                                   PartitionCols:_col0
-                                                   Please refer to the previous Select Operator [SEL_902]
+                                                   Please refer to the previous Select Operator [SEL_1064]
                                               <-Map 39 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_1052]
+                                                SHUFFLE [RS_1214]
                                                   PartitionCols:_col0
-                                                  Select Operator [SEL_1050] (rows=575995635 width=88)
+                                                  Select Operator [SEL_1212] (rows=575995635 width=88)
                                                     Output:["_col0","_col1","_col2"]
-                                                    Filter Operator [FIL_1049] (rows=575995635 width=88)
+                                                    Filter Operator [FIL_1211] (rows=575995635 width=88)
                                                       predicate:ss_sold_date_sk is not null
                                                       TableScan [TS_45] (rows=575995635 width=88)
                                                         default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_quantity","ss_list_price"]
                             <-Reducer 52 [CUSTOM_SIMPLE_EDGE] vectorized
-                              PARTITION_ONLY_SHUFFLE [RS_992]
-                                Group By Operator [GBY_991] (rows=348467716 width=135)
+                              PARTITION_ONLY_SHUFFLE [RS_1154]
+                                Group By Operator [GBY_1153] (rows=348467716 width=135)
                                   Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2
                                 <-Reducer 51 [SIMPLE_EDGE]
                                   SHUFFLE [RS_369]
@@ -487,13 +487,13 @@ Stage-0
                                       Select Operator [SEL_366] (rows=696935432 width=135)
                                         Output:["_col0","_col1","_col2","_col3"]
                                         Merge Join Operator [MERGEJOIN_877] (rows=696935432 width=135)
-                                          Conds:RS_362._col1=RS_956._col0(Inner),RS_362._col1=RS_990._col0(Inner),Output:["_col2","_col3","_col8","_col9","_col10"]
+                                          Conds:RS_362._col1=RS_1118._col0(Inner),RS_362._col1=RS_1152._col0(Inner),Output:["_col2","_col3","_col8","_col9","_col10"]
                                         <-Map 56 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_956]
+                                          SHUFFLE [RS_1118]
                                             PartitionCols:_col0
-                                            Select Operator [SEL_944] (rows=462000 width=1436)
+                                            Select Operator [SEL_1106] (rows=462000 width=1436)
                                               Output:["_col0","_col1","_col2","_col3"]
-                                              Filter Operator [FIL_935] (rows=462000 width=1436)
+                                              Filter Operator [FIL_1097] (rows=462000 width=1436)
                                                 predicate:i_item_sk is not null
                                                 TableScan [TS_91] (rows=462000 width=1436)
                                                   default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id"]
@@ -501,29 +501,29 @@ Stage-0
                                           SHUFFLE [RS_362]
                                             PartitionCols:_col1
                                             Merge Join Operator [MERGEJOIN_869] (rows=316788826 width=135)
-                                              Conds:RS_984._col0=RS_927._col0(Inner),Output:["_col1","_col2","_col3"]
+                                              Conds:RS_1146._col0=RS_1089._col0(Inner),Output:["_col1","_col2","_col3"]
                                             <-Map 49 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_927]
+                                              SHUFFLE [RS_1089]
                                                 PartitionCols:_col0
-                                                Select Operator [SEL_925] (rows=18262 width=1119)
+                                                Select Operator [SEL_1087] (rows=18262 width=1119)
                                                   Output:["_col0"]
-                                                  Filter Operator [FIL_924] (rows=18262 width=1119)
+                                                  Filter Operator [FIL_1086] (rows=18262 width=1119)
                                                     predicate:((d_moy = 11) and (d_year = 2000) and d_date_sk is not null)
                                                     TableScan [TS_85] (rows=73049 width=1119)
                                                       default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
                                             <-Map 91 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_984]
+                                              SHUFFLE [RS_1146]
                                                 PartitionCols:_col0
-                                                Select Operator [SEL_983] (rows=287989836 width=135)
+                                                Select Operator [SEL_1145] (rows=287989836 width=135)
                                                   Output:["_col0","_col1","_col2","_col3"]
-                                                  Filter Operator [FIL_982] (rows=287989836 width=135)
+                                                  Filter Operator [FIL_1144] (rows=287989836 width=135)
                                                     predicate:(cs_item_sk is not null and cs_sold_date_sk is not null)
                                                     TableScan [TS_271] (rows=287989836 width=135)
                                                       default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_item_sk","cs_quantity","cs_list_price"]
                                         <-Reducer 68 [ONE_TO_ONE_EDGE] vectorized
-                                          FORWARD [RS_990]
+                                          FORWARD [RS_1152]
                                             PartitionCols:_col0
-                                            Group By Operator [GBY_989] (rows=254100 width=1436)
+                                            Group By Operator [GBY_1151] (rows=254100 width=1436)
                                               Output:["_col0"],keys:KEY._col0
                                             <-Reducer 67 [SIMPLE_EDGE]
                                               SHUFFLE [RS_356]
@@ -531,31 +531,31 @@ Stage-0
                                                 Group By Operator [GBY_355] (rows=508200 width=1436)
                                                   Output:["_col0"],keys:_col0
                                                   Merge Join Operator [MERGEJOIN_876] (rows=508200 width=1436)
-                                                    Conds:RS_952._col1, _col2, _col3=RS_988._col0, _col1, _col2(Inner),Output:["_col0"]
+                                                    Conds:RS_1114._col1, _col2, _col3=RS_1150._col0, _col1, _col2(Inner),Output:["_col0"]
                                                   <-Map 56 [SIMPLE_EDGE] vectorized
-                                                    SHUFFLE [RS_952]
+                                                    SHUFFLE [RS_1114]
                                                       PartitionCols:_col1, _col2, _col3
-                                                      Select Operator [SEL_940] (rows=462000 width=1436)
+                                                      Select Operator [SEL_1102] (rows=462000 width=1436)
                                                         Output:["_col0","_col1","_col2","_col3"]
-                                                        Filter Operator [FIL_931] (rows=462000 width=1436)
+                                                        Filter Operator [FIL_1093] (rows=462000 width=1436)
                                                           predicate:(i_brand_id is not null and i_category_id is not null and i_class_id is not null and i_item_sk is not null)
                                                            Please refer to the previous TableScan [TS_91]
                                                   <-Reducer 72 [ONE_TO_ONE_EDGE] vectorized
-                                                    FORWARD [RS_988]
+                                                    FORWARD [RS_1150]
                                                       PartitionCols:_col0, _col1, _col2
-                                                      Select Operator [SEL_987] (rows=1 width=108)
+                                                      Select Operator [SEL_1149] (rows=1 width=108)
                                                         Output:["_col0","_col1","_col2"]
-                                                        Filter Operator [FIL_986] (rows=1 width=108)
+                                                        Filter Operator [FIL_1148] (rows=1 width=108)
                                                           predicate:(_col3 = 3L)
-                                                          Group By Operator [GBY_985] (rows=304916424 width=108)
+                                                          Group By Operator [GBY_1147] (rows=304916424 width=108)
                                                             Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                           <-Union 71 [SIMPLE_EDGE]
                                                             <-Reducer 70 [CONTAINS] vectorized
-                                                              Reduce Output Operator [RS_1074]
+                                                              Reduce Output Operator [RS_1236]
                                                                 PartitionCols:_col0, _col1, _col2
-                                                                Group By Operator [GBY_1073] (rows=609832849 width=108)
+                                                                Group By Operator [GBY_1235] (rows=609832849 width=108)
                                                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1072] (rows=348477374 width=88)
+                                                                  Group By Operator [GBY_1234] (rows=348477374 width=88)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                   <-Reducer 69 [SIMPLE_EDGE]
                                                                     SHUFFLE [RS_300]
@@ -563,39 +563,39 @@ Stage-0
                                                                       Group By Operator [GBY_299] (rows=696954748 width=88)
                                                                         Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col5, _col6, _col7
                                                                         Merge Join Operator [MERGEJOIN_871] (rows=696954748 width=88)
-                                                                          Conds:RS_295._col1=RS_953._col0(Inner),Output:["_col5","_col6","_col7"]
+                                                                          Conds:RS_295._col1=RS_1115._col0(Inner),Output:["_col5","_col6","_col7"]
                                                                         <-Map 56 [SIMPLE_EDGE] vectorized
-                                                                          SHUFFLE [RS_953]
+                                                                          SHUFFLE [RS_1115]
                                                                             PartitionCols:_col0
-                                                                            Select Operator [SEL_941] (rows=462000 width=1436)
+                                                                            Select Operator [SEL_1103] (rows=462000 width=1436)
                                                                               Output:["_col0","_col1","_col2","_col3"]
-                                                                              Filter Operator [FIL_932] (rows=462000 width=1436)
+                                                                              Filter Operator [FIL_1094] (rows=462000 width=1436)
                                                                                 predicate:(i_brand_id is not null and i_category_id is not null and i_class_id is not null and i_item_sk is not null)
                                                                                  Please refer to the previous TableScan [TS_91]
                                                                         <-Reducer 85 [SIMPLE_EDGE]
                                                                           SHUFFLE [RS_295]
                                                                             PartitionCols:_col1
                                                                             Merge Join Operator [MERGEJOIN_855] (rows=633595212 width=88)
-                                                                              Conds:RS_1056._col0=RS_903._col0(Inner),Output:["_col1"]
+                                                                              Conds:RS_1218._col0=RS_1065._col0(Inner),Output:["_col1"]
                                                                             <-Map 86 [SIMPLE_EDGE] vectorized
-                                                                              SHUFFLE [RS_903]
+                                                                              SHUFFLE [RS_1065]
                                                                                 PartitionCols:_col0
-                                                                                 Please refer to the previous Select Operator [SEL_902]
+                                                                                 Please refer to the previous Select Operator [SEL_1064]
                                                                             <-Map 84 [SIMPLE_EDGE] vectorized
-                                                                              SHUFFLE [RS_1056]
+                                                                              SHUFFLE [RS_1218]
                                                                                 PartitionCols:_col0
-                                                                                Select Operator [SEL_1055] (rows=575995635 width=88)
+                                                                                Select Operator [SEL_1217] (rows=575995635 width=88)
                                                                                   Output:["_col0","_col1"]
-                                                                                  Filter Operator [FIL_1054] (rows=575995635 width=88)
+                                                                                  Filter Operator [FIL_1216] (rows=575995635 width=88)
                                                                                     predicate:(ss_item_sk is not null and ss_sold_date_sk is not null)
                                                                                     TableScan [TS_94] (rows=575995635 width=88)
                                                                                       default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk"]
                                                             <-Reducer 79 [CONTAINS] vectorized
-                                                              Reduce Output Operator [RS_1080]
+                                                              Reduce Output Operator [RS_1242]
                                                                 PartitionCols:_col0, _col1, _col2
-                                                                Group By Operator [GBY_1079] (rows=609832849 width=108)
+                                                                Group By Operator [GBY_1241] (rows=609832849 width=108)
                                                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1078] (rows=174233858 width=135)
+                                                                  Group By Operator [GBY_1240] (rows=174233858 width=135)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                   <-Reducer 78 [SIMPLE_EDGE]
                                                                     SHUFFLE [RS_320]
@@ -603,39 +603,39 @@ Stage-0
                                                                       Group By Operator [GBY_319] (rows=348467716 width=135)
                                                                         Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col5, _col6, _col7
                                                                         Merge Join Operator [MERGEJOIN_873] (rows=348467716 width=135)
-                                                                          Conds:RS_315._col1=RS_954._col0(Inner),Output:["_col5","_col6","_col7"]
+                                                                          Conds:RS_315._col1=RS_1116._col0(Inner),Output:["_col5","_col6","_col7"]
                                                                         <-Map 56 [SIMPLE_EDGE] vectorized
-                                                                          SHUFFLE [RS_954]
+                                                                          SHUFFLE [RS_1116]
                                                                             PartitionCols:_col0
-                                                                            Select Operator [SEL_942] (rows=462000 width=1436)
+                                                                            Select Operator [SEL_1104] (rows=462000 width=1436)
                                                                               Output:["_col0","_col1","_col2","_col3"]
-                                                                              Filter Operator [FIL_933] (rows=462000 width=1436)
+                                                                              Filter Operator [FIL_1095] (rows=462000 width=1436)
                                                                                 predicate:(i_brand_id is not null and i_category_id is not null and i_class_id is not null and i_item_sk is not null)
                                                                                  Please refer to the previous TableScan [TS_91]
                                                                         <-Reducer 87 [SIMPLE_EDGE]
                                                                           SHUFFLE [RS_315]
                                                                             PartitionCols:_col1
                                                                             Merge Join Operator [MERGEJOIN_857] (rows=316788826 width=135)
-                                                                              Conds:RS_1062._col0=RS_904._col0(Inner),Output:["_col1"]
+                                                                              Conds:RS_1224._col0=RS_1066._col0(Inner),Output:["_col1"]
                                                                             <-Map 86 [SIMPLE_EDGE] vectorized
-                                                                              SHUFFLE [RS_904]
+                                                                              SHUFFLE [RS_1066]
                                                                                 PartitionCols:_col0
-                                                                                 Please refer to the previous Select Operator [SEL_902]
+                                                                                 Please refer to the previous Select Operator [SEL_1064]
                                                                             <-Map 89 [SIMPLE_EDGE] vectorized
-                                                                              SHUFFLE [RS_1062]
+                                                                              SHUFFLE [RS_1224]
                                                                                 PartitionCols:_col0
-                                                                                Select Operator [SEL_1061] (rows=287989836 width=135)
+                                                                                Select Operator [SEL_1223] (rows=287989836 width=135)
                                                                                   Output:["_col0","_col1"]
-                                                                                  Filter Operator [FIL_1060] (rows=287989836 width=135)
+                                                                                  Filter Operator [FIL_1222] (rows=287989836 width=135)
                                                                                     predicate:(cs_item_sk is not null and cs_sold_date_sk is not null)
                                                                                     TableScan [TS_114] (rows=287989836 width=135)
                                                                                       default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_item_sk"]
                                                             <-Reducer 82 [CONTAINS] vectorized
-                                                              Reduce Output Operator [RS_1086]
+                                                              Reduce Output Operator [RS_1248]
                                                                 PartitionCols:_col0, _col1, _col2
-                                                                Group By Operator [GBY_1085] (rows=609832849 width=108)
+                                                                Group By Operator [GBY_1247] (rows=609832849 width=108)
                                                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1084] (rows=87121617 width=135)
+                                                                  Group By Operator [GBY_1246] (rows=87121617 width=135)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                   <-Reducer 81 [SIMPLE_EDGE]
                                                                     SHUFFLE [RS_341]
@@ -643,173 +643,173 @@ Stage-0
                                                                       Group By Operator [GBY_340] (rows=174243235 width=135)
                                                                         Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col5, _col6, _col7
                                                                         Merge Join Operator [MERGEJOIN_875] (rows=174243235 width=135)
-                                                                          Conds:RS_336._col1=RS_955._col0(Inner),Output:["_col5","_col6","_col7"]
+                                                                          Conds:RS_336._col1=RS_1117._col0(Inner),Output:["_col5","_col6","_col7"]
                                                                         <-Map 56 [SIMPLE_EDGE] vectorized
-                                                                          SHUFFLE [RS_955]
+                                                                          SHUFFLE [RS_1117]
                                                                             PartitionCols:_col0
-                                                                            Select Operator [SEL_943] (rows=462000 width=1436)
+                                                                            Select Operator [SEL_1105] (rows=462000 width=1436)
                                                                               Output:["_col0","_col1","_col2","_col3"]
-                                                                              Filter Operator [FIL_934] (rows=462000 width=1436)
+                                                                              Filter Operator [FIL_1096] (rows=462000 width=1436)
                                                                                 predicate:(i_brand_id is not null and i_category_id is not null and i_class_id is not null and i_item_sk is not null)
                                                                                  Please refer to the previous TableScan [TS_91]
                                                                         <-Reducer 88 [SIMPLE_EDGE]
                                                                           SHUFFLE [RS_336]
                                                                             PartitionCols:_col1
                                                                             Merge Join Operator [MERGEJOIN_859] (rows=158402938 width=135)
-                                                                              Conds:RS_1068._col0=RS_905._col0(Inner),Output:["_col1"]
+                                                                              Conds:RS_1230._col0=RS_1067._col0(Inner),Output:["_col1"]
                                                                             <-Map 86 [SIMPLE_EDGE] vectorized
-                                                                              SHUFFLE [RS_905]
+                                                                              SHUFFLE [RS_1067]
                                                                                 PartitionCols:_col0
-                                                                                 Please refer to the previous Select Operator [SEL_902]
+                                                                                 Please refer to the previous Select Operator [SEL_1064]
                                                                             <-Map 90 [SIMPLE_EDGE] vectorized
-                                                                              SHUFFLE [RS_1068]
+                                                                              SHUFFLE [RS_1230]
                                                                                 PartitionCols:_col0
-                                                                                Select Operator [SEL_1067] (rows=144002668 width=135)
+                                                                                Select Operator [SEL_1229] (rows=144002668 width=135)
                                                                                   Output:["_col0","_col1"]
-                                                                                  Filter Operator [FIL_1066] (rows=144002668 width=135)
+                                                                                  Filter Operator [FIL_1228] (rows=144002668 width=135)
                                                                                     predicate:(ws_item_sk is not null and ws_sold_date_sk is not null)
                                                                                     TableScan [TS_135] (rows=144002668 width=135)
                                                                                       default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk"]
                   <-Reducer 16 [CONTAINS]
-                    Reduce Output Operator [RS_571]
+                    Reduce Output Operator [RS_931]
                       PartitionCols:_col0, _col1, _col2, _col3, _col4
-                      Group By Operator [GBY_570] (rows=2032776160 width=237)
+                      Group By Operator [GBY_930] (rows=2032776160 width=237)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col4)","sum(_col5)"],keys:_col0, _col1, _col2, _col3, 0L
-                        Select Operator [SEL_567] (rows=58081078 width=264)
+                        Select Operator [SEL_928] (rows=58081078 width=264)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                          Filter Operator [FIL_566] (rows=58081078 width=264)
+                          Filter Operator [FIL_927] (rows=58081078 width=264)
                             predicate:(_col5 > _col1)
-                            Merge Join Operator [MERGEJOIN_895] (rows=174243235 width=264)
+                            Merge Join Operator [MERGEJOIN_926] (rows=174243235 width=264)
                               Conds:(Inner),(Inner),Output:["_col1","_col2","_col3","_col4","_col5","_col6"]
                             <-Reducer 15 [CUSTOM_SIMPLE_EDGE] vectorized
-                              PARTITION_ONLY_SHUFFLE [RS_998]
-                                Select Operator [SEL_997] (rows=1 width=8)
-                                  Filter Operator [FIL_996] (rows=1 width=8)
+                              PARTITION_ONLY_SHUFFLE [RS_1160]
+                                Select Operator [SEL_1159] (rows=1 width=8)
+                                  Filter Operator [FIL_1158] (rows=1 width=8)
                                     predicate:(sq_count_check(_col0) <= 1)
-                                    Group By Operator [GBY_995] (rows=1 width=8)
+                                    Group By Operator [GBY_1157] (rows=1 width=8)
                                       Output:["_col0"],aggregations:["count()"]
-                                      Select Operator [SEL_994] (rows=1 width=8)
-                                        Group By Operator [GBY_993] (rows=1 width=8)
+                                      Select Operator [SEL_1156] (rows=1 width=8)
+                                        Group By Operator [GBY_1155] (rows=1 width=8)
                                           Output:["_col0"],aggregations:["count(VALUE._col0)"]
                                         <-Union 14 [CUSTOM_SIMPLE_EDGE]
                                           <-Reducer 13 [CONTAINS]
-                                            Reduce Output Operator [RS_413]
-                                              Group By Operator [GBY_412] (rows=1 width=8)
+                                            Reduce Output Operator [RS_925]
+                                              Group By Operator [GBY_924] (rows=1 width=8)
                                                 Output:["_col0"],aggregations:["count(_col0)"]
-                                                Select Operator [SEL_410] (rows=1108786976 width=108)
+                                                Select Operator [SEL_923] (rows=1108786976 width=108)
                                                   Output:["_col0"]
-                                                  Select Operator [SEL_388] (rows=633595212 width=88)
+                                                  Select Operator [SEL_921] (rows=633595212 width=88)
                                                     Output:["_col0"]
-                                                    Merge Join Operator [MERGEJOIN_878] (rows=633595212 width=88)
-                                                      Conds:RS_900._col0=RS_910._col0(Inner),Output:["_col1"]
+                                                    Merge Join Operator [MERGEJOIN_920] (rows=633595212 width=88)
+                                                      Conds:RS_1062._col0=RS_1072._col0(Inner),Output:["_col1"]
                                                     <-Map 86 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_910]
+                                                      SHUFFLE [RS_1072]
                                                         PartitionCols:_col0
-                                                         Please refer to the previous Select Operator [SEL_902]
+                                                         Please refer to the previous Select Operator [SEL_1064]
                                                     <-Map 1 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_900]
+                                                      SHUFFLE [RS_1062]
                                                         PartitionCols:_col0
-                                                         Please refer to the previous Select Operator [SEL_897]
+                                                         Please refer to the previous Select Operator [SEL_1059]
                                           <-Reducer 20 [CONTAINS]
-                                            Reduce Output Operator [RS_413]
-                                              Group By Operator [GBY_412] (rows=1 width=8)
+                                            Reduce Output Operator [RS_949]
+                                              Group By Operator [GBY_948] (rows=1 width=8)
                                                 Output:["_col0"],aggregations:["count(_col0)"]
-                                                Select Operator [SEL_410] (rows=1108786976 width=108)
+                                                Select Operator [SEL_947] (rows=1108786976 width=108)
                                                   Output:["_col0"]
-                                                  Select Operator [SEL_398] (rows=316788826 width=135)
+                                                  Select Operator [SEL_945] (rows=316788826 width=135)
                                                     Output:["_col0"]
-                                                    Merge Join Operator [MERGEJOIN_879] (rows=316788826 width=135)
-                                                      Conds:RS_1017._col0=RS_1024._col0(Inner),Output:["_col1"]
+                                                    Merge Join Operator [MERGEJOIN_944] (rows=316788826 width=135)
+                                                      Conds:RS_1179._col0=RS_1186._col0(Inner),Output:["_col1"]
                                                     <-Map 21 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_1024]
+                                                      SHUFFLE [RS_1186]
                                                         PartitionCols:_col0
-                                                         Please refer to the previous Select Operator [SEL_1019]
+                                                         Please refer to the previous Select Operator [SEL_1181]
                                                     <-Map 17 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_1017]
+                                                      SHUFFLE [RS_1179]
                                                         PartitionCols:_col0
-                                                         Please refer to the previous Select Operator [SEL_1014]
+                                                         Please refer to the previous Select Operator [SEL_1176]
                                           <-Reducer 34 [CONTAINS]
-                                            Reduce Output Operator [RS_413]
-                                              Group By Operator [GBY_412] (rows=1 width=8)
+                                            Reduce Output Operator [RS_985]
+                                              Group By Operator [GBY_984] (rows=1 width=8)
                                                 Output:["_col0"],aggregations:["count(_col0)"]
-                                                Select Operator [SEL_410] (rows=1108786976 width=108)
+                                                Select Operator [SEL_983] (rows=1108786976 width=108)
                                                   Output:["_col0"]
-                                                  Select Operator [SEL_409] (rows=158402938 width=135)
+                                                  Select Operator [SEL_981] (rows=158402938 width=135)
                                                     Output:["_col0"]
-                                                    Merge Join Operator [MERGEJOIN_880] (rows=158402938 width=135)
-                                                      Conds:RS_1035._col0=RS_1042._col0(Inner),Output:["_col1"]
+                                                    Merge Join Operator [MERGEJOIN_980] (rows=158402938 width=135)
+                                                      Conds:RS_1197._col0=RS_1204._col0(Inner),Output:["_col1"]
                                                     <-Map 35 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_1042]
+                                                      SHUFFLE [RS_1204]
                                                         PartitionCols:_col0
-                                                         Please refer to the previous Select Operator [SEL_1037]
+                                                         Please refer to the previous Select Operator [SEL_1199]
                                                     <-Map 31 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_1035]
+                                                      SHUFFLE [RS_1197]
                                                         PartitionCols:_col0
-                                                         Please refer to the previous Select Operator [SEL_1032]
+                                                         Please refer to the previous Select Operator [SEL_1194]
                             <-Reducer 30 [CUSTOM_SIMPLE_EDGE] vectorized
-                              PARTITION_ONLY_SHUFFLE [RS_1001]
-                                Select Operator [SEL_1000] (rows=1 width=120)
+                              PARTITION_ONLY_SHUFFLE [RS_1163]
+                                Select Operator [SEL_1162] (rows=1 width=120)
                                   Output:["_col0"]
-                                  Group By Operator [GBY_999] (rows=1 width=120)
+                                  Group By Operator [GBY_1161] (rows=1 width=120)
                                     Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)"]
                                   <-Union 29 [CUSTOM_SIMPLE_EDGE]
                                     <-Reducer 28 [CONTAINS]
-                                      Reduce Output Operator [RS_458]
-                                        Group By Operator [GBY_457] (rows=1 width=120)
+                                      Reduce Output Operator [RS_967]
+                                        Group By Operator [GBY_966] (rows=1 width=120)
                                           Output:["_col0","_col1"],aggregations:["sum(_col0)","count(_col0)"]
-                                          Select Operator [SEL_455] (rows=1108786976 width=108)
+                                          Select Operator [SEL_965] (rows=1108786976 width=108)
                                             Output:["_col0"]
-                                            Select Operator [SEL_443] (rows=316788826 width=135)
+                                            Select Operator [SEL_963] (rows=316788826 width=135)
                                               Output:["_col0","_col1"]
-                                              Merge Join Operator [MERGEJOIN_882] (rows=316788826 width=135)
-                                                Conds:RS_1030._col0=RS_1025._col0(Inner),Output:["_col1","_col2"]
+                                              Merge Join Operator [MERGEJOIN_962] (rows=316788826 width=135)
+                                                Conds:RS_1192._col0=RS_1187._col0(Inner),Output:["_col1","_col2"]
                                               <-Map 21 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_1025]
+                                                SHUFFLE [RS_1187]
                                                   PartitionCols:_col0
-                                                   Please refer to the previous Select Operator [SEL_1019]
+                                                   Please refer to the previous Select Operator [SEL_1181]
                                               <-Map 43 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_1030]
+                                                SHUFFLE [RS_1192]
                                                   PartitionCols:_col0
-                                                   Please refer to the previous Select Operator [SEL_1027]
+                                                   Please refer to the previous Select Operator [SEL_1189]
                                     <-Reducer 38 [CONTAINS]
-                                      Reduce Output Operator [RS_458]
-                                        Group By Operator [GBY_457] (rows=1 width=120)
+                                      Reduce Output Operator [RS_1003]
+                                        Group By Operator [GBY_1002] (rows=1 width=120)
                                           Output:["_col0","_col1"],aggregations:["sum(_col0)","count(_col0)"]
-                                          Select Operator [SEL_455] (rows=1108786976 width=108)
+                                          Select Operator [SEL_1001] (rows=1108786976 width=108)
                                             Output:["_col0"]
-                                            Select Operator [SEL_454] (rows=158402938 width=135)
+                                            Select Operator [SEL_999] (rows=158402938 width=135)
                                               Output:["_col0","_col1"]
-                                              Merge Join Operator [MERGEJOIN_883] (rows=158402938 width=135)
-                                                Conds:RS_1048._col0=RS_1043._col0(Inner),Output:["_col1","_col2"]
+                                              Merge Join Operator [MERGEJOIN_998] (rows=158402938 width=135)
+                                                Conds:RS_1210._col0=RS_1205._col0(Inner),Output:["_col1","_col2"]
                                               <-Map 35 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_1043]
+                                                SHUFFLE [RS_1205]
                                                   PartitionCols:_col0
-                                                   Please refer to the previous Select Operator [SEL_1037]
+                                                   Please refer to the previous Select Operator [SEL_1199]
                                               <-Map 44 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_1048]
+                                                SHUFFLE [RS_1210]
                                                   PartitionCols:_col0
-                                                   Please refer to the previous Select Operator [SEL_1045]
+                                                   Please refer to the previous Select Operator [SEL_1207]
                                     <-Reducer 42 [CONTAINS]
-                                      Reduce Output Operator [RS_458]
-                                        Group By Operator [GBY_457] (rows=1 width=120)
+                                      Reduce Output Operator [RS_1021]
+                                        Group By Operator [GBY_1020] (rows=1 width=120)
                                           Output:["_col0","_col1"],aggregations:["sum(_col0)","count(_col0)"]
-                                          Select Operator [SEL_455] (rows=1108786976 width=108)
+                                          Select Operator [SEL_1019] (rows=1108786976 width=108)
                                             Output:["_col0"]
-                                            Select Operator [SEL_433] (rows=633595212 width=88)
+                                            Select Operator [SEL_1017] (rows=633595212 width=88)
                                               Output:["_col0","_col1"]
-                                              Merge Join Operator [MERGEJOIN_881] (rows=633595212 width=88)
-                                                Conds:RS_1053._col0=RS_911._col0(Inner),Output:["_col1","_col2"]
+                                              Merge Join Operator [MERGEJOIN_1016] (rows=633595212 width=88)
+                                                Conds:RS_1215._col0=RS_1073._col0(Inner),Output:["_col1","_col2"]
                                               <-Map 86 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_911]
+                                                SHUFFLE [RS_1073]
                                                   PartitionCols:_col0
-                                                   Please refer to the previous Select Operator [SEL_902]
+                                                   Please refer to the previous Select Operator [SEL_1064]
                                               <-Map 39 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_1053]
+                                                SHUFFLE [RS_1215]
                                                   PartitionCols:_col0
-                                                   Please refer to the previous Select Operator [SEL_1050]
+                                                   Please refer to the previous Select Operator [SEL_1212]
                             <-Reducer 55 [CUSTOM_SIMPLE_EDGE] vectorized
-                              PARTITION_ONLY_SHUFFLE [RS_1012]
-                                Group By Operator [GBY_1011] (rows=174243235 width=135)
+                              PARTITION_ONLY_SHUFFLE [RS_1174]
+                                Group By Operator [GBY_1173] (rows=174243235 width=135)
                                   Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2
                                 <-Reducer 54 [SIMPLE_EDGE]
                                   SHUFFLE [RS_559]
@@ -819,37 +819,37 @@ Stage-0
                                       Select Operator [SEL_556] (rows=348486471 width=135)
                                         Output:["_col0","_col1","_col2","_col3"]
                                         Merge Join Operator [MERGEJOIN_892] (rows=348486471 width=135)
-                                          Conds:RS_552._col1=RS_958._col0(Inner),RS_552._col1=RS_1010._col0(Inner),Output:["_col2","_col3","_col8","_col9","_col10"]
+                                          Conds:RS_552._col1=RS_1120._col0(Inner),RS_552._col1=RS_1172._col0(Inner),Output:["_col2","_col3","_col8","_col9","_col10"]
                                         <-Map 56 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_958]
+                                          SHUFFLE [RS_1120]
                                             PartitionCols:_col0
-                                            Select Operator [SEL_946] (rows=462000 width=1436)
+                                            Select Operator [SEL_1108] (rows=462000 width=1436)
                                               Output:["_col0","_col1","_col2","_col3"]
-                                              Filter Operator [FIL_937] (rows=462000 width=1436)
+                                              Filter Operator [FIL_1099] (rows=462000 width=1436)
                                                 predicate:i_item_sk is not null
                                                  Please refer to the previous TableScan [TS_91]
                                         <-Reducer 53 [SIMPLE_EDGE]
                                           SHUFFLE [RS_552]
                                             PartitionCols:_col1
                                             Merge Join Operator [MERGEJOIN_884] (rows=158402938 width=135)
-                                              Conds:RS_1004._col0=RS_928._col0(Inner),Output:["_col1","_col2","_col3"]
+                                              Conds:RS_1166._col0=RS_1090._col0(Inner),Output:["_col1","_col2","_col3"]
                                             <-Map 49 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_928]
+                                              SHUFFLE [RS_1090]
                                                 PartitionCols:_col0
-                                                 Please refer to the previous Select Operator [SEL_925]
+                                                 Please refer to the previous Select Operator [SEL_1087]
                                             <-Map 92 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_1004]
+                                              SHUFFLE [RS_1166]
                                                 PartitionCols:_col0
-                                                Select Operator [SEL_1003] (rows=144002668 width=135)
+                                                Select Operator [SEL_1165] (rows=144002668 width=135)
                                                   Output:["_col0","_col1","_col2","_col3"]
-                                                  Filter Operator [FIL_1002] (rows=144002668 width=135)
+                                                  Filter Operator [FIL_1164] (rows=144002668 width=135)
                                                     predicate:(ws_item_sk is not null and ws_sold_date_sk is not null)
                                                     TableScan [TS_461] (rows=144002668 width=135)
                                                       default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_quantity","ws_list_price"]
                                         <-Reducer 77 [ONE_TO_ONE_EDGE] vectorized
-                                          FORWARD [RS_1010]
+                                          FORWARD [RS_1172]
                                             PartitionCols:_col0
-                                            Group By Operator [GBY_1009] (rows=254100 width=1436)
+                                            Group By Operator [GBY_1171] (rows=254100 width=1436)
                                               Output:["_col0"],keys:KEY._col0
                                             <-Reducer 76 [SIMPLE_EDGE]
                                               SHUFFLE [RS_546]
@@ -857,198 +857,198 @@ Stage-0
                                                 Group By Operator [GBY_545] (rows=508200 width=1436)
                                                   Output:["_col0"],keys:_col0
                                                   Merge Join Operator [MERGEJOIN_891] (rows=508200 width=1436)
-                                                    Conds:RS_957._col1, _col2, _col3=RS_1008._col0, _col1, _col2(Inner),Output:["_col0"]
+                                                    Conds:RS_1119._col1, _col2, _col3=RS_1170._col0, _col1, _col2(Inner),Output:["_col0"]
                                                   <-Map 56 [SIMPLE_EDGE] vectorized
-                                                    SHUFFLE [RS_957]
+                                                    SHUFFLE [RS_1119]
                                                       PartitionCols:_col1, _col2, _col3
-                                                      Select Operator [SEL_945] (rows=462000 width=1436)
+                                                      Select Operator [SEL_1107] (rows=462000 width=1436)
                                                         Output:["_col0","_col1","_col2","_col3"]
-                                                        Filter Operator [FIL_936] (rows=462000 width=1436)
+                                                        Filter Operator [FIL_1098] (rows=462000 width=1436)
                                                           predicate:(i_brand_id is not null and i_category_id is not null and i_class_id is not null and i_item_sk is not null)
                                                            Please refer to the previous TableScan [TS_91]
                                                   <-Reducer 75 [ONE_TO_ONE_EDGE] vectorized
-                                                    FORWARD [RS_1008]
+                                                    FORWARD [RS_1170]
                                                       PartitionCols:_col0, _col1, _col2
-                                                      Select Operator [SEL_1007] (rows=1 width=108)
+                                                      Select Operator [SEL_1169] (rows=1 width=108)
                                                         Output:["_col0","_col1","_col2"]
-                                                        Filter Operator [FIL_1006] (rows=1 width=108)
+                                                        Filter Operator [FIL_1168] (rows=1 width=108)
                                                           predicate:(_col3 = 3L)
-                                                          Group By Operator [GBY_1005] (rows=304916424 width=108)
+                                                          Group By Operator [GBY_1167] (rows=304916424 width=108)
                                                             Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                           <-Union 74 [SIMPLE_EDGE]
                                                             <-Reducer 73 [CONTAINS] vectorized
-                                                              Reduce Output Operator [RS_1077]
+                                                              Reduce Output Operator [RS_1239]
                                                                 PartitionCols:_col0, _col1, _col2
-                                                                Group By Operator [GBY_1076] (rows=609832849 width=108)
+                                                                Group By Operator [GBY_1238] (rows=609832849 width=108)
                                                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1075] (rows=348477374 width=88)
+                                                                  Group By Operator [GBY_1237] (rows=348477374 width=88)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                   <-Reducer 69 [SIMPLE_EDGE]
                                                                     SHUFFLE [RS_490]
                                                                       PartitionCols:_col0, _col1, _col2
                                                                        Please refer to the previous Group By Operator [GBY_299]
                                                             <-Reducer 80 [CONTAINS] vectorized
-                                                              Reduce Output Operator [RS_1083]
+                                                              Reduce Output Operator [RS_1245]
                                                                 PartitionCols:_col0, _col1, _col2
-                                                                Group By Operator [GBY_1082] (rows=609832849 width=108)
+                                                                Group By Operator [GBY_1244] (rows=609832849 width=108)
                                                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1081] (rows=174233858 width=135)
+                                                                  Group By Operator [GBY_1243] (rows=174233858 width=135)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                   <-Reducer 78 [SIMPLE_EDGE]
                                                                     SHUFFLE [RS_510]
                                                                       PartitionCols:_col0, _col1, _col2
                                                                        Please refer to the previous Group By Operator [GBY_319]
                                                             <-Reducer 83 [CONTAINS] vectorized
-                                                              Reduce Output Operator [RS_1089]
+                                                              Reduce Output Operator [RS_1251]
                                                                 PartitionCols:_col0, _col1, _col2
-                                                                Group By Operator [GBY_1088] (rows=609832849 width=108)
+                                                                Group By Operator [GBY_1250] (rows=609832849 width=108)
                                                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1087] (rows=87121617 width=135)
+                                                                  Group By Operator [GBY_1249] (rows=87121617 width=135)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                   <-Reducer 81 [SIMPLE_EDGE]
                                                                     SHUFFLE [RS_531]
                                                                       PartitionCols:_col0, _col1, _col2
                                                                        Please refer to the previous Group By Operator [GBY_340]
                   <-Reducer 5 [CONTAINS]
-                    Reduce Output Operator [RS_571]
+                    Reduce Output Operator [RS_907]
                       PartitionCols:_col0, _col1, _col2, _col3, _col4
-                      Group By Operator [GBY_570] (rows=2032776160 width=237)
+                      Group By Operator [GBY_906] (rows=2032776160 width=237)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col4)","sum(_col5)"],keys:_col0, _col1, _col2, _col3, 0L
-                        Select Operator [SEL_188] (rows=232318249 width=217)
+                        Select Operator [SEL_904] (rows=232318249 width=217)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                          Filter Operator [FIL_187] (rows=232318249 width=217)
+                          Filter Operator [FIL_903] (rows=232318249 width=217)
                             predicate:(_col5 > _col1)
-                            Merge Join Operator [MERGEJOIN_893] (rows=696954748 width=217)
+                            Merge Join Operator [MERGEJOIN_902] (rows=696954748 width=217)
                               Conds:(Inner),(Inner),Output:["_col1","_col2","_col3","_col4","_col5","_col6"]
                             <-Reducer 24 [CUSTOM_SIMPLE_EDGE] vectorized
-                              PARTITION_ONLY_SHUFFLE [RS_920]
-                                Select Operator [SEL_919] (rows=1 width=120)
+                              PARTITION_ONLY_SHUFFLE [RS_1082]
+                                Select Operator [SEL_1081] (rows=1 width=120)
                                   Output:["_col0"]
-                                  Group By Operator [GBY_918] (rows=1 width=120)
+                                  Group By Operator [GBY_1080] (rows=1 width=120)
                                     Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)"]
                                   <-Union 23 [CUSTOM_SIMPLE_EDGE]
                                     <-Reducer 22 [CONTAINS]
-                                      Reduce Output Operator [RS_79]
-                                        Group By Operator [GBY_78] (rows=1 width=120)
+                                      Reduce Output Operator [RS_955]
+                                        Group By Operator [GBY_954] (rows=1 width=120)
                                           Output:["_col0","_col1"],aggregations:["sum(_col0)","count(_col0)"]
-                                          Select Operator [SEL_76] (rows=1108786976 width=108)
+                                          Select Operator [SEL_953] (rows=11

<TRUNCATED>

[02/14] hive git commit: HIVE-19237: Only use an operatorId once in a plan (Zoltan Haindrich reviewed by Ashutosh Chauhan)

Posted by kg...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query8.q.out b/ql/src/test/results/clientpositive/perf/tez/query8.q.out
index fef9ae9..e0742f2 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query8.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query8.q.out
@@ -231,14 +231,14 @@ Stage-0
     limit:100
     Stage-1
       Reducer 5 vectorized
-      File Output Operator [FS_107]
-        Limit [LIM_106] (rows=100 width=88)
+      File Output Operator [FS_115]
+        Limit [LIM_114] (rows=100 width=88)
           Number of rows:100
-          Select Operator [SEL_105] (rows=348477374 width=88)
+          Select Operator [SEL_113] (rows=348477374 width=88)
             Output:["_col0","_col1"]
           <-Reducer 4 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_104]
-              Group By Operator [GBY_103] (rows=348477374 width=88)
+            SHUFFLE [RS_112]
+              Group By Operator [GBY_111] (rows=348477374 width=88)
                 Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
               <-Reducer 3 [SIMPLE_EDGE]
                 SHUFFLE [RS_57]
@@ -251,43 +251,43 @@ Stage-0
                       SHUFFLE [RS_53]
                         PartitionCols:_col1
                         Merge Join Operator [MERGEJOIN_88] (rows=1874 width=1911)
-                          Conds:RS_99.substr(_col0, 1, 2)=RS_102.substr(_col2, 1, 2)(Inner),Output:["_col1","_col2"]
+                          Conds:RS_107.substr(_col0, 1, 2)=RS_110.substr(_col2, 1, 2)(Inner),Output:["_col1","_col2"]
                         <-Map 17 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_102]
+                          SHUFFLE [RS_110]
                             PartitionCols:substr(_col2, 1, 2)
-                            Select Operator [SEL_101] (rows=1704 width=1910)
+                            Select Operator [SEL_109] (rows=1704 width=1910)
                               Output:["_col0","_col1","_col2"]
-                              Filter Operator [FIL_100] (rows=1704 width=1910)
+                              Filter Operator [FIL_108] (rows=1704 width=1910)
                                 predicate:(s_store_sk is not null and substr(s_zip, 1, 2) is not null)
                                 TableScan [TS_42] (rows=1704 width=1910)
                                   default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_store_name","s_zip"]
                         <-Reducer 10 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_99]
+                          SHUFFLE [RS_107]
                             PartitionCols:substr(_col0, 1, 2)
-                            Select Operator [SEL_98] (rows=1 width=1014)
+                            Select Operator [SEL_106] (rows=1 width=1014)
                               Output:["_col0"]
-                              Filter Operator [FIL_97] (rows=1 width=1014)
+                              Filter Operator [FIL_105] (rows=1 width=1014)
                                 predicate:(_col1 = 2L)
-                                Group By Operator [GBY_96] (rows=6833333 width=1014)
+                                Group By Operator [GBY_104] (rows=6833333 width=1014)
                                   Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
                                 <-Union 9 [SIMPLE_EDGE]
                                   <-Reducer 15 [CONTAINS] vectorized
-                                    Reduce Output Operator [RS_128]
+                                    Reduce Output Operator [RS_136]
                                       PartitionCols:_col0
-                                      Group By Operator [GBY_127] (rows=13666666 width=1014)
+                                      Group By Operator [GBY_135] (rows=13666666 width=1014)
                                         Output:["_col0","_col1"],aggregations:["count(_col1)"],keys:_col0
-                                        Group By Operator [GBY_126] (rows=3666666 width=1014)
+                                        Group By Operator [GBY_134] (rows=3666666 width=1014)
                                           Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
                                         <-Reducer 14 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_125]
+                                          SHUFFLE [RS_133]
                                             PartitionCols:_col0
-                                            Group By Operator [GBY_124] (rows=7333333 width=1014)
+                                            Group By Operator [GBY_132] (rows=7333333 width=1014)
                                               Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
-                                              Select Operator [SEL_123] (rows=7333333 width=1014)
+                                              Select Operator [SEL_131] (rows=7333333 width=1014)
                                                 Output:["_col0"]
-                                                Filter Operator [FIL_122] (rows=7333333 width=1014)
+                                                Filter Operator [FIL_130] (rows=7333333 width=1014)
                                                   predicate:(_col1 > 10L)
-                                                  Group By Operator [GBY_121] (rows=22000000 width=1014)
+                                                  Group By Operator [GBY_129] (rows=22000000 width=1014)
                                                     Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
                                                   <-Reducer 13 [SIMPLE_EDGE]
                                                     SHUFFLE [RS_25]
@@ -295,40 +295,40 @@ Stage-0
                                                       Group By Operator [GBY_24] (rows=44000000 width=1014)
                                                         Output:["_col0","_col1"],aggregations:["count()"],keys:_col1
                                                         Merge Join Operator [MERGEJOIN_87] (rows=44000000 width=1014)
-                                                          Conds:RS_117._col0=RS_120._col0(Inner),Output:["_col1"]
+                                                          Conds:RS_125._col0=RS_128._col0(Inner),Output:["_col1"]
                                                         <-Map 12 [SIMPLE_EDGE] vectorized
-                                                          SHUFFLE [RS_117]
+                                                          SHUFFLE [RS_125]
                                                             PartitionCols:_col0
-                                                            Select Operator [SEL_116] (rows=40000000 width=1014)
+                                                            Select Operator [SEL_124] (rows=40000000 width=1014)
                                                               Output:["_col0","_col1"]
-                                                              Filter Operator [FIL_115] (rows=40000000 width=1014)
+                                                              Filter Operator [FIL_123] (rows=40000000 width=1014)
                                                                 predicate:(ca_address_sk is not null and substr(substr(ca_zip, 1, 5), 1, 2) is not null)
                                                                 TableScan [TS_14] (rows=40000000 width=1014)
                                                                   default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_zip"]
                                                         <-Map 16 [SIMPLE_EDGE] vectorized
-                                                          SHUFFLE [RS_120]
+                                                          SHUFFLE [RS_128]
                                                             PartitionCols:_col0
-                                                            Select Operator [SEL_119] (rows=40000000 width=860)
+                                                            Select Operator [SEL_127] (rows=40000000 width=860)
                                                               Output:["_col0"]
-                                                              Filter Operator [FIL_118] (rows=40000000 width=860)
+                                                              Filter Operator [FIL_126] (rows=40000000 width=860)
                                                                 predicate:((c_preferred_cust_flag = 'Y') and c_current_addr_sk is not null)
                                                                 TableScan [TS_17] (rows=80000000 width=860)
                                                                   default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_current_addr_sk","c_preferred_cust_flag"]
                                   <-Reducer 8 [CONTAINS] vectorized
-                                    Reduce Output Operator [RS_114]
+                                    Reduce Output Operator [RS_122]
                                       PartitionCols:_col0
-                                      Group By Operator [GBY_113] (rows=13666666 width=1014)
+                                      Group By Operator [GBY_121] (rows=13666666 width=1014)
                                         Output:["_col0","_col1"],aggregations:["count(_col1)"],keys:_col0
-                                        Group By Operator [GBY_112] (rows=10000000 width=1014)
+                                        Group By Operator [GBY_120] (rows=10000000 width=1014)
                                           Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
                                         <-Map 7 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_111]
+                                          SHUFFLE [RS_119]
                                             PartitionCols:_col0
-                                            Group By Operator [GBY_110] (rows=20000000 width=1014)
+                                            Group By Operator [GBY_118] (rows=20000000 width=1014)
                                               Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
-                                              Select Operator [SEL_109] (rows=20000000 width=1014)
+                                              Select Operator [SEL_117] (rows=20000000 width=1014)
                                                 Output:["_col0"]
-                                                Filter Operator [FIL_108] (rows=20000000 width=1014)
+                                                Filter Operator [FIL_116] (rows=20000000 width=1014)
                                                   predicate:((substr(ca_zip, 1, 5)) IN ('89436', '30868', '65085', '22977', '83927', '77557', '58429', '40697', '80614', '10502', '32779', '91137', '61265', '98294', '17921', '18427', '21203', '59362', '87291', '84093', '21505', '17184', '10866', '67898', '25797', '28055', '18377', '80332', '74535', '21757', '29742', '90885', '29898', '17819', '40811', '25990', '47513', '89531', '91068', '10391', '18846', '99223', '82637', '41368', '83658', '86199', '81625', '26696', '89338', '88425', '32200', '81427', '19053', '77471', '36610', '99823', '43276', '41249', '48584', '83550', '82276', '18842', '78890', '14090', '38123', '40936', '34425', '19850', '43286', '80072', '79188', '54191', '11395', '50497', '84861', '90733', '21068', '57666', '37119', '25004', '57835', '70067', '62878', '95806', '19303', '18840', '19124', '29785', '16737', '16022', '49613', '89977', '68310', '60069', '98360', '48649', '39050', '41793', '25002', '27413', '39736', 
 '47208', '16515', '94808', '57648', '15009', '80015', '42961', '63982', '21744', '71853', '81087', '67468', '34175', '64008', '20261', '11201', '51799', '48043', '45645', '61163', '48375', '36447', '57042', '21218', '41100', '89951', '22745', '35851', '83326', '61125', '78298', '80752', '49858', '52940', '96976', '63792', '11376', '53582', '18717', '90226', '50530', '94203', '99447', '27670', '96577', '57856', '56372', '16165', '23427', '54561', '28806', '44439', '22926', '30123', '61451', '92397', '56979', '92309', '70873', '13355', '21801', '46346', '37562', '56458', '28286', '47306', '99555', '69399', '26234', '47546', '49661', '88601', '35943', '39936', '25632', '24611', '44166', '56648', '30379', '59785', '11110', '14329', '93815', '52226', '71381', '13842', '25612', '63294', '14664', '21077', '82626', '18799', '60915', '81020', '56447', '76619', '11433', '13414', '42548', '92713', '70467', '30884', '47484', '16072', '38936', '13036', '88376', '45539', '35901', '19506', '65690'
 , '73957', '71850', '49231', '14276', '20005', '18384', '76615', '11635', '38177', '55607', '41369', '95447', '58581', '58149', '91946', '33790', '76232', '75692', '95464', '22246', '51061', '56692', '53121', '77209', '15482', '10688', '14868', '45907', '73520', '72666', '25734', '17959', '24677', '66446', '94627', '53535', '15560', '41967', '69297', '11929', '59403', '33283', '52232', '57350', '43933', '40921', '36635', '10827', '71286', '19736', '80619', '25251', '95042', '15526', '36496', '55854', '49124', '81980', '35375', '49157', '63512', '28944', '14946', '36503', '54010', '18767', '23969', '43905', '66979', '33113', '21286', '58471', '59080', '13395', '79144', '70373', '67031', '38360', '26705', '50906', '52406', '26066', '73146', '15884', '31897', '30045', '61068', '45550', '92454', '13376', '14354', '19770', '22928', '97790', '50723', '46081', '30202', '14410', '20223', '88500', '67298', '13261', '14172', '81410', '93578', '83583', '46047', '94167', '82564', '21156', '1579
 9', '86709', '37931', '74703', '83103', '23054', '70470', '72008', '49247', '91911', '69998', '20961', '70070', '63197', '54853', '88191', '91830', '49521', '19454', '81450', '89091', '62378', '25683', '61869', '51744', '36580', '85778', '36871', '48121', '28810', '83712', '45486', '67393', '26935', '42393', '20132', '55349', '86057', '21309', '80218', '10094', '11357', '48819', '39734', '40758', '30432', '21204', '29467', '30214', '61024', '55307', '74621', '11622', '68908', '33032', '52868', '99194', '99900', '84936', '69036', '99149', '45013', '32895', '59004', '32322', '14933', '32936', '33562', '72550', '27385', '58049', '58200', '16808', '21360', '32961', '18586', '79307', '15492') and substr(substr(ca_zip, 1, 5), 1, 2) is not null)
                                                   TableScan [TS_6] (rows=40000000 width=1014)
                                                     default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_zip"]
@@ -336,22 +336,22 @@ Stage-0
                       SHUFFLE [RS_52]
                         PartitionCols:_col1
                         Merge Join Operator [MERGEJOIN_86] (rows=633595212 width=88)
-                          Conds:RS_92._col0=RS_95._col0(Inner),Output:["_col1","_col2"]
+                          Conds:RS_100._col0=RS_103._col0(Inner),Output:["_col1","_col2"]
                         <-Map 1 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_92]
+                          SHUFFLE [RS_100]
                             PartitionCols:_col0
-                            Select Operator [SEL_91] (rows=575995635 width=88)
+                            Select Operator [SEL_99] (rows=575995635 width=88)
                               Output:["_col0","_col1","_col2"]
-                              Filter Operator [FIL_90] (rows=575995635 width=88)
+                              Filter Operator [FIL_98] (rows=575995635 width=88)
                                 predicate:(ss_sold_date_sk is not null and ss_store_sk is not null)
                                 TableScan [TS_0] (rows=575995635 width=88)
                                   default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_store_sk","ss_net_profit"]
                         <-Map 6 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_95]
+                          SHUFFLE [RS_103]
                             PartitionCols:_col0
-                            Select Operator [SEL_94] (rows=18262 width=1119)
+                            Select Operator [SEL_102] (rows=18262 width=1119)
                               Output:["_col0"]
-                              Filter Operator [FIL_93] (rows=18262 width=1119)
+                              Filter Operator [FIL_101] (rows=18262 width=1119)
                                 predicate:((d_qoy = 1) and (d_year = 2002) and d_date_sk is not null)
                                 TableScan [TS_3] (rows=73049 width=1119)
                                   default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"]

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query80.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query80.q.out b/ql/src/test/results/clientpositive/perf/tez/query80.q.out
index 69f4770..6309900 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query80.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query80.q.out
@@ -217,26 +217,26 @@ Stage-0
     limit:100
     Stage-1
       Reducer 10 vectorized
-      File Output Operator [FS_251]
-        Limit [LIM_250] (rows=100 width=108)
+      File Output Operator [FS_266]
+        Limit [LIM_265] (rows=100 width=108)
           Number of rows:100
-          Select Operator [SEL_249] (rows=1217531358 width=108)
+          Select Operator [SEL_264] (rows=1217531358 width=108)
             Output:["_col0","_col1","_col2","_col3","_col4"]
           <-Reducer 9 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_248]
-              Select Operator [SEL_247] (rows=1217531358 width=108)
+            SHUFFLE [RS_263]
+              Select Operator [SEL_262] (rows=1217531358 width=108)
                 Output:["_col0","_col1","_col2","_col3","_col4"]
-                Group By Operator [GBY_246] (rows=1217531358 width=108)
+                Group By Operator [GBY_261] (rows=1217531358 width=108)
                   Output:["_col0","_col1","_col3","_col4","_col5"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2
                 <-Union 8 [SIMPLE_EDGE]
                   <-Reducer 17 [CONTAINS] vectorized
-                    Reduce Output Operator [RS_264]
+                    Reduce Output Operator [RS_279]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_263] (rows=2435062716 width=108)
+                      Group By Operator [GBY_278] (rows=2435062716 width=108)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Select Operator [SEL_262] (rows=231905279 width=135)
+                        Select Operator [SEL_277] (rows=231905279 width=135)
                           Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Group By Operator [GBY_261] (rows=231905279 width=135)
+                          Group By Operator [GBY_276] (rows=231905279 width=135)
                             Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0
                           <-Reducer 16 [SIMPLE_EDGE]
                             SHUFFLE [RS_75]
@@ -246,13 +246,13 @@ Stage-0
                                 Select Operator [SEL_72] (rows=463810558 width=135)
                                   Output:["_col0","_col1","_col2","_col3"]
                                   Merge Join Operator [MERGEJOIN_212] (rows=463810558 width=135)
-                                    Conds:RS_69._col1=RS_260._col0(Inner),Output:["_col5","_col6","_col9","_col10","_col18"]
+                                    Conds:RS_69._col1=RS_275._col0(Inner),Output:["_col5","_col6","_col9","_col10","_col18"]
                                   <-Map 29 [SIMPLE_EDGE] vectorized
-                                    SHUFFLE [RS_260]
+                                    SHUFFLE [RS_275]
                                       PartitionCols:_col0
-                                      Select Operator [SEL_259] (rows=46000 width=460)
+                                      Select Operator [SEL_274] (rows=46000 width=460)
                                         Output:["_col0","_col1"]
-                                        Filter Operator [FIL_258] (rows=46000 width=460)
+                                        Filter Operator [FIL_273] (rows=46000 width=460)
                                           predicate:cp_catalog_page_sk is not null
                                           TableScan [TS_54] (rows=46000 width=460)
                                             default@catalog_page,catalog_page,Tbl:COMPLETE,Col:NONE,Output:["cp_catalog_page_sk","cp_catalog_page_id"]
@@ -260,13 +260,13 @@ Stage-0
                                     SHUFFLE [RS_69]
                                       PartitionCols:_col1
                                       Merge Join Operator [MERGEJOIN_211] (rows=421645953 width=135)
-                                        Conds:RS_66._col3=RS_237._col0(Inner),Output:["_col1","_col5","_col6","_col9","_col10"]
+                                        Conds:RS_66._col3=RS_252._col0(Inner),Output:["_col1","_col5","_col6","_col9","_col10"]
                                       <-Map 24 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_237]
+                                        SHUFFLE [RS_252]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_235] (rows=1150 width=1179)
+                                          Select Operator [SEL_250] (rows=1150 width=1179)
                                             Output:["_col0"]
-                                            Filter Operator [FIL_234] (rows=1150 width=1179)
+                                            Filter Operator [FIL_249] (rows=1150 width=1179)
                                               predicate:((p_channel_tv = 'N') and p_promo_sk is not null)
                                               TableScan [TS_12] (rows=2300 width=1179)
                                                 default@promotion,promotion,Tbl:COMPLETE,Col:NONE,Output:["p_promo_sk","p_channel_tv"]
@@ -274,13 +274,13 @@ Stage-0
                                         SHUFFLE [RS_66]
                                           PartitionCols:_col3
                                           Merge Join Operator [MERGEJOIN_210] (rows=383314495 width=135)
-                                            Conds:RS_63._col2=RS_232._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col9","_col10"]
+                                            Conds:RS_63._col2=RS_247._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col9","_col10"]
                                           <-Map 23 [SIMPLE_EDGE] vectorized
-                                            SHUFFLE [RS_232]
+                                            SHUFFLE [RS_247]
                                               PartitionCols:_col0
-                                              Select Operator [SEL_230] (rows=154000 width=1436)
+                                              Select Operator [SEL_245] (rows=154000 width=1436)
                                                 Output:["_col0"]
-                                                Filter Operator [FIL_229] (rows=154000 width=1436)
+                                                Filter Operator [FIL_244] (rows=154000 width=1436)
                                                   predicate:((i_current_price > 50) and i_item_sk is not null)
                                                   TableScan [TS_9] (rows=462000 width=1436)
                                                     default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_current_price"]
@@ -288,13 +288,13 @@ Stage-0
                                             SHUFFLE [RS_63]
                                               PartitionCols:_col2
                                               Merge Join Operator [MERGEJOIN_209] (rows=348467716 width=135)
-                                                Conds:RS_60._col0=RS_227._col0(Inner),Output:["_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
+                                                Conds:RS_60._col0=RS_242._col0(Inner),Output:["_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
                                               <-Map 12 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_227]
+                                                SHUFFLE [RS_242]
                                                   PartitionCols:_col0
-                                                  Select Operator [SEL_225] (rows=8116 width=1119)
+                                                  Select Operator [SEL_240] (rows=8116 width=1119)
                                                     Output:["_col0"]
-                                                    Filter Operator [FIL_224] (rows=8116 width=1119)
+                                                    Filter Operator [FIL_239] (rows=8116 width=1119)
                                                       predicate:(CAST( d_date AS TIMESTAMP) BETWEEN TIMESTAMP'1998-08-04 00:00:00.0' AND TIMESTAMP'1998-09-03 00:00:00.0' and d_date_sk is not null)
                                                       TableScan [TS_6] (rows=73049 width=1119)
                                                         default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"]
@@ -302,33 +302,33 @@ Stage-0
                                                 SHUFFLE [RS_60]
                                                   PartitionCols:_col0
                                                   Merge Join Operator [MERGEJOIN_208] (rows=316788826 width=135)
-                                                    Conds:RS_254._col2, _col4=RS_257._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
+                                                    Conds:RS_269._col2, _col4=RS_272._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
                                                   <-Map 26 [SIMPLE_EDGE] vectorized
-                                                    SHUFFLE [RS_254]
+                                                    SHUFFLE [RS_269]
                                                       PartitionCols:_col2, _col4
-                                                      Select Operator [SEL_253] (rows=287989836 width=135)
+                                                      Select Operator [SEL_268] (rows=287989836 width=135)
                                                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                                        Filter Operator [FIL_252] (rows=287989836 width=135)
+                                                        Filter Operator [FIL_267] (rows=287989836 width=135)
                                                           predicate:(cs_catalog_page_sk is not null and cs_item_sk is not null and cs_promo_sk is not null and cs_sold_date_sk is not null)
                                                           TableScan [TS_39] (rows=287989836 width=135)
                                                             default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_catalog_page_sk","cs_item_sk","cs_promo_sk","cs_order_number","cs_ext_sales_price","cs_net_profit"]
                                                   <-Map 28 [SIMPLE_EDGE] vectorized
-                                                    SHUFFLE [RS_257]
+                                                    SHUFFLE [RS_272]
                                                       PartitionCols:_col0, _col1
-                                                      Select Operator [SEL_256] (rows=28798881 width=106)
+                                                      Select Operator [SEL_271] (rows=28798881 width=106)
                                                         Output:["_col0","_col1","_col2","_col3"]
-                                                        Filter Operator [FIL_255] (rows=28798881 width=106)
+                                                        Filter Operator [FIL_270] (rows=28798881 width=106)
                                                           predicate:cr_item_sk is not null
                                                           TableScan [TS_42] (rows=28798881 width=106)
                                                             default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:NONE,Output:["cr_item_sk","cr_order_number","cr_return_amount","cr_net_loss"]
                   <-Reducer 22 [CONTAINS] vectorized
-                    Reduce Output Operator [RS_277]
+                    Reduce Output Operator [RS_292]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_276] (rows=2435062716 width=108)
+                      Group By Operator [GBY_291] (rows=2435062716 width=108)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Select Operator [SEL_275] (rows=115958879 width=135)
+                        Select Operator [SEL_290] (rows=115958879 width=135)
                           Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Group By Operator [GBY_274] (rows=115958879 width=135)
+                          Group By Operator [GBY_289] (rows=115958879 width=135)
                             Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0
                           <-Reducer 21 [SIMPLE_EDGE]
                             SHUFFLE [RS_115]
@@ -338,13 +338,13 @@ Stage-0
                                 Select Operator [SEL_112] (rows=231917759 width=135)
                                   Output:["_col0","_col1","_col2","_col3"]
                                   Merge Join Operator [MERGEJOIN_217] (rows=231917759 width=135)
-                                    Conds:RS_109._col2=RS_273._col0(Inner),Output:["_col5","_col6","_col9","_col10","_col18"]
+                                    Conds:RS_109._col2=RS_288._col0(Inner),Output:["_col5","_col6","_col9","_col10","_col18"]
                                   <-Map 33 [SIMPLE_EDGE] vectorized
-                                    SHUFFLE [RS_273]
+                                    SHUFFLE [RS_288]
                                       PartitionCols:_col0
-                                      Select Operator [SEL_272] (rows=84 width=1850)
+                                      Select Operator [SEL_287] (rows=84 width=1850)
                                         Output:["_col0","_col1"]
-                                        Filter Operator [FIL_271] (rows=84 width=1850)
+                                        Filter Operator [FIL_286] (rows=84 width=1850)
                                           predicate:web_site_sk is not null
                                           TableScan [TS_94] (rows=84 width=1850)
                                             default@web_site,web_site,Tbl:COMPLETE,Col:NONE,Output:["web_site_sk","web_site_id"]
@@ -352,60 +352,60 @@ Stage-0
                                     SHUFFLE [RS_109]
                                       PartitionCols:_col2
                                       Merge Join Operator [MERGEJOIN_216] (rows=210834322 width=135)
-                                        Conds:RS_106._col3=RS_238._col0(Inner),Output:["_col2","_col5","_col6","_col9","_col10"]
+                                        Conds:RS_106._col3=RS_253._col0(Inner),Output:["_col2","_col5","_col6","_col9","_col10"]
                                       <-Map 24 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_238]
+                                        SHUFFLE [RS_253]
                                           PartitionCols:_col0
-                                           Please refer to the previous Select Operator [SEL_235]
+                                           Please refer to the previous Select Operator [SEL_250]
                                       <-Reducer 19 [SIMPLE_EDGE]
                                         SHUFFLE [RS_106]
                                           PartitionCols:_col3
                                           Merge Join Operator [MERGEJOIN_215] (rows=191667562 width=135)
-                                            Conds:RS_103._col1=RS_233._col0(Inner),Output:["_col2","_col3","_col5","_col6","_col9","_col10"]
+                                            Conds:RS_103._col1=RS_248._col0(Inner),Output:["_col2","_col3","_col5","_col6","_col9","_col10"]
                                           <-Map 23 [SIMPLE_EDGE] vectorized
-                                            SHUFFLE [RS_233]
+                                            SHUFFLE [RS_248]
                                               PartitionCols:_col0
-                                               Please refer to the previous Select Operator [SEL_230]
+                                               Please refer to the previous Select Operator [SEL_245]
                                           <-Reducer 18 [SIMPLE_EDGE]
                                             SHUFFLE [RS_103]
                                               PartitionCols:_col1
                                               Merge Join Operator [MERGEJOIN_214] (rows=174243235 width=135)
-                                                Conds:RS_100._col0=RS_228._col0(Inner),Output:["_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
+                                                Conds:RS_100._col0=RS_243._col0(Inner),Output:["_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
                                               <-Map 12 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_228]
+                                                SHUFFLE [RS_243]
                                                   PartitionCols:_col0
-                                                   Please refer to the previous Select Operator [SEL_225]
+                                                   Please refer to the previous Select Operator [SEL_240]
                                               <-Reducer 31 [SIMPLE_EDGE]
                                                 SHUFFLE [RS_100]
                                                   PartitionCols:_col0
                                                   Merge Join Operator [MERGEJOIN_213] (rows=158402938 width=135)
-                                                    Conds:RS_267._col1, _col4=RS_270._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
+                                                    Conds:RS_282._col1, _col4=RS_285._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
                                                   <-Map 30 [SIMPLE_EDGE] vectorized
-                                                    SHUFFLE [RS_267]
+                                                    SHUFFLE [RS_282]
                                                       PartitionCols:_col1, _col4
-                                                      Select Operator [SEL_266] (rows=144002668 width=135)
+                                                      Select Operator [SEL_281] (rows=144002668 width=135)
                                                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                                        Filter Operator [FIL_265] (rows=144002668 width=135)
+                                                        Filter Operator [FIL_280] (rows=144002668 width=135)
                                                           predicate:(ws_item_sk is not null and ws_promo_sk is not null and ws_sold_date_sk is not null and ws_web_site_sk is not null)
                                                           TableScan [TS_79] (rows=144002668 width=135)
                                                             default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_web_site_sk","ws_promo_sk","ws_order_number","ws_ext_sales_price","ws_net_profit"]
                                                   <-Map 32 [SIMPLE_EDGE] vectorized
-                                                    SHUFFLE [RS_270]
+                                                    SHUFFLE [RS_285]
                                                       PartitionCols:_col0, _col1
-                                                      Select Operator [SEL_269] (rows=14398467 width=92)
+                                                      Select Operator [SEL_284] (rows=14398467 width=92)
                                                         Output:["_col0","_col1","_col2","_col3"]
-                                                        Filter Operator [FIL_268] (rows=14398467 width=92)
+                                                        Filter Operator [FIL_283] (rows=14398467 width=92)
                                                           predicate:wr_item_sk is not null
                                                           TableScan [TS_82] (rows=14398467 width=92)
                                                             default@web_returns,web_returns,Tbl:COMPLETE,Col:NONE,Output:["wr_item_sk","wr_order_number","wr_return_amt","wr_net_loss"]
                   <-Reducer 7 [CONTAINS] vectorized
-                    Reduce Output Operator [RS_245]
+                    Reduce Output Operator [RS_260]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_244] (rows=2435062716 width=108)
+                      Group By Operator [GBY_259] (rows=2435062716 width=108)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Select Operator [SEL_243] (rows=463823414 width=88)
+                        Select Operator [SEL_258] (rows=463823414 width=88)
                           Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Group By Operator [GBY_242] (rows=463823414 width=88)
+                          Group By Operator [GBY_257] (rows=463823414 width=88)
                             Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0
                           <-Reducer 6 [SIMPLE_EDGE]
                             SHUFFLE [RS_36]
@@ -415,13 +415,13 @@ Stage-0
                                 Select Operator [SEL_33] (rows=927646829 width=88)
                                   Output:["_col0","_col1","_col2","_col3"]
                                   Merge Join Operator [MERGEJOIN_207] (rows=927646829 width=88)
-                                    Conds:RS_30._col2=RS_241._col0(Inner),Output:["_col5","_col6","_col9","_col10","_col18"]
+                                    Conds:RS_30._col2=RS_256._col0(Inner),Output:["_col5","_col6","_col9","_col10","_col18"]
                                   <-Map 25 [SIMPLE_EDGE] vectorized
-                                    SHUFFLE [RS_241]
+                                    SHUFFLE [RS_256]
                                       PartitionCols:_col0
-                                      Select Operator [SEL_240] (rows=1704 width=1910)
+                                      Select Operator [SEL_255] (rows=1704 width=1910)
                                         Output:["_col0","_col1"]
-                                        Filter Operator [FIL_239] (rows=1704 width=1910)
+                                        Filter Operator [FIL_254] (rows=1704 width=1910)
                                           predicate:s_store_sk is not null
                                           TableScan [TS_15] (rows=1704 width=1910)
                                             default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_store_id"]
@@ -429,49 +429,49 @@ Stage-0
                                     SHUFFLE [RS_30]
                                       PartitionCols:_col2
                                       Merge Join Operator [MERGEJOIN_206] (rows=843315281 width=88)
-                                        Conds:RS_27._col3=RS_236._col0(Inner),Output:["_col2","_col5","_col6","_col9","_col10"]
+                                        Conds:RS_27._col3=RS_251._col0(Inner),Output:["_col2","_col5","_col6","_col9","_col10"]
                                       <-Map 24 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_236]
+                                        SHUFFLE [RS_251]
                                           PartitionCols:_col0
-                                           Please refer to the previous Select Operator [SEL_235]
+                                           Please refer to the previous Select Operator [SEL_250]
                                       <-Reducer 4 [SIMPLE_EDGE]
                                         SHUFFLE [RS_27]
                                           PartitionCols:_col3
                                           Merge Join Operator [MERGEJOIN_205] (rows=766650239 width=88)
-                                            Conds:RS_24._col1=RS_231._col0(Inner),Output:["_col2","_col3","_col5","_col6","_col9","_col10"]
+                                            Conds:RS_24._col1=RS_246._col0(Inner),Output:["_col2","_col3","_col5","_col6","_col9","_col10"]
                                           <-Map 23 [SIMPLE_EDGE] vectorized
-                                            SHUFFLE [RS_231]
+                                            SHUFFLE [RS_246]
                                               PartitionCols:_col0
-                                               Please refer to the previous Select Operator [SEL_230]
+                                               Please refer to the previous Select Operator [SEL_245]
                                           <-Reducer 3 [SIMPLE_EDGE]
                                             SHUFFLE [RS_24]
                                               PartitionCols:_col1
                                               Merge Join Operator [MERGEJOIN_204] (rows=696954748 width=88)
-                                                Conds:RS_21._col0=RS_226._col0(Inner),Output:["_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
+                                                Conds:RS_21._col0=RS_241._col0(Inner),Output:["_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
                                               <-Map 12 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_226]
+                                                SHUFFLE [RS_241]
                                                   PartitionCols:_col0
-                                                   Please refer to the previous Select Operator [SEL_225]
+                                                   Please refer to the previous Select Operator [SEL_240]
                                               <-Reducer 2 [SIMPLE_EDGE]
                                                 SHUFFLE [RS_21]
                                                   PartitionCols:_col0
                                                   Merge Join Operator [MERGEJOIN_203] (rows=633595212 width=88)
-                                                    Conds:RS_220._col1, _col4=RS_223._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
+                                                    Conds:RS_235._col1, _col4=RS_238._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
                                                   <-Map 1 [SIMPLE_EDGE] vectorized
-                                                    SHUFFLE [RS_220]
+                                                    SHUFFLE [RS_235]
                                                       PartitionCols:_col1, _col4
-                                                      Select Operator [SEL_219] (rows=575995635 width=88)
+                                                      Select Operator [SEL_234] (rows=575995635 width=88)
                                                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                                        Filter Operator [FIL_218] (rows=575995635 width=88)
+                                                        Filter Operator [FIL_233] (rows=575995635 width=88)
                                                           predicate:(ss_item_sk is not null and ss_promo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null)
                                                           TableScan [TS_0] (rows=575995635 width=88)
                                                             default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_store_sk","ss_promo_sk","ss_ticket_number","ss_ext_sales_price","ss_net_profit"]
                                                   <-Map 11 [SIMPLE_EDGE] vectorized
-                                                    SHUFFLE [RS_223]
+                                                    SHUFFLE [RS_238]
                                                       PartitionCols:_col0, _col1
-                                                      Select Operator [SEL_222] (rows=57591150 width=77)
+                                                      Select Operator [SEL_237] (rows=57591150 width=77)
                                                         Output:["_col0","_col1","_col2","_col3"]
-                                                        Filter Operator [FIL_221] (rows=57591150 width=77)
+                                                        Filter Operator [FIL_236] (rows=57591150 width=77)
                                                           predicate:sr_item_sk is not null
                                                           TableScan [TS_3] (rows=57591150 width=77)
                                                             default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_item_sk","sr_ticket_number","sr_return_amt","sr_net_loss"]

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query87.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query87.q.out b/ql/src/test/results/clientpositive/perf/tez/query87.q.out
index 4171097..2a0f0f2 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query87.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query87.q.out
@@ -61,35 +61,35 @@ Stage-0
     limit:-1
     Stage-1
       Reducer 9 vectorized
-      File Output Operator [FS_168]
-        Group By Operator [GBY_167] (rows=1 width=24)
+      File Output Operator [FS_201]
+        Group By Operator [GBY_200] (rows=1 width=24)
           Output:["_col0"],aggregations:["count(VALUE._col0)"]
         <-Reducer 8 [CUSTOM_SIMPLE_EDGE] vectorized
-          PARTITION_ONLY_SHUFFLE [RS_166]
-            Group By Operator [GBY_165] (rows=1 width=24)
+          PARTITION_ONLY_SHUFFLE [RS_199]
+            Group By Operator [GBY_198] (rows=1 width=24)
               Output:["_col0"],aggregations:["count()"]
-              Select Operator [SEL_164] (rows=4537552 width=129)
-                Filter Operator [FIL_163] (rows=4537552 width=129)
+              Select Operator [SEL_197] (rows=4537552 width=129)
+                Filter Operator [FIL_196] (rows=4537552 width=129)
                   predicate:(((_col3 * 2) = _col4) and (_col3 > 0L))
-                  Select Operator [SEL_162] (rows=27225312 width=129)
+                  Select Operator [SEL_195] (rows=27225312 width=129)
                     Output:["_col3","_col4"]
-                    Group By Operator [GBY_161] (rows=27225312 width=129)
+                    Group By Operator [GBY_194] (rows=27225312 width=129)
                       Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2
                     <-Union 7 [SIMPLE_EDGE]
                       <-Reducer 16 [CONTAINS] vectorized
-                        Reduce Output Operator [RS_188]
+                        Reduce Output Operator [RS_221]
                           PartitionCols:_col0, _col1, _col2
-                          Group By Operator [GBY_187] (rows=54450625 width=129)
+                          Group By Operator [GBY_220] (rows=54450625 width=129)
                             Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col3)","sum(_col4)"],keys:_col0, _col1, _col2
-                            Select Operator [SEL_186] (rows=54450625 width=129)
+                            Select Operator [SEL_219] (rows=54450625 width=129)
                               Output:["_col0","_col1","_col2","_col3","_col4"]
-                              Select Operator [SEL_185] (rows=43560808 width=135)
+                              Select Operator [SEL_218] (rows=43560808 width=135)
                                 Output:["_col0","_col1","_col2","_col3","_col4"]
-                                Group By Operator [GBY_184] (rows=43560808 width=135)
+                                Group By Operator [GBY_217] (rows=43560808 width=135)
                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col1, _col0, _col2
-                                  Select Operator [SEL_183] (rows=87121617 width=135)
+                                  Select Operator [SEL_216] (rows=87121617 width=135)
                                     Output:["_col0","_col1","_col2"]
-                                    Group By Operator [GBY_182] (rows=87121617 width=135)
+                                    Group By Operator [GBY_215] (rows=87121617 width=135)
                                       Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
                                     <-Reducer 15 [SIMPLE_EDGE]
                                       SHUFFLE [RS_80]
@@ -97,13 +97,13 @@ Stage-0
                                         Group By Operator [GBY_79] (rows=174243235 width=135)
                                           Output:["_col0","_col1","_col2"],keys:_col7, _col6, _col3
                                           Merge Join Operator [MERGEJOIN_132] (rows=174243235 width=135)
-                                            Conds:RS_75._col1=RS_145._col0(Inner),Output:["_col3","_col6","_col7"]
+                                            Conds:RS_75._col1=RS_178._col0(Inner),Output:["_col3","_col6","_col7"]
                                           <-Map 17 [SIMPLE_EDGE] vectorized
-                                            SHUFFLE [RS_145]
+                                            SHUFFLE [RS_178]
                                               PartitionCols:_col0
-                                              Select Operator [SEL_142] (rows=80000000 width=860)
+                                              Select Operator [SEL_175] (rows=80000000 width=860)
                                                 Output:["_col0","_col1","_col2"]
-                                                Filter Operator [FIL_141] (rows=80000000 width=860)
+                                                Filter Operator [FIL_174] (rows=80000000 width=860)
                                                   predicate:c_customer_sk is not null
                                                   TableScan [TS_6] (rows=80000000 width=860)
                                                     default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_first_name","c_last_name"]
@@ -111,57 +111,57 @@ Stage-0
                                             SHUFFLE [RS_75]
                                               PartitionCols:_col1
                                               Merge Join Operator [MERGEJOIN_131] (rows=158402938 width=135)
-                                                Conds:RS_181._col0=RS_140._col0(Inner),Output:["_col1","_col3"]
+                                                Conds:RS_214._col0=RS_173._col0(Inner),Output:["_col1","_col3"]
                                               <-Map 10 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_140]
+                                                SHUFFLE [RS_173]
                                                   PartitionCols:_col0
-                                                  Select Operator [SEL_137] (rows=8116 width=1119)
+                                                  Select Operator [SEL_170] (rows=8116 width=1119)
                                                     Output:["_col0","_col1"]
-                                                    Filter Operator [FIL_136] (rows=8116 width=1119)
+                                                    Filter Operator [FIL_169] (rows=8116 width=1119)
                                                       predicate:(d_date_sk is not null and d_month_seq BETWEEN 1212 AND 1223)
                                                       TableScan [TS_3] (rows=73049 width=1119)
                                                         default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date","d_month_seq"]
                                               <-Map 19 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_181]
+                                                SHUFFLE [RS_214]
                                                   PartitionCols:_col0
-                                                  Select Operator [SEL_180] (rows=144002668 width=135)
+                                                  Select Operator [SEL_213] (rows=144002668 width=135)
                                                     Output:["_col0","_col1"]
-                                                    Filter Operator [FIL_179] (rows=144002668 width=135)
+                                                    Filter Operator [FIL_212] (rows=144002668 width=135)
                                                       predicate:(ws_bill_customer_sk is not null and ws_sold_date_sk is not null)
                                                       TableScan [TS_63] (rows=144002668 width=135)
                                                         default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_bill_customer_sk"]
                       <-Reducer 6 [CONTAINS] vectorized
-                        Reduce Output Operator [RS_160]
+                        Reduce Output Operator [RS_193]
                           PartitionCols:_col0, _col1, _col2
-                          Group By Operator [GBY_159] (rows=54450625 width=129)
+                          Group By Operator [GBY_192] (rows=54450625 width=129)
                             Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col3)","sum(_col4)"],keys:_col0, _col1, _col2
-                            Select Operator [SEL_158] (rows=54450625 width=129)
+                            Select Operator [SEL_191] (rows=54450625 width=129)
                               Output:["_col0","_col1","_col2","_col3","_col4"]
-                              Select Operator [SEL_157] (rows=10889817 width=103)
+                              Select Operator [SEL_190] (rows=10889817 width=103)
                                 Output:["_col0","_col1","_col2","_col3","_col4"]
-                                Group By Operator [GBY_156] (rows=10889817 width=103)
+                                Group By Operator [GBY_189] (rows=10889817 width=103)
                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col0, _col1, _col2
-                                  Select Operator [SEL_155] (rows=21779634 width=103)
+                                  Select Operator [SEL_188] (rows=21779634 width=103)
                                     Output:["_col0","_col1","_col2"]
-                                    Filter Operator [FIL_154] (rows=21779634 width=103)
+                                    Filter Operator [FIL_187] (rows=21779634 width=103)
                                       predicate:(((_col3 * 2) = _col4) and (_col3 > 0L))
-                                      Group By Operator [GBY_153] (rows=130677808 width=103)
+                                      Group By Operator [GBY_186] (rows=130677808 width=103)
                                         Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2
                                       <-Union 5 [SIMPLE_EDGE]
                                         <-Reducer 13 [CONTAINS] vectorized
-                                          Reduce Output Operator [RS_178]
+                                          Reduce Output Operator [RS_211]
                                             PartitionCols:_col0, _col1, _col2
-                                            Group By Operator [GBY_177] (rows=261355616 width=103)
+                                            Group By Operator [GBY_210] (rows=261355616 width=103)
                                               Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col3)","sum(_col4)"],keys:_col0, _col1, _col2
-                                              Select Operator [SEL_176] (rows=261355616 width=103)
+                                              Select Operator [SEL_209] (rows=261355616 width=103)
                                                 Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                Select Operator [SEL_175] (rows=87116929 width=135)
+                                                Select Operator [SEL_208] (rows=87116929 width=135)
                                                   Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                  Group By Operator [GBY_174] (rows=87116929 width=135)
+                                                  Group By Operator [GBY_207] (rows=87116929 width=135)
                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col1, _col0, _col2
-                                                    Select Operator [SEL_173] (rows=174233858 width=135)
+                                                    Select Operator [SEL_206] (rows=174233858 width=135)
                                                       Output:["_col0","_col1","_col2"]
-                                                      Group By Operator [GBY_172] (rows=174233858 width=135)
+                                                      Group By Operator [GBY_205] (rows=174233858 width=135)
                                                         Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
                                                       <-Reducer 12 [SIMPLE_EDGE]
                                                         SHUFFLE [RS_42]
@@ -169,43 +169,43 @@ Stage-0
                                                           Group By Operator [GBY_41] (rows=348467716 width=135)
                                                             Output:["_col0","_col1","_col2"],keys:_col7, _col6, _col3
                                                             Merge Join Operator [MERGEJOIN_130] (rows=348467716 width=135)
-                                                              Conds:RS_37._col1=RS_144._col0(Inner),Output:["_col3","_col6","_col7"]
+                                                              Conds:RS_37._col1=RS_177._col0(Inner),Output:["_col3","_col6","_col7"]
                                                             <-Map 17 [SIMPLE_EDGE] vectorized
-                                                              SHUFFLE [RS_144]
+                                                              SHUFFLE [RS_177]
                                                                 PartitionCols:_col0
-                                                                 Please refer to the previous Select Operator [SEL_142]
+                                                                 Please refer to the previous Select Operator [SEL_175]
                                                             <-Reducer 11 [SIMPLE_EDGE]
                                                               SHUFFLE [RS_37]
                                                                 PartitionCols:_col1
                                                                 Merge Join Operator [MERGEJOIN_129] (rows=316788826 width=135)
-                                                                  Conds:RS_171._col0=RS_139._col0(Inner),Output:["_col1","_col3"]
+                                                                  Conds:RS_204._col0=RS_172._col0(Inner),Output:["_col1","_col3"]
                                                                 <-Map 10 [SIMPLE_EDGE] vectorized
-                                                                  SHUFFLE [RS_139]
+                                                                  SHUFFLE [RS_172]
                                                                     PartitionCols:_col0
-                                                                     Please refer to the previous Select Operator [SEL_137]
+                                                                     Please refer to the previous Select Operator [SEL_170]
                                                                 <-Map 18 [SIMPLE_EDGE] vectorized
-                                                                  SHUFFLE [RS_171]
+                                                                  SHUFFLE [RS_204]
                                                                     PartitionCols:_col0
-                                                                    Select Operator [SEL_170] (rows=287989836 width=135)
+                                                                    Select Operator [SEL_203] (rows=287989836 width=135)
                                                                       Output:["_col0","_col1"]
-                                                                      Filter Operator [FIL_169] (rows=287989836 width=135)
+                                                                      Filter Operator [FIL_202] (rows=287989836 width=135)
                                                                         predicate:(cs_bill_customer_sk is not null and cs_sold_date_sk is not null)
                                                                         TableScan [TS_25] (rows=287989836 width=135)
                                                                           default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_customer_sk"]
                                         <-Reducer 4 [CONTAINS] vectorized
-                                          Reduce Output Operator [RS_152]
+                                          Reduce Output Operator [RS_185]
                                             PartitionCols:_col0, _col1, _col2
-                                            Group By Operator [GBY_151] (rows=261355616 width=103)
+                                            Group By Operator [GBY_184] (rows=261355616 width=103)
                                               Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col3)","sum(_col4)"],keys:_col0, _col1, _col2
-                                              Select Operator [SEL_150] (rows=261355616 width=103)
+                                              Select Operator [SEL_183] (rows=261355616 width=103)
                                                 Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                Select Operator [SEL_149] (rows=174238687 width=88)
+                                                Select Operator [SEL_182] (rows=174238687 width=88)
                                                   Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                  Group By Operator [GBY_148] (rows=174238687 width=88)
+                                                  Group By Operator [GBY_181] (rows=174238687 width=88)
                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col1, _col0, _col2
-                                                    Select Operator [SEL_147] (rows=348477374 width=88)
+                                                    Select Operator [SEL_180] (rows=348477374 width=88)
                                                       Output:["_col0","_col1","_col2"]
-                                                      Group By Operator [GBY_146] (rows=348477374 width=88)
+                                                      Group By Operator [GBY_179] (rows=348477374 width=88)
                                                         Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
                                                       <-Reducer 3 [SIMPLE_EDGE]
                                                         SHUFFLE [RS_17]
@@ -213,26 +213,26 @@ Stage-0
                                                           Group By Operator [GBY_16] (rows=696954748 width=88)
                                                             Output:["_col0","_col1","_col2"],keys:_col7, _col6, _col3
                                                             Merge Join Operator [MERGEJOIN_128] (rows=696954748 width=88)
-                                                              Conds:RS_12._col1=RS_143._col0(Inner),Output:["_col3","_col6","_col7"]
+                                                              Conds:RS_12._col1=RS_176._col0(Inner),Output:["_col3","_col6","_col7"]
                                                             <-Map 17 [SIMPLE_EDGE] vectorized
-                                                              SHUFFLE [RS_143]
+                                                              SHUFFLE [RS_176]
                                                                 PartitionCols:_col0
-                                                                 Please refer to the previous Select Operator [SEL_142]
+                                                                 Please refer to the previous Select Operator [SEL_175]
                                                             <-Reducer 2 [SIMPLE_EDGE]
                                                               SHUFFLE [RS_12]
                                                                 PartitionCols:_col1
                                                                 Merge Join Operator [MERGEJOIN_127] (rows=633595212 width=88)
-                                                                  Conds:RS_135._col0=RS_138._col0(Inner),Output:["_col1","_col3"]
+                                                                  Conds:RS_168._col0=RS_171._col0(Inner),Output:["_col1","_col3"]
                                                                 <-Map 10 [SIMPLE_EDGE] vectorized
-                                                                  SHUFFLE [RS_138]
+                                                                  SHUFFLE [RS_171]
                                                                     PartitionCols:_col0
-                                                                     Please refer to the previous Select Operator [SEL_137]
+                                                                     Please refer to the previous Select Operator [SEL_170]
                                                                 <-Map 1 [SIMPLE_EDGE] vectorized
-                                                                  SHUFFLE [RS_135]
+                                                                  SHUFFLE [RS_168]
                                                                     PartitionCols:_col0
-                                                                    Select Operator [SEL_134] (rows=575995635 width=88)
+                                                                    Select Operator [SEL_167] (rows=575995635 width=88)
                                                                       Output:["_col0","_col1"]
-                                                                      Filter Operator [FIL_133] (rows=575995635 width=88)
+                                                                      Filter Operator [FIL_166] (rows=575995635 width=88)
                                                                         predicate:(ss_customer_sk is not null and ss_sold_date_sk is not null)
                                                                         TableScan [TS_0] (rows=575995635 width=88)
                                                                           default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_customer_sk"]

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/smb_mapjoin_25.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/smb_mapjoin_25.q.out b/ql/src/test/results/clientpositive/smb_mapjoin_25.q.out
index 6e57bca..19b686a 100644
--- a/ql/src/test/results/clientpositive/smb_mapjoin_25.q.out
+++ b/ql/src/test/results/clientpositive/smb_mapjoin_25.q.out
@@ -179,11 +179,11 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-Warning: Map Join MAPJOIN[34][bigTable=?] in task 'Stage-7:MAPRED' is a cross product
-Warning: Map Join MAPJOIN[33][bigTable=?] in task 'Stage-6:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[48][bigTable=?] in task 'Stage-7:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[40][bigTable=?] in task 'Stage-6:MAPRED' is a cross product
 Warning: Shuffle Join JOIN[22][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-2:MAPRED' is a cross product
-Warning: Map Join MAPJOIN[35][bigTable=?] in task 'Stage-9:MAPRED' is a cross product
-Warning: Map Join MAPJOIN[36][bigTable=?] in task 'Stage-10:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[49][bigTable=?] in task 'Stage-9:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[50][bigTable=?] in task 'Stage-10:MAPRED' is a cross product
 PREHOOK: query: explain 
 select * from (select a.key from smb_bucket_1_n4 a join smb_bucket_2_n4 b on (a.key = b.key) where a.key = 5) t1 left outer join (select c.key from smb_bucket_2_n4 c join smb_bucket_3_n4 d on (c.key = d.key) where c.key=5) t2 on (t1.key=t2.key) where t2.key=5
 PREHOOK: type: QUERY
@@ -420,11 +420,11 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-Warning: Map Join MAPJOIN[34][bigTable=?] in task 'Stage-7:MAPRED' is a cross product
-Warning: Map Join MAPJOIN[33][bigTable=?] in task 'Stage-6:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[48][bigTable=?] in task 'Stage-7:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[40][bigTable=?] in task 'Stage-6:MAPRED' is a cross product
 Warning: Shuffle Join JOIN[22][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-2:MAPRED' is a cross product
-Warning: Map Join MAPJOIN[35][bigTable=?] in task 'Stage-9:MAPRED' is a cross product
-Warning: Map Join MAPJOIN[36][bigTable=?] in task 'Stage-10:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[49][bigTable=?] in task 'Stage-9:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[50][bigTable=?] in task 'Stage-10:MAPRED' is a cross product
 PREHOOK: query: select * from (select a.key from smb_bucket_1_n4 a join smb_bucket_2_n4 b on (a.key = b.key) where a.key = 5) t1 left outer join (select c.key from smb_bucket_2_n4 c join smb_bucket_3_n4 d on (c.key = d.key) where c.key=5) t2 on (t1.key=t2.key) where t2.key=5
 PREHOOK: type: QUERY
 PREHOOK: Input: default@smb_bucket_1_n4

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/smb_mapjoin_47.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/smb_mapjoin_47.q.out b/ql/src/test/results/clientpositive/smb_mapjoin_47.q.out
index 9c00596..9788a5d 100644
--- a/ql/src/test/results/clientpositive/smb_mapjoin_47.q.out
+++ b/ql/src/test/results/clientpositive/smb_mapjoin_47.q.out
@@ -954,7 +954,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test1_n8
 POSTHOOK: Input: default@test2_n5
 #### A masked pattern was here ####
-Warning: Map Join MAPJOIN[18][bigTable=?] in task 'Stage-7:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[26][bigTable=?] in task 'Stage-7:MAPRED' is a cross product
 PREHOOK: query: EXPLAIN
 SELECT *
 FROM test2_n5
@@ -1125,7 +1125,7 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-Warning: Map Join MAPJOIN[18][bigTable=?] in task 'Stage-7:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[26][bigTable=?] in task 'Stage-7:MAPRED' is a cross product
 PREHOOK: query: SELECT *
 FROM test2_n5
 JOIN test1_n8 a ON (a.key+test2_n5.key >= 100)

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/spark/spark_explainuser_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/spark_explainuser_1.q.out b/ql/src/test/results/clientpositive/spark/spark_explainuser_1.q.out
index 85d0b8a..b488129 100644
--- a/ql/src/test/results/clientpositive/spark/spark_explainuser_1.q.out
+++ b/ql/src/test/results/clientpositive/spark/spark_explainuser_1.q.out
@@ -753,10 +753,10 @@ Stage-0
         Select Operator [SEL_24] (rows=3 width=87)
           Output:["_col0"]
         <-Reducer 2 [SORT]
-          SORT [RS_23]
-            Select Operator [SEL_5] (rows=1 width=87)
+          SORT [RS_29]
+            Select Operator [SEL_27] (rows=1 width=87)
               Output:["_col0"]
-              Group By Operator [GBY_4] (rows=1 width=8)
+              Group By Operator [GBY_26] (rows=1 width=8)
                 Output:["_col0"],aggregations:["count(VALUE._col0)"]
               <-Map 1 [GROUP]
                 GROUP [RS_3]
@@ -767,17 +767,17 @@ Stage-0
                       TableScan [TS_0] (rows=20 width=80)
                         default@cbo_t3,s1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
         <-Reducer 5 [SORT]
-          SORT [RS_23]
-            Select Operator [SEL_12] (rows=1 width=87)
+          SORT [RS_33]
+            Select Operator [SEL_31] (rows=1 width=87)
               Output:["_col0"]
-              Group By Operator [GBY_11] (rows=1 width=8)
+              Group By Operator [GBY_30] (rows=1 width=8)
                 Output:["_col0"],aggregations:["count(VALUE._col0)"]
               <- Please refer to the previous Map 1 [GROUP]
         <-Reducer 7 [SORT]
-          SORT [RS_23]
-            Select Operator [SEL_20] (rows=1 width=87)
+          SORT [RS_37]
+            Select Operator [SEL_35] (rows=1 width=87)
               Output:["_col0"]
-              Group By Operator [GBY_19] (rows=1 width=8)
+              Group By Operator [GBY_34] (rows=1 width=8)
                 Output:["_col0"],aggregations:["count(VALUE._col0)"]
               <- Please refer to the previous Map 1 [GROUP]
 
@@ -815,13 +815,13 @@ Stage-0
             Group By Operator [GBY_26] (rows=1 width=95)
               Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
             <-Reducer 2 [GROUP]
-              GROUP [RS_25]
+              GROUP [RS_35]
                 PartitionCols:_col0
-                Group By Operator [GBY_24] (rows=1 width=95)
+                Group By Operator [GBY_34] (rows=1 width=95)
                   Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
-                  Select Operator [SEL_5] (rows=1 width=87)
+                  Select Operator [SEL_32] (rows=1 width=87)
                     Output:["_col0"]
-                    Group By Operator [GBY_4] (rows=1 width=8)
+                    Group By Operator [GBY_31] (rows=1 width=8)
                       Output:["_col0"],aggregations:["count(VALUE._col0)"]
                     <-Map 1 [GROUP]
                       GROUP [RS_3]
@@ -832,23 +832,23 @@ Stage-0
                             TableScan [TS_0] (rows=20 width=80)
                               default@cbo_t3,s1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
             <-Reducer 6 [GROUP]
-              GROUP [RS_25]
+              GROUP [RS_40]
                 PartitionCols:_col0
-                Group By Operator [GBY_24] (rows=1 width=95)
+                Group By Operator [GBY_39] (rows=1 width=95)
                   Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
-                  Select Operator [SEL_12] (rows=1 width=87)
+                  Select Operator [SEL_37] (rows=1 width=87)
                     Output:["_col0"]
-                    Group By Operator [GBY_11] (rows=1 width=8)
+                    Group By Operator [GBY_36] (rows=1 width=8)
                       Output:["_col0"],aggregations:["count(VALUE._col0)"]
                     <- Please refer to the previous Map 1 [GROUP]
             <-Reducer 8 [GROUP]
-              GROUP [RS_25]
+              GROUP [RS_45]
                 PartitionCols:_col0
-                Group By Operator [GBY_24] (rows=1 width=95)
+                Group By Operator [GBY_44] (rows=1 width=95)
                   Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
-                  Select Operator [SEL_20] (rows=1 width=87)
+                  Select Operator [SEL_42] (rows=1 width=87)
                     Output:["_col0"]
-                    Group By Operator [GBY_19] (rows=1 width=8)
+                    Group By Operator [GBY_41] (rows=1 width=8)
                       Output:["_col0"],aggregations:["count(VALUE._col0)"]
                     <- Please refer to the previous Map 1 [GROUP]
 
@@ -4802,11 +4802,11 @@ Stage-3
                 Select Operator [SEL_5] (rows=26 width=499)
                   Output:["_col1","_col2","_col5","_col7"]
                 <-Reducer 6 [PARTITION-LEVEL SORT]
-                  PARTITION-LEVEL SORT [RS_4]
+                  PARTITION-LEVEL SORT [RS_24]
                     PartitionCols:_col2
-                    PTF Operator [PTF_3] (rows=26 width=499)
+                    PTF Operator [PTF_22] (rows=26 width=499)
                       Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}}]
-                      Select Operator [SEL_2] (rows=26 width=499)
+                      Select Operator [SEL_21] (rows=26 width=499)
                         Output:["_col1","_col2","_col5","_col7"]
                       <-Map 1 [PARTITION-LEVEL SORT]
                         PARTITION-LEVEL SORT [RS_1]
@@ -4832,11 +4832,11 @@ Stage-3
                         Select Operator [SEL_11] (rows=26 width=491)
                           Output:["_col1","_col2","_col5"]
                         <-Reducer 7 [PARTITION-LEVEL SORT]
-                          PARTITION-LEVEL SORT [RS_10]
+                          PARTITION-LEVEL SORT [RS_27]
                             PartitionCols:_col2
-                            PTF Operator [PTF_3] (rows=26 width=499)
+                            PTF Operator [PTF_26] (rows=26 width=499)
                               Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}}]
-                              Select Operator [SEL_2] (rows=26 width=499)
+                              Select Operator [SEL_25] (rows=26 width=499)
                                 Output:["_col1","_col2","_col5","_col7"]
                               <- Please refer to the previous Map 1 [PARTITION-LEVEL SORT]
 Stage-4
@@ -5239,9 +5239,9 @@ Stage-2
                             default@src,src2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
         Stage-3
           Map 4
-          File Output Operator [FS_11]
+          File Output Operator [FS_19]
             table:{"name:":"default.dest_j1_n14"}
-            Select Operator [SEL_9] (rows=791 width=95)
+            Select Operator [SEL_18] (rows=791 width=95)
               Output:["_col0","_col1"]
               Map Join Operator [MAPJOIN_16]
                 Conds:TS_14.reducesinkkey0=TS_14.reducesinkkey0(Inner),Output:["_col0","_col2"]
@@ -5250,7 +5250,7 @@ Stage-2
           Map Reduce Local Work
             Stage-5(CONDITIONAL)
               Map 5
-              keys: [HASHTABLESINK_18]
+              keys: [HASHTABLESINK_21]
                 0reducesinkkey0,1reducesinkkey0
                 TableScan [TS_15]
                   Output:["1_VALUE_0","reducesinkkey0"]
@@ -5478,7 +5478,7 @@ Stage-0
     limit:-1
     Stage-2
       Map 4
-      File Output Operator [FS_10]
+      File Output Operator [FS_17]
         Map Join Operator [MAPJOIN_15]
           Conds:TS_13.reducesinkkey0=TS_13.reducesinkkey0(Inner),Output:["_col0","_col1","_col2","_col3"]
         <-TableScan [TS_13]
@@ -5486,7 +5486,7 @@ Stage-0
       Map Reduce Local Work
         Stage-4(CONDITIONAL)
           Map 5
-          keys: [HASHTABLESINK_17]
+          keys: [HASHTABLESINK_19]
             0reducesinkkey0,1reducesinkkey0
             TableScan [TS_14]
               Output:["1_VALUE_0","1_VALUE_1","reducesinkkey0"]

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/subquery_multiinsert.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/subquery_multiinsert.q.out b/ql/src/test/results/clientpositive/subquery_multiinsert.q.out
index b331a26..d427bc2 100644
--- a/ql/src/test/results/clientpositive/subquery_multiinsert.q.out
+++ b/ql/src/test/results/clientpositive/subquery_multiinsert.q.out
@@ -28,7 +28,7 @@ POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@src_5
 RUN: Stage-0:DDL
-Warning: Shuffle Join JOIN[31][tables = [b, sq_2_notin_nullcheck]] in Stage 'Stage-2:MAPRED' is a cross product
+Warning: Shuffle Join JOIN[38][tables = [b, sq_2_notin_nullcheck]] in Stage 'Stage-2:MAPRED' is a cross product
 PREHOOK: query: explain
 from src b 
 INSERT OVERWRITE TABLE src_4 
@@ -366,7 +366,7 @@ STAGE PLANS:
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
                 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
-Warning: Shuffle Join JOIN[31][tables = [b, sq_2_notin_nullcheck]] in Stage 'Stage-2:MAPRED' is a cross product
+Warning: Shuffle Join JOIN[38][tables = [b, sq_2_notin_nullcheck]] in Stage 'Stage-2:MAPRED' is a cross product
 PREHOOK: query: from src b 
 INSERT OVERWRITE TABLE src_4 
   select * 
@@ -559,8 +559,8 @@ POSTHOOK: Input: default@src_5
 199	val_199
 199	val_199
 2	val_2
-Warning: Map Join MAPJOIN[56][bigTable=b] in task 'Stage-14:MAPRED' is a cross product
-Warning: Shuffle Join JOIN[31][tables = [b, sq_2_notin_nullcheck]] in Stage 'Stage-2:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[80][bigTable=b] in task 'Stage-14:MAPRED' is a cross product
+Warning: Shuffle Join JOIN[38][tables = [b, sq_2_notin_nullcheck]] in Stage 'Stage-2:MAPRED' is a cross product
 PREHOOK: query: explain
 from src b 
 INSERT OVERWRITE TABLE src_4 
@@ -948,8 +948,8 @@ STAGE PLANS:
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
                 serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
 
-Warning: Map Join MAPJOIN[56][bigTable=b] in task 'Stage-14:MAPRED' is a cross product
-Warning: Shuffle Join JOIN[31][tables = [b, sq_2_notin_nullcheck]] in Stage 'Stage-2:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[80][bigTable=b] in task 'Stage-14:MAPRED' is a cross product
+Warning: Shuffle Join JOIN[38][tables = [b, sq_2_notin_nullcheck]] in Stage 'Stage-2:MAPRED' is a cross product
 PREHOOK: query: from src b 
 INSERT OVERWRITE TABLE src_4 
   select * 


[12/14] hive git commit: HIVE-19237: Only use an operatorId once in a plan (Zoltan Haindrich reviewed by Ashutosh Chauhan)

Posted by kg...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/llap/explainanalyze_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/explainanalyze_2.q.out b/ql/src/test/results/clientpositive/llap/explainanalyze_2.q.out
index 6ec4d00..0c6bd6a 100644
--- a/ql/src/test/results/clientpositive/llap/explainanalyze_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/explainanalyze_2.q.out
@@ -63,11 +63,11 @@ Stage-0
           Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
         <-Union 4 [SIMPLE_EDGE]
           <-Reducer 3 [CONTAINS] llap
-            Reduce Output Operator [RS_53]
+            Reduce Output Operator [RS_84]
               PartitionCols:_col0, _col1
-              Select Operator [SEL_24] (rows=66/61 width=177)
+              Select Operator [SEL_82] (rows=66/61 width=177)
                 Output:["_col0","_col1"]
-                Merge Join Operator [MERGEJOIN_79] (rows=66/61 width=177)
+                Merge Join Operator [MERGEJOIN_81] (rows=66/61 width=177)
                   Conds:RS_21._col2=RS_22._col1(Inner),Output:["_col1","_col4"]
                 <-Reducer 11 [SIMPLE_EDGE] llap
                   SHUFFLE [RS_22]
@@ -78,22 +78,22 @@ Stage-0
                         Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                       <-Union 10 [SIMPLE_EDGE]
                         <-Map 12 [CONTAINS] llap
-                          Reduce Output Operator [RS_15]
+                          Reduce Output Operator [RS_98]
                             PartitionCols:_col1, _col0
-                            Select Operator [SEL_11] (rows=500/500 width=178)
+                            Select Operator [SEL_96] (rows=500/500 width=178)
                               Output:["_col0","_col1"]
-                              Filter Operator [FIL_72] (rows=500/500 width=178)
+                              Filter Operator [FIL_95] (rows=500/500 width=178)
                                 predicate:value is not null
-                                TableScan [TS_9] (rows=500/500 width=178)
+                                TableScan [TS_94] (rows=500/500 width=178)
                                   Output:["key","value"]
                         <-Map 9 [CONTAINS] llap
-                          Reduce Output Operator [RS_15]
+                          Reduce Output Operator [RS_93]
                             PartitionCols:_col1, _col0
-                            Select Operator [SEL_8] (rows=25/25 width=175)
+                            Select Operator [SEL_91] (rows=25/25 width=175)
                               Output:["_col0","_col1"]
-                              Filter Operator [FIL_71] (rows=25/25 width=175)
+                              Filter Operator [FIL_90] (rows=25/25 width=175)
                                 predicate:value is not null
-                                TableScan [TS_6] (rows=25/25 width=175)
+                                TableScan [TS_89] (rows=25/25 width=175)
                                   Output:["key","value"]
                 <-Reducer 2 [SIMPLE_EDGE] llap
                   SHUFFLE [RS_21]
@@ -119,11 +119,11 @@ Stage-0
                             TableScan [TS_3] (rows=25/25 width=175)
                               default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
           <-Reducer 7 [CONTAINS] llap
-            Reduce Output Operator [RS_53]
+            Reduce Output Operator [RS_88]
               PartitionCols:_col0, _col1
-              Select Operator [SEL_49] (rows=66/61 width=177)
+              Select Operator [SEL_86] (rows=66/61 width=177)
                 Output:["_col0","_col1"]
-                Merge Join Operator [MERGEJOIN_80] (rows=66/61 width=177)
+                Merge Join Operator [MERGEJOIN_85] (rows=66/61 width=177)
                   Conds:RS_46._col2=RS_47._col1(Inner),Output:["_col1","_col4"]
                 <-Reducer 15 [SIMPLE_EDGE] llap
                   SHUFFLE [RS_47]
@@ -134,22 +134,22 @@ Stage-0
                         Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                       <-Union 14 [SIMPLE_EDGE]
                         <-Map 13 [CONTAINS] llap
-                          Reduce Output Operator [RS_40]
+                          Reduce Output Operator [RS_103]
                             PartitionCols:_col1, _col0
-                            Select Operator [SEL_33] (rows=25/25 width=175)
+                            Select Operator [SEL_101] (rows=25/25 width=175)
                               Output:["_col0","_col1"]
-                              Filter Operator [FIL_75] (rows=25/25 width=175)
+                              Filter Operator [FIL_100] (rows=25/25 width=175)
                                 predicate:value is not null
-                                TableScan [TS_31] (rows=25/25 width=175)
+                                TableScan [TS_99] (rows=25/25 width=175)
                                   Output:["key","value"]
                         <-Map 16 [CONTAINS] llap
-                          Reduce Output Operator [RS_40]
+                          Reduce Output Operator [RS_108]
                             PartitionCols:_col1, _col0
-                            Select Operator [SEL_36] (rows=500/500 width=178)
+                            Select Operator [SEL_106] (rows=500/500 width=178)
                               Output:["_col0","_col1"]
-                              Filter Operator [FIL_76] (rows=500/500 width=178)
+                              Filter Operator [FIL_105] (rows=500/500 width=178)
                                 predicate:value is not null
-                                TableScan [TS_34] (rows=500/500 width=178)
+                                TableScan [TS_104] (rows=500/500 width=178)
                                   Output:["key","value"]
                 <-Reducer 6 [SIMPLE_EDGE] llap
                   SHUFFLE [RS_46]
@@ -257,17 +257,17 @@ Stage-0
           Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
         <-Union 6 [SIMPLE_EDGE]
           <-Reducer 5 [CONTAINS] llap
-            Reduce Output Operator [RS_111]
+            Reduce Output Operator [RS_163]
               PartitionCols:_col0, _col1
-              Group By Operator [GBY_63] (rows=196/15 width=177)
+              Group By Operator [GBY_161] (rows=196/15 width=177)
                 Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
               <-Union 4 [SIMPLE_EDGE]
                 <-Reducer 10 [CONTAINS] llap
-                  Reduce Output Operator [RS_62]
+                  Reduce Output Operator [RS_171]
                     PartitionCols:_col0, _col1
-                    Select Operator [SEL_58] (rows=130/61 width=177)
+                    Select Operator [SEL_169] (rows=130/61 width=177)
                       Output:["_col0","_col1"]
-                      Merge Join Operator [MERGEJOIN_155] (rows=130/61 width=177)
+                      Merge Join Operator [MERGEJOIN_168] (rows=130/61 width=177)
                         Conds:RS_55._col3=RS_56._col1(Inner),Output:["_col1","_col2"]
                       <-Reducer 20 [SIMPLE_EDGE] llap
                         SHUFFLE [RS_56]
@@ -278,39 +278,39 @@ Stage-0
                               Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                             <-Union 19 [SIMPLE_EDGE]
                               <-Map 22 [CONTAINS] llap
-                                Reduce Output Operator [RS_49]
+                                Reduce Output Operator [RS_200]
                                   PartitionCols:_col1, _col0
-                                  Select Operator [SEL_45] (rows=500/500 width=178)
+                                  Select Operator [SEL_198] (rows=500/500 width=178)
                                     Output:["_col0","_col1"]
-                                    Filter Operator [FIL_144] (rows=500/500 width=178)
+                                    Filter Operator [FIL_197] (rows=500/500 width=178)
                                       predicate:value is not null
-                                      TableScan [TS_43] (rows=500/500 width=178)
+                                      TableScan [TS_196] (rows=500/500 width=178)
                                         Output:["key","value"]
                               <-Reducer 18 [CONTAINS] llap
-                                Reduce Output Operator [RS_49]
+                                Reduce Output Operator [RS_190]
                                   PartitionCols:_col1, _col0
-                                  Select Operator [SEL_42] (rows=525/319 width=178)
+                                  Select Operator [SEL_188] (rows=525/319 width=178)
                                     Output:["_col0","_col1"]
-                                    Group By Operator [GBY_41] (rows=525/319 width=178)
+                                    Group By Operator [GBY_187] (rows=525/319 width=178)
                                       Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                     <-Union 17 [SIMPLE_EDGE]
                                       <-Map 16 [CONTAINS] llap
-                                        Reduce Output Operator [RS_40]
+                                        Reduce Output Operator [RS_186]
                                           PartitionCols:_col1, _col0
-                                          Select Operator [SEL_33] (rows=25/25 width=175)
+                                          Select Operator [SEL_184] (rows=25/25 width=175)
                                             Output:["_col0","_col1"]
-                                            Filter Operator [FIL_142] (rows=25/25 width=175)
+                                            Filter Operator [FIL_183] (rows=25/25 width=175)
                                               predicate:value is not null
-                                              TableScan [TS_31] (rows=25/25 width=175)
+                                              TableScan [TS_182] (rows=25/25 width=175)
                                                 Output:["key","value"]
                                       <-Map 21 [CONTAINS] llap
-                                        Reduce Output Operator [RS_40]
+                                        Reduce Output Operator [RS_195]
                                           PartitionCols:_col1, _col0
-                                          Select Operator [SEL_36] (rows=500/500 width=178)
+                                          Select Operator [SEL_193] (rows=500/500 width=178)
                                             Output:["_col0","_col1"]
-                                            Filter Operator [FIL_143] (rows=500/500 width=178)
+                                            Filter Operator [FIL_192] (rows=500/500 width=178)
                                               predicate:value is not null
-                                              TableScan [TS_34] (rows=500/500 width=178)
+                                              TableScan [TS_191] (rows=500/500 width=178)
                                                 Output:["key","value"]
                       <-Reducer 9 [SIMPLE_EDGE] llap
                         SHUFFLE [RS_55]
@@ -336,11 +336,11 @@ Stage-0
                                   TableScan [TS_3] (rows=25/25 width=175)
                                     default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
                 <-Reducer 3 [CONTAINS] llap
-                  Reduce Output Operator [RS_62]
+                  Reduce Output Operator [RS_160]
                     PartitionCols:_col0, _col1
-                    Select Operator [SEL_24] (rows=66/61 width=177)
+                    Select Operator [SEL_158] (rows=66/61 width=177)
                       Output:["_col0","_col1"]
-                      Merge Join Operator [MERGEJOIN_154] (rows=66/61 width=177)
+                      Merge Join Operator [MERGEJOIN_157] (rows=66/61 width=177)
                         Conds:RS_21._col3=RS_22._col1(Inner),Output:["_col1","_col2"]
                       <-Reducer 2 [SIMPLE_EDGE] llap
                         SHUFFLE [RS_21]
@@ -364,29 +364,29 @@ Stage-0
                               Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                             <-Union 13 [SIMPLE_EDGE]
                               <-Map 12 [CONTAINS] llap
-                                Reduce Output Operator [RS_15]
+                                Reduce Output Operator [RS_176]
                                   PartitionCols:_col1, _col0
-                                  Select Operator [SEL_8] (rows=25/25 width=175)
+                                  Select Operator [SEL_174] (rows=25/25 width=175)
                                     Output:["_col0","_col1"]
-                                    Filter Operator [FIL_138] (rows=25/25 width=175)
+                                    Filter Operator [FIL_173] (rows=25/25 width=175)
                                       predicate:value is not null
-                                      TableScan [TS_6] (rows=25/25 width=175)
+                                      TableScan [TS_172] (rows=25/25 width=175)
                                         Output:["key","value"]
                               <-Map 15 [CONTAINS] llap
-                                Reduce Output Operator [RS_15]
+                                Reduce Output Operator [RS_181]
                                   PartitionCols:_col1, _col0
-                                  Select Operator [SEL_11] (rows=500/500 width=178)
+                                  Select Operator [SEL_179] (rows=500/500 width=178)
                                     Output:["_col0","_col1"]
-                                    Filter Operator [FIL_139] (rows=500/500 width=178)
+                                    Filter Operator [FIL_178] (rows=500/500 width=178)
                                       predicate:value is not null
-                                      TableScan [TS_9] (rows=500/500 width=178)
+                                      TableScan [TS_177] (rows=500/500 width=178)
                                         Output:["key","value"]
           <-Reducer 8 [CONTAINS] llap
-            Reduce Output Operator [RS_111]
+            Reduce Output Operator [RS_167]
               PartitionCols:_col0, _col1
-              Select Operator [SEL_107] (rows=193/61 width=177)
+              Select Operator [SEL_165] (rows=193/61 width=177)
                 Output:["_col0","_col1"]
-                Merge Join Operator [MERGEJOIN_156] (rows=193/61 width=177)
+                Merge Join Operator [MERGEJOIN_164] (rows=193/61 width=177)
                   Conds:RS_104._col3=RS_105._col1(Inner),Output:["_col1","_col2"]
                 <-Reducer 2 [SIMPLE_EDGE] llap
                   SHUFFLE [RS_104]
@@ -401,56 +401,56 @@ Stage-0
                         Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                       <-Union 28 [SIMPLE_EDGE]
                         <-Map 32 [CONTAINS] llap
-                          Reduce Output Operator [RS_98]
+                          Reduce Output Operator [RS_228]
                             PartitionCols:_col1, _col0
-                            Select Operator [SEL_94] (rows=500/500 width=178)
+                            Select Operator [SEL_226] (rows=500/500 width=178)
                               Output:["_col0","_col1"]
-                              Filter Operator [FIL_150] (rows=500/500 width=178)
+                              Filter Operator [FIL_225] (rows=500/500 width=178)
                                 predicate:value is not null
-                                TableScan [TS_92] (rows=500/500 width=178)
+                                TableScan [TS_224] (rows=500/500 width=178)
                                   Output:["key","value"]
                         <-Reducer 27 [CONTAINS] llap
-                          Reduce Output Operator [RS_98]
+                          Reduce Output Operator [RS_213]
                             PartitionCols:_col1, _col0
-                            Select Operator [SEL_91] (rows=1025/319 width=178)
+                            Select Operator [SEL_211] (rows=1025/319 width=178)
                               Output:["_col0","_col1"]
-                              Group By Operator [GBY_90] (rows=1025/319 width=178)
+                              Group By Operator [GBY_210] (rows=1025/319 width=178)
                                 Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                               <-Union 26 [SIMPLE_EDGE]
                                 <-Map 31 [CONTAINS] llap
-                                  Reduce Output Operator [RS_89]
+                                  Reduce Output Operator [RS_223]
                                     PartitionCols:_col1, _col0
-                                    Select Operator [SEL_85] (rows=500/500 width=178)
+                                    Select Operator [SEL_221] (rows=500/500 width=178)
                                       Output:["_col0","_col1"]
-                                      Filter Operator [FIL_149] (rows=500/500 width=178)
+                                      Filter Operator [FIL_220] (rows=500/500 width=178)
                                         predicate:value is not null
-                                        TableScan [TS_83] (rows=500/500 width=178)
+                                        TableScan [TS_219] (rows=500/500 width=178)
                                           Output:["key","value"]
                                 <-Reducer 25 [CONTAINS] llap
-                                  Reduce Output Operator [RS_89]
+                                  Reduce Output Operator [RS_209]
                                     PartitionCols:_col1, _col0
-                                    Select Operator [SEL_82] (rows=525/319 width=178)
+                                    Select Operator [SEL_207] (rows=525/319 width=178)
                                       Output:["_col0","_col1"]
-                                      Group By Operator [GBY_81] (rows=525/319 width=178)
+                                      Group By Operator [GBY_206] (rows=525/319 width=178)
                                         Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                       <-Union 24 [SIMPLE_EDGE]
                                         <-Map 23 [CONTAINS] llap
-                                          Reduce Output Operator [RS_80]
+                                          Reduce Output Operator [RS_205]
                                             PartitionCols:_col1, _col0
-                                            Select Operator [SEL_73] (rows=25/25 width=175)
+                                            Select Operator [SEL_203] (rows=25/25 width=175)
                                               Output:["_col0","_col1"]
-                                              Filter Operator [FIL_147] (rows=25/25 width=175)
+                                              Filter Operator [FIL_202] (rows=25/25 width=175)
                                                 predicate:value is not null
-                                                TableScan [TS_71] (rows=25/25 width=175)
+                                                TableScan [TS_201] (rows=25/25 width=175)
                                                   Output:["key","value"]
                                         <-Map 30 [CONTAINS] llap
-                                          Reduce Output Operator [RS_80]
+                                          Reduce Output Operator [RS_218]
                                             PartitionCols:_col1, _col0
-                                            Select Operator [SEL_76] (rows=500/500 width=178)
+                                            Select Operator [SEL_216] (rows=500/500 width=178)
                                               Output:["_col0","_col1"]
-                                              Filter Operator [FIL_148] (rows=500/500 width=178)
+                                              Filter Operator [FIL_215] (rows=500/500 width=178)
                                                 predicate:value is not null
-                                                TableScan [TS_74] (rows=500/500 width=178)
+                                                TableScan [TS_214] (rows=500/500 width=178)
                                                   Output:["key","value"]
 
 PREHOOK: query: CREATE TABLE srcbucket_mapjoin_n11(key int, value string) partitioned by (ds string) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
@@ -860,30 +860,30 @@ Stage-0
                       default@tab_part_n7,b_n10,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
             <-Union 2 [SIMPLE_EDGE]
               <-Map 1 [CONTAINS] llap
-                Reduce Output Operator [RS_18]
+                Reduce Output Operator [RS_48]
                   PartitionCols:_col0
-                  Merge Join Operator [MERGEJOIN_36] (rows=401/480 width=4)
-                    Conds:SEL_2._col0=SEL_5._col0(Inner),Output:["_col0"]
+                  Merge Join Operator [MERGEJOIN_45] (rows=401/480 width=4)
+                    Conds:SEL_43._col0=SEL_5._col0(Inner),Output:["_col0"]
                   <-Select Operator [SEL_5] (rows=242/242 width=4)
                       Output:["_col0"]
                       Filter Operator [FIL_33] (rows=242/242 width=4)
                         predicate:key is not null
                         TableScan [TS_3] (rows=242/242 width=4)
                           default@tab_n6,s3,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
-                  <-Select Operator [SEL_2] (rows=242/242 width=4)
+                  <-Select Operator [SEL_43] (rows=242/242 width=4)
                       Output:["_col0"]
-                      Filter Operator [FIL_32] (rows=242/242 width=4)
+                      Filter Operator [FIL_41] (rows=242/242 width=4)
                         predicate:key is not null
-                        TableScan [TS_0] (rows=242/242 width=4)
+                        TableScan [TS_39] (rows=242/242 width=4)
                           Output:["key"]
               <-Map 6 [CONTAINS] llap
-                Reduce Output Operator [RS_18]
+                Reduce Output Operator [RS_53]
                   PartitionCols:_col0
-                  Select Operator [SEL_12] (rows=242/242 width=4)
+                  Select Operator [SEL_51] (rows=242/242 width=4)
                     Output:["_col0"]
-                    Filter Operator [FIL_34] (rows=242/242 width=4)
+                    Filter Operator [FIL_50] (rows=242/242 width=4)
                       predicate:key is not null
-                      TableScan [TS_10] (rows=242/242 width=4)
+                      TableScan [TS_49] (rows=242/242 width=4)
                         Output:["key"]
 
 PREHOOK: query: select count(*) from (select s1.key as key, s1.value as value from tab_n6 s1 join tab_n6 s3 on s1.key=s3.key join tab_n6 s2 on s1.value=s2.value
@@ -950,18 +950,18 @@ Stage-0
                       default@tab_part_n7,b_n10,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
             <-Union 4 [SIMPLE_EDGE]
               <-Map 9 [CONTAINS] llap
-                Reduce Output Operator [RS_24]
+                Reduce Output Operator [RS_57]
                   PartitionCols:_col0
-                  Select Operator [SEL_18] (rows=242/242 width=4)
+                  Select Operator [SEL_55] (rows=242/242 width=4)
                     Output:["_col0"]
-                    Filter Operator [FIL_45] (rows=242/242 width=4)
+                    Filter Operator [FIL_54] (rows=242/242 width=4)
                       predicate:key is not null
-                      TableScan [TS_16] (rows=242/242 width=4)
+                      TableScan [TS_53] (rows=242/242 width=4)
                         Output:["key"]
               <-Reducer 3 [CONTAINS] llap
-                Reduce Output Operator [RS_24]
+                Reduce Output Operator [RS_52]
                   PartitionCols:_col0
-                  Merge Join Operator [MERGEJOIN_48] (rows=633/1166 width=4)
+                  Merge Join Operator [MERGEJOIN_50] (rows=633/1166 width=4)
                     Conds:RS_12._col0=RS_13._col0(Inner),Output:["_col0"]
                   <-Map 8 [SIMPLE_EDGE] llap
                     SHUFFLE [RS_13]
@@ -1135,28 +1135,28 @@ Stage-5
           Dependency Collection{}
             Stage-3
               Reducer 5 llap
-              File Output Operator [FS_5]
-                Group By Operator [GBY_3] (rows=1/1 width=880)
+              File Output Operator [FS_81]
+                Group By Operator [GBY_79] (rows=1/1 width=880)
                   Output:["_col0","_col1"],aggregations:["compute_stats(VALUE._col0, 'hll')","compute_stats(VALUE._col2, 'hll')"]
                 <-Union 4 [CUSTOM_SIMPLE_EDGE]
                   <-Reducer 12 [CONTAINS] llap
-                    File Output Operator [FS_75]
+                    File Output Operator [FS_167]
                       table:{"name:":"default.a_n14"}
-                      Select Operator [SEL_72] (rows=193/820 width=175)
+                      Select Operator [SEL_165] (rows=193/820 width=175)
                         Output:["_col0","_col1"]
-                        Merge Join Operator [MERGEJOIN_121] (rows=193/820 width=175)
+                        Merge Join Operator [MERGEJOIN_164] (rows=193/820 width=175)
                           Conds:RS_69._col1=Union 23._col0(Inner),Output:["_col0","_col3"]
                         <-Reducer 11 [SIMPLE_EDGE] llap
                           SHUFFLE [RS_69]
                             PartitionCols:_col1
-                            Merge Join Operator [MERGEJOIN_118] (rows=39/115 width=264)
+                            Merge Join Operator [MERGEJOIN_136] (rows=39/115 width=264)
                               Conds:RS_66._col0=RS_67._col0(Inner),Output:["_col0","_col1","_col3"]
                             <-Map 10 [SIMPLE_EDGE] llap
                               SHUFFLE [RS_66]
                                 PartitionCols:_col0
                                 Select Operator [SEL_5] (rows=25/25 width=175)
                                   Output:["_col0","_col1"]
-                                  Filter Operator [FIL_102] (rows=25/25 width=175)
+                                  Filter Operator [FIL_120] (rows=25/25 width=175)
                                     predicate:(key is not null and value is not null)
                                     TableScan [TS_3] (rows=25/25 width=175)
                                       default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
@@ -1165,83 +1165,83 @@ Stage-5
                                 PartitionCols:_col0
                                 Select Operator [SEL_51] (rows=25/25 width=175)
                                   Output:["_col0","_col1"]
-                                  Filter Operator [FIL_111] (rows=25/25 width=175)
+                                  Filter Operator [FIL_129] (rows=25/25 width=175)
                                     predicate:key is not null
                                     TableScan [TS_49] (rows=25/25 width=175)
                                       default@src1,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
                         <-Union 23 [SIMPLE_EDGE]
                           <-Map 22 [CONTAINS] llap
-                            Reduce Output Operator [RS_70]
+                            Reduce Output Operator [RS_205]
                               PartitionCols:_col0
-                              Select Operator [SEL_54] (rows=25/25 width=89)
+                              Select Operator [SEL_203] (rows=25/25 width=89)
                                 Output:["_col0"]
-                                Filter Operator [FIL_112] (rows=25/25 width=89)
+                                Filter Operator [FIL_202] (rows=25/25 width=89)
                                   predicate:value is not null
-                                  TableScan [TS_52] (rows=25/25 width=89)
+                                  TableScan [TS_201] (rows=25/25 width=89)
                                     Output:["value"]
                           <-Map 24 [CONTAINS] llap
-                            Reduce Output Operator [RS_70]
+                            Reduce Output Operator [RS_210]
                               PartitionCols:_col0
-                              Select Operator [SEL_57] (rows=500/500 width=91)
+                              Select Operator [SEL_208] (rows=500/500 width=91)
                                 Output:["_col0"]
-                                Filter Operator [FIL_113] (rows=500/500 width=91)
+                                Filter Operator [FIL_207] (rows=500/500 width=91)
                                   predicate:value is not null
-                                  TableScan [TS_55] (rows=500/500 width=91)
+                                  TableScan [TS_206] (rows=500/500 width=91)
                                     Output:["value"]
                           <-Map 25 [CONTAINS] llap
-                            Reduce Output Operator [RS_70]
+                            Reduce Output Operator [RS_215]
                               PartitionCols:_col0
-                              Select Operator [SEL_61] (rows=500/500 width=91)
+                              Select Operator [SEL_213] (rows=500/500 width=91)
                                 Output:["_col0"]
-                                Filter Operator [FIL_114] (rows=500/500 width=91)
+                                Filter Operator [FIL_212] (rows=500/500 width=91)
                                   predicate:value is not null
-                                  TableScan [TS_59] (rows=500/500 width=91)
+                                  TableScan [TS_211] (rows=500/500 width=91)
                                     Output:["value"]
                           <-Map 26 [CONTAINS] llap
-                            Reduce Output Operator [RS_70]
+                            Reduce Output Operator [RS_220]
                               PartitionCols:_col0
-                              Select Operator [SEL_64] (rows=500/500 width=91)
+                              Select Operator [SEL_218] (rows=500/500 width=91)
                                 Output:["_col0"]
-                                Filter Operator [FIL_115] (rows=500/500 width=91)
+                                Filter Operator [FIL_217] (rows=500/500 width=91)
                                   predicate:value is not null
-                                  TableScan [TS_62] (rows=500/500 width=91)
+                                  TableScan [TS_216] (rows=500/500 width=91)
                                     Output:["value"]
-                    Reduce Output Operator [RS_2]
-                      Select Operator [SEL_1] (rows=2899/6411 width=178)
+                    Reduce Output Operator [RS_173]
+                      Select Operator [SEL_168] (rows=2899/820 width=178)
                         Output:["key","value"]
-                         Please refer to the previous Select Operator [SEL_72]
-                    File Output Operator [FS_77]
+                         Please refer to the previous Select Operator [SEL_165]
+                    File Output Operator [FS_169]
                       table:{"name:":"default.b_n10"}
-                       Please refer to the previous Select Operator [SEL_72]
-                    Reduce Output Operator [RS_2]
-                      Select Operator [SEL_1] (rows=2899/6411 width=178)
+                       Please refer to the previous Select Operator [SEL_165]
+                    Reduce Output Operator [RS_174]
+                      Select Operator [SEL_170] (rows=2899/820 width=178)
                         Output:["key","value"]
-                         Please refer to the previous Select Operator [SEL_72]
-                    File Output Operator [FS_79]
+                         Please refer to the previous Select Operator [SEL_165]
+                    File Output Operator [FS_171]
                       table:{"name:":"default.c_n3"}
-                       Please refer to the previous Select Operator [SEL_72]
-                    Reduce Output Operator [RS_2]
-                      Select Operator [SEL_1] (rows=2899/6411 width=178)
+                       Please refer to the previous Select Operator [SEL_165]
+                    Reduce Output Operator [RS_175]
+                      Select Operator [SEL_172] (rows=2899/820 width=178)
                         Output:["key","value"]
-                         Please refer to the previous Select Operator [SEL_72]
+                         Please refer to the previous Select Operator [SEL_165]
                   <-Reducer 3 [CONTAINS] llap
-                    File Output Operator [FS_75]
+                    File Output Operator [FS_143]
                       table:{"name:":"default.a_n14"}
-                      Select Operator [SEL_20] (rows=66/170 width=177)
+                      Select Operator [SEL_141] (rows=66/170 width=177)
                         Output:["_col0","_col1"]
-                        Merge Join Operator [MERGEJOIN_119] (rows=66/170 width=177)
+                        Merge Join Operator [MERGEJOIN_140] (rows=66/170 width=177)
                           Conds:RS_17._col3=Union 14._col0(Inner),Output:["_col1","_col2"]
                         <-Reducer 2 [SIMPLE_EDGE] llap
                           SHUFFLE [RS_17]
                             PartitionCols:_col3
-                            Merge Join Operator [MERGEJOIN_116] (rows=39/37 width=266)
+                            Merge Join Operator [MERGEJOIN_134] (rows=39/37 width=266)
                               Conds:RS_14._col0=RS_15._col0(Inner),Output:["_col1","_col2","_col3"]
                             <-Map 1 [SIMPLE_EDGE] llap
                               SHUFFLE [RS_14]
                                 PartitionCols:_col0
                                 Select Operator [SEL_2] (rows=500/500 width=178)
                                   Output:["_col0","_col1"]
-                                  Filter Operator [FIL_101] (rows=500/500 width=178)
+                                  Filter Operator [FIL_119] (rows=500/500 width=178)
                                     predicate:key is not null
                                     TableScan [TS_0] (rows=500/500 width=178)
                                       default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
@@ -1251,59 +1251,59 @@ Stage-5
                                  Please refer to the previous Select Operator [SEL_5]
                         <-Union 14 [SIMPLE_EDGE]
                           <-Map 13 [CONTAINS] llap
-                            Reduce Output Operator [RS_18]
+                            Reduce Output Operator [RS_180]
                               PartitionCols:_col0
-                              Select Operator [SEL_8] (rows=25/25 width=89)
+                              Select Operator [SEL_178] (rows=25/25 width=89)
                                 Output:["_col0"]
-                                Filter Operator [FIL_103] (rows=25/25 width=89)
+                                Filter Operator [FIL_177] (rows=25/25 width=89)
                                   predicate:value is not null
-                                  TableScan [TS_6] (rows=25/25 width=89)
+                                  TableScan [TS_176] (rows=25/25 width=89)
                                     Output:["value"]
                           <-Map 15 [CONTAINS] llap
-                            Reduce Output Operator [RS_18]
+                            Reduce Output Operator [RS_185]
                               PartitionCols:_col0
-                              Select Operator [SEL_11] (rows=500/500 width=91)
+                              Select Operator [SEL_183] (rows=500/500 width=91)
                                 Output:["_col0"]
-                                Filter Operator [FIL_104] (rows=500/500 width=91)
+                                Filter Operator [FIL_182] (rows=500/500 width=91)
                                   predicate:value is not null
-                                  TableScan [TS_9] (rows=500/500 width=91)
+                                  TableScan [TS_181] (rows=500/500 width=91)
                                     Output:["value"]
-                    Reduce Output Operator [RS_2]
-                      Select Operator [SEL_1] (rows=2899/6411 width=178)
+                    Reduce Output Operator [RS_149]
+                      Select Operator [SEL_144] (rows=2899/170 width=178)
                         Output:["key","value"]
-                         Please refer to the previous Select Operator [SEL_20]
-                    File Output Operator [FS_77]
+                         Please refer to the previous Select Operator [SEL_141]
+                    File Output Operator [FS_145]
                       table:{"name:":"default.b_n10"}
-                       Please refer to the previous Select Operator [SEL_20]
-                    Reduce Output Operator [RS_2]
-                      Select Operator [SEL_1] (rows=2899/6411 width=178)
+                       Please refer to the previous Select Operator [SEL_141]
+                    Reduce Output Operator [RS_150]
+                      Select Operator [SEL_146] (rows=2899/170 width=178)
                         Output:["key","value"]
-                         Please refer to the previous Select Operator [SEL_20]
-                    File Output Operator [FS_79]
+                         Please refer to the previous Select Operator [SEL_141]
+                    File Output Operator [FS_147]
                       table:{"name:":"default.c_n3"}
-                       Please refer to the previous Select Operator [SEL_20]
-                    Reduce Output Operator [RS_2]
-                      Select Operator [SEL_1] (rows=2899/6411 width=178)
+                       Please refer to the previous Select Operator [SEL_141]
+                    Reduce Output Operator [RS_151]
+                      Select Operator [SEL_148] (rows=2899/170 width=178)
                         Output:["key","value"]
-                         Please refer to the previous Select Operator [SEL_20]
+                         Please refer to the previous Select Operator [SEL_141]
                   <-Reducer 9 [CONTAINS] llap
-                    File Output Operator [FS_75]
+                    File Output Operator [FS_155]
                       table:{"name:":"default.a_n14"}
-                      Select Operator [SEL_44] (rows=2640/5421 width=178)
+                      Select Operator [SEL_153] (rows=2640/5421 width=178)
                         Output:["_col0","_col1"]
-                        Merge Join Operator [MERGEJOIN_120] (rows=2640/5421 width=178)
+                        Merge Join Operator [MERGEJOIN_152] (rows=2640/5421 width=178)
                           Conds:RS_41._col1=Union 18._col0(Inner),Output:["_col0","_col3"]
                         <-Reducer 8 [SIMPLE_EDGE] llap
                           SHUFFLE [RS_41]
                             PartitionCols:_col1
-                            Merge Join Operator [MERGEJOIN_117] (rows=791/1028 width=269)
+                            Merge Join Operator [MERGEJOIN_135] (rows=791/1028 width=269)
                               Conds:RS_38._col0=RS_39._col0(Inner),Output:["_col0","_col1","_col3"]
                             <-Map 1 [SIMPLE_EDGE] llap
                               SHUFFLE [RS_38]
                                 PartitionCols:_col0
                                 Select Operator [SEL_23] (rows=500/500 width=178)
                                   Output:["_col0","_col1"]
-                                  Filter Operator [FIL_105] (rows=500/500 width=178)
+                                  Filter Operator [FIL_123] (rows=500/500 width=178)
                                     predicate:(key is not null and value is not null)
                                      Please refer to the previous TableScan [TS_0]
                             <-Map 16 [SIMPLE_EDGE] llap
@@ -1311,64 +1311,64 @@ Stage-5
                                 PartitionCols:_col0
                                 Select Operator [SEL_26] (rows=500/500 width=178)
                                   Output:["_col0","_col1"]
-                                  Filter Operator [FIL_106] (rows=500/500 width=178)
+                                  Filter Operator [FIL_124] (rows=500/500 width=178)
                                     predicate:key is not null
                                     TableScan [TS_24] (rows=500/500 width=178)
                                       default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
                         <-Union 18 [SIMPLE_EDGE]
                           <-Map 17 [CONTAINS] llap
-                            Reduce Output Operator [RS_42]
+                            Reduce Output Operator [RS_190]
                               PartitionCols:_col0
-                              Select Operator [SEL_29] (rows=25/25 width=89)
+                              Select Operator [SEL_188] (rows=25/25 width=89)
                                 Output:["_col0"]
-                                Filter Operator [FIL_107] (rows=25/25 width=89)
+                                Filter Operator [FIL_187] (rows=25/25 width=89)
                                   predicate:value is not null
-                                  TableScan [TS_27] (rows=25/25 width=89)
+                                  TableScan [TS_186] (rows=25/25 width=89)
                                     Output:["value"]
                           <-Map 19 [CONTAINS] llap
-                            Reduce Output Operator [RS_42]
+                            Reduce Output Operator [RS_195]
                               PartitionCols:_col0
-                              Select Operator [SEL_32] (rows=500/500 width=91)
+                              Select Operator [SEL_193] (rows=500/500 width=91)
                                 Output:["_col0"]
-                                Filter Operator [FIL_108] (rows=500/500 width=91)
+                                Filter Operator [FIL_192] (rows=500/500 width=91)
                                   predicate:value is not null
-                                  TableScan [TS_30] (rows=500/500 width=91)
+                                  TableScan [TS_191] (rows=500/500 width=91)
                                     Output:["value"]
                           <-Map 20 [CONTAINS] llap
-                            Reduce Output Operator [RS_42]
+                            Reduce Output Operator [RS_200]
                               PartitionCols:_col0
-                              Select Operator [SEL_36] (rows=500/500 width=91)
+                              Select Operator [SEL_198] (rows=500/500 width=91)
                                 Output:["_col0"]
-                                Filter Operator [FIL_109] (rows=500/500 width=91)
+                                Filter Operator [FIL_197] (rows=500/500 width=91)
                                   predicate:value is not null
-                                  TableScan [TS_34] (rows=500/500 width=91)
+                                  TableScan [TS_196] (rows=500/500 width=91)
                                     Output:["value"]
-                    Reduce Output Operator [RS_2]
-                      Select Operator [SEL_1] (rows=2899/6411 width=178)
+                    Reduce Output Operator [RS_161]
+                      Select Operator [SEL_156] (rows=2899/5421 width=178)
                         Output:["key","value"]
-                         Please refer to the previous Select Operator [SEL_44]
-                    File Output Operator [FS_77]
+                         Please refer to the previous Select Operator [SEL_153]
+                    File Output Operator [FS_157]
                       table:{"name:":"default.b_n10"}
-                       Please refer to the previous Select Operator [SEL_44]
-                    Reduce Output Operator [RS_2]
-                      Select Operator [SEL_1] (rows=2899/6411 width=178)
+                       Please refer to the previous Select Operator [SEL_153]
+                    Reduce Output Operator [RS_162]
+                      Select Operator [SEL_158] (rows=2899/5421 width=178)
                         Output:["key","value"]
-                         Please refer to the previous Select Operator [SEL_44]
-                    File Output Operator [FS_79]
+                         Please refer to the previous Select Operator [SEL_153]
+                    File Output Operator [FS_159]
                       table:{"name:":"default.c_n3"}
-                       Please refer to the previous Select Operator [SEL_44]
-                    Reduce Output Operator [RS_2]
-                      Select Operator [SEL_1] (rows=2899/6411 width=178)
+                       Please refer to the previous Select Operator [SEL_153]
+                    Reduce Output Operator [RS_163]
+                      Select Operator [SEL_160] (rows=2899/5421 width=178)
                         Output:["key","value"]
-                         Please refer to the previous Select Operator [SEL_44]
+                         Please refer to the previous Select Operator [SEL_153]
               Reducer 6 llap
-              File Output Operator [FS_5]
-                Group By Operator [GBY_3] (rows=1/1 width=880)
+              File Output Operator [FS_89]
+                Group By Operator [GBY_87] (rows=1/1 width=880)
                   Output:["_col0","_col1"],aggregations:["compute_stats(VALUE._col0, 'hll')","compute_stats(VALUE._col2, 'hll')"]
                 <- Please refer to the previous Union 4 [CUSTOM_SIMPLE_EDGE]
               Reducer 7 llap
-              File Output Operator [FS_5]
-                Group By Operator [GBY_3] (rows=1/1 width=880)
+              File Output Operator [FS_97]
+                Group By Operator [GBY_95] (rows=1/1 width=880)
                   Output:["_col0","_col1"],aggregations:["compute_stats(VALUE._col0, 'hll')","compute_stats(VALUE._col2, 'hll')"]
                 <- Please refer to the previous Union 4 [CUSTOM_SIMPLE_EDGE]
 Stage-6
@@ -1495,34 +1495,34 @@ Stage-5
           Dependency Collection{}
             Stage-3
               Reducer 10 llap
-              File Output Operator [FS_5]
-                Group By Operator [GBY_3] (rows=1/1 width=880)
+              File Output Operator [FS_137]
+                Group By Operator [GBY_135] (rows=1/1 width=880)
                   Output:["_col0","_col1"],aggregations:["compute_stats(VALUE._col0, 'hll')","compute_stats(VALUE._col2, 'hll')"]
                 <-Reducer 7 [CUSTOM_SIMPLE_EDGE] llap
-                  PARTITION_ONLY_SHUFFLE [RS_2]
-                    Select Operator [SEL_1] (rows=2899/319 width=178)
+                  PARTITION_ONLY_SHUFFLE [RS_134]
+                    Select Operator [SEL_133] (rows=2899/319 width=178)
                       Output:["key","value"]
                       Group By Operator [GBY_112] (rows=2899/319 width=178)
                         Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                       <-Union 6 [SIMPLE_EDGE]
                         <-Reducer 15 [CONTAINS] llap
-                          Reduce Output Operator [RS_111]
+                          Reduce Output Operator [RS_194]
                             PartitionCols:_col0, _col1
-                            Select Operator [SEL_107] (rows=193/304 width=175)
+                            Select Operator [SEL_192] (rows=193/304 width=175)
                               Output:["_col0","_col1"]
-                              Merge Join Operator [MERGEJOIN_161] (rows=193/304 width=175)
+                              Merge Join Operator [MERGEJOIN_191] (rows=193/304 width=175)
                                 Conds:RS_104._col1=RS_105._col1(Inner),Output:["_col0","_col3"]
                               <-Reducer 14 [SIMPLE_EDGE] llap
                                 SHUFFLE [RS_104]
                                   PartitionCols:_col1
-                                  Merge Join Operator [MERGEJOIN_158] (rows=39/115 width=264)
+                                  Merge Join Operator [MERGEJOIN_176] (rows=39/115 width=264)
                                     Conds:RS_101._col0=RS_102._col0(Inner),Output:["_col0","_col1","_col3"]
                                   <-Map 13 [SIMPLE_EDGE] llap
                                     SHUFFLE [RS_101]
                                       PartitionCols:_col0
                                       Select Operator [SEL_5] (rows=25/25 width=175)
                                         Output:["_col0","_col1"]
-                                        Filter Operator [FIL_142] (rows=25/25 width=175)
+                                        Filter Operator [FIL_160] (rows=25/25 width=175)
                                           predicate:(key is not null and value is not null)
                                           TableScan [TS_3] (rows=25/25 width=175)
                                             default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
@@ -1531,7 +1531,7 @@ Stage-5
                                       PartitionCols:_col0
                                       Select Operator [SEL_70] (rows=25/25 width=175)
                                         Output:["_col0","_col1"]
-                                        Filter Operator [FIL_151] (rows=25/25 width=175)
+                                        Filter Operator [FIL_169] (rows=25/25 width=175)
                                           predicate:key is not null
                                           TableScan [TS_68] (rows=25/25 width=175)
                                             default@src1,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
@@ -1544,81 +1544,81 @@ Stage-5
                                       Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                     <-Union 34 [SIMPLE_EDGE]
                                       <-Map 38 [CONTAINS] llap
-                                        Reduce Output Operator [RS_98]
+                                        Reduce Output Operator [RS_251]
                                           PartitionCols:_col1, _col0
-                                          Select Operator [SEL_94] (rows=500/500 width=178)
+                                          Select Operator [SEL_249] (rows=500/500 width=178)
                                             Output:["_col0","_col1"]
-                                            Filter Operator [FIL_155] (rows=500/500 width=178)
+                                            Filter Operator [FIL_248] (rows=500/500 width=178)
                                               predicate:value is not null
-                                              TableScan [TS_92] (rows=500/500 width=178)
+                                              TableScan [TS_247] (rows=500/500 width=178)
                                                 Output:["key","value"]
                                       <-Reducer 33 [CONTAINS] llap
-                                        Reduce Output Operator [RS_98]
+                                        Reduce Output Operator [RS_236]
                                           PartitionCols:_col1, _col0
-                                          Select Operator [SEL_91] (rows=1025/319 width=178)
+                                          Select Operator [SEL_234] (rows=1025/319 width=178)
                                             Output:["_col0","_col1"]
-                                            Group By Operator [GBY_90] (rows=1025/319 width=178)
+                                            Group By Operator [GBY_233] (rows=1025/319 width=178)
                                               Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                             <-Union 32 [SIMPLE_EDGE]
                                               <-Map 37 [CONTAINS] llap
-                                                Reduce Output Operator [RS_89]
+                                                Reduce Output Operator [RS_246]
                                                   PartitionCols:_col1, _col0
-                                                  Select Operator [SEL_85] (rows=500/500 width=178)
+                                                  Select Operator [SEL_244] (rows=500/500 width=178)
                                                     Output:["_col0","_col1"]
-                                                    Filter Operator [FIL_154] (rows=500/500 width=178)
+                                                    Filter Operator [FIL_243] (rows=500/500 width=178)
                                                       predicate:value is not null
-                                                      TableScan [TS_83] (rows=500/500 width=178)
+                                                      TableScan [TS_242] (rows=500/500 width=178)
                                                         Output:["key","value"]
                                               <-Reducer 31 [CONTAINS] llap
-                                                Reduce Output Operator [RS_89]
+                                                Reduce Output Operator [RS_232]
                                                   PartitionCols:_col1, _col0
-                                                  Select Operator [SEL_82] (rows=525/319 width=178)
+                                                  Select Operator [SEL_230] (rows=525/319 width=178)
                                                     Output:["_col0","_col1"]
-                                                    Group By Operator [GBY_81] (rows=525/319 width=178)
+                                                    Group By Operator [GBY_229] (rows=525/319 width=178)
                                                       Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                                     <-Union 30 [SIMPLE_EDGE]
                                                       <-Map 29 [CONTAINS] llap
-                                                        Reduce Output Operator [RS_80]
+                                                        Reduce Output Operator [RS_228]
                                                           PartitionCols:_col1, _col0
-                                                          Select Operator [SEL_73] (rows=25/25 width=175)
+                                                          Select Operator [SEL_226] (rows=25/25 width=175)
                                                             Output:["_col0","_col1"]
-                                                            Filter Operator [FIL_152] (rows=25/25 width=175)
+                                                            Filter Operator [FIL_225] (rows=25/25 width=175)
                                                               predicate:value is not null
-                                                              TableScan [TS_71] (rows=25/25 width=175)
+                                                              TableScan [TS_224] (rows=25/25 width=175)
                                                                 Output:["key","value"]
                                                       <-Map 36 [CONTAINS] llap
-                                                        Reduce Output Operator [RS_80]
+                                                        Reduce Output Operator [RS_241]
                                                           PartitionCols:_col1, _col0
-                                                          Select Operator [SEL_76] (rows=500/500 width=178)
+                                                          Select Operator [SEL_239] (rows=500/500 width=178)
                                                             Output:["_col0","_col1"]
-                                                            Filter Operator [FIL_153] (rows=500/500 width=178)
+                                                            Filter Operator [FIL_238] (rows=500/500 width=178)
                                                               predicate:value is not null
-                                                              TableScan [TS_74] (rows=500/500 width=178)
+                                                              TableScan [TS_237] (rows=500/500 width=178)
                                                                 Output:["key","value"]
                         <-Reducer 5 [CONTAINS] llap
-                          Reduce Output Operator [RS_111]
+                          Reduce Output Operator [RS_186]
                             PartitionCols:_col0, _col1
-                            Group By Operator [GBY_63] (rows=2706/309 width=178)
+                            Group By Operator [GBY_184] (rows=2706/309 width=178)
                               Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                             <-Union 4 [SIMPLE_EDGE]
                               <-Reducer 12 [CONTAINS] llap
-                                Reduce Output Operator [RS_62]
+                                Reduce Output Operator [RS_190]
                                   PartitionCols:_col0, _col1
-                                  Select Operator [SEL_58] (rows=2640/1056 width=178)
+                                  Select Operator [SEL_188] (rows=2640/1056 width=178)
                                     Output:["_col0","_col1"]
-                                    Merge Join Operator [MERGEJOIN_160] (rows=2640/1056 width=178)
+                                    Merge Join Operator [MERGEJOIN_187] (rows=2640/1056 width=178)
                                       Conds:RS_55._col1=RS_56._col1(Inner),Output:["_col0","_col3"]
                                     <-Reducer 11 [SIMPLE_EDGE] llap
                                       SHUFFLE [RS_55]
                                         PartitionCols:_col1
-                                        Merge Join Operator [MERGEJOIN_157] (rows=791/1028 width=269)
+                                        Merge Join Operator [MERGEJOIN_175] (rows=791/1028 width=269)
                                           Conds:RS_52._col0=RS_53._col0(Inner),Output:["_col0","_col1","_col3"]
                                         <-Map 1 [SIMPLE_EDGE] llap
                                           SHUFFLE [RS_52]
                                             PartitionCols:_col0
                                             Select Operator [SEL_27] (rows=500/500 width=178)
                                               Output:["_col0","_col1"]
-                                              Filter Operator [FIL_145] (rows=500/500 width=178)
+                                              Filter Operator [FIL_163] (rows=500/500 width=178)
                                                 predicate:(key is not null and value is not null)
                                                 TableScan [TS_0] (rows=500/500 width=178)
                                                   default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
@@ -1627,7 +1627,7 @@ Stage-5
                                             PartitionCols:_col0
                                             Select Operator [SEL_30] (rows=500/500 width=178)
                                               Output:["_col0","_col1"]
-                                              Filter Operator [FIL_146] (rows=500/500 width=178)
+                                              Filter Operator [FIL_164] (rows=500/500 width=178)
                                                 predicate:key is not null
                                                 TableScan [TS_28] (rows=500/500 width=178)
                                                   default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
@@ -1640,46 +1640,46 @@ Stage-5
                                             Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                           <-Union 24 [SIMPLE_EDGE]
                                             <-Map 27 [CONTAINS] llap
-                                              Reduce Output Operator [RS_49]
+                                              Reduce Output Operator [RS_223]
                                                 PartitionCols:_col1, _col0
-                                                Select Operator [SEL_45] (rows=500/500 width=178)
+                                                Select Operator [SEL_221] (rows=500/500 width=178)
                                                   Output:["_col0","_col1"]
-                                                  Filter Operator [FIL_149] (rows=500/500 width=178)
+                                                  Filter Operator [FIL_220] (rows=500/500 width=178)
                                                     predicate:value is not null
-                                                    TableScan [TS_43] (rows=500/500 width=178)
+                                                    TableScan [TS_219] (rows=500/500 width=178)
                                                       Output:["key","value"]
                                             <-Reducer 23 [CONTAINS] llap
-                                              Reduce Output Operator [RS_49]
+                                              Reduce Output Operator [RS_213]
                                                 PartitionCols:_col1, _col0
-                                                Select Operator [SEL_42] (rows=525/319 width=178)
+                                                Select Operator [SEL_211] (rows=525/319 width=178)
                                                   Output:["_col0","_col1"]
-                                                  Group By Operator [GBY_41] (rows=525/319 width=178)
+                                                  Group By Operator [GBY_210] (rows=525/319 width=178)
                                                     Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                                   <-Union 22 [SIMPLE_EDGE]
                                                     <-Map 21 [CONTAINS] llap
-                                                      Reduce Output Operator [RS_40]
+                                                      Reduce Output Operator [RS_209]
                                                         PartitionCols:_col1, _col0
-                                                        Select Operator [SEL_33] (rows=25/25 width=175)
+                                                        Select Operator [SEL_207] (rows=25/25 width=175)
                                                           Output:["_col0","_col1"]
-                                                          Filter Operator [FIL_147] (rows=25/25 width=175)
+                                                          Filter Operator [FIL_206] (rows=25/25 width=175)
                                                             predicate:value is not null
-                                                            TableScan [TS_31] (rows=25/25 width=175)
+                                                            TableScan [TS_205] (rows=25/25 width=175)
                                                               Output:["key","value"]
                                                     <-Map 26 [CONTAINS] llap
-                                                      Reduce Output Operator [RS_40]
+                                                      Reduce Output Operator [RS_218]
                                                         PartitionCols:_col1, _col0
-                                                        Select Operator [SEL_36] (rows=500/500 width=178)
+                                                        Select Operator [SEL_216] (rows=500/500 width=178)
                                                           Output:["_col0","_col1"]
-                                                          Filter Operator [FIL_148] (rows=500/500 width=178)
+                                                          Filter Operator [FIL_215] (rows=500/500 width=178)
                                                             predicate:value is not null
-                                                            TableScan [TS_34] (rows=500/500 width=178)
+                                                            TableScan [TS_214] (rows=500/500 width=178)
                                                               Output:["key","value"]
                               <-Reducer 3 [CONTAINS] llap
-                                Reduce Output Operator [RS_62]
+                                Reduce Output Operator [RS_183]
                                   PartitionCols:_col0, _col1
-                                  Select Operator [SEL_24] (rows=66/61 width=177)
+                                  Select Operator [SEL_181] (rows=66/61 width=177)
                                     Output:["_col0","_col1"]
-                                    Merge Join Operator [MERGEJOIN_159] (rows=66/61 width=177)
+                                    Merge Join Operator [MERGEJOIN_180] (rows=66/61 width=177)
                                       Conds:RS_21._col3=RS_22._col1(Inner),Output:["_col1","_col2"]
                                     <-Reducer 18 [SIMPLE_EDGE] llap
                                       SHUFFLE [RS_22]
@@ -1690,34 +1690,34 @@ Stage-5
                                             Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                           <-Union 17 [SIMPLE_EDGE]
                                             <-Map 16 [CONTAINS] llap
-                                              Reduce Output Operator [RS_15]
+                                              Reduce Output Operator [RS_199]
                                                 PartitionCols:_col1, _col0
-                                                Select Operator [SEL_8] (rows=25/25 width=175)
+                                                Select Operator [SEL_197] (rows=25/25 width=175)
                                                   Output:["_col0","_col1"]
-                                                  Filter Operator [FIL_143] (rows=25/25 width=175)
+                                                  Filter Operator [FIL_196] (rows=25/25 width=175)
                                                     predicate:value is not null
-                                                    TableScan [TS_6] (rows=25/25 width=175)
+                                                    TableScan [TS_195] (rows=25/25 width=175)
                                                       Output:["key","value"]
                                             <-Map 19 [CONTAINS] llap
-                                              Reduce Output Operator [RS_15]
+                                              Reduce Output Operator [RS_204]
                                                 PartitionCols:_col1, _col0
-                                                Select Operator [SEL_11] (rows=500/500 width=178)
+                                                Select Operator [SEL_202] (rows=500/500 width=178)
                                                   Output:["_col0","_col1"]
-                                                  Filter Operator [FIL_144] (rows=500/500 width=178)
+                                                  Filter Operator [FIL_201] (rows=500/500 width=178)
                                                     predicate:value is not null
-                                                    TableScan [TS_9] (rows=500/500 width=178)
+                                                    TableScan [TS_200] (rows=500/500 width=178)
                                                       Output:["key","value"]
                                     <-Reducer 2 [SIMPLE_EDGE] llap
                                       SHUFFLE [RS_21]
                                         PartitionCols:_col3
-                                        Merge Join Operator [MERGEJOIN_156] (rows=39/37 width=266)
+                                        Merge Join Operator [MERGEJOIN_174] (rows=39/37 width=266)
                                           Conds:RS_18._col0=RS_19._col0(Inner),Output:["_col1","_col2","_col3"]
                                         <-Map 1 [SIMPLE_EDGE] llap
                                           SHUFFLE [RS_18]
                                             PartitionCols:_col0
                                             Select Operator [SEL_2] (rows=500/500 width=178)
                                               Output:["_col0","_col1"]
-                                              Filter Operator [FIL_141] (rows=500/500 width=178)
+                                              Filter Operator [FIL_159] (rows=500/500 width=178)
                                                 predicate:key is not null
                                                  Please refer to the previous TableScan [TS_0]
                                         <-Map 13 [SIMPLE_EDGE] llap
@@ -1725,21 +1725,21 @@ Stage-5
                                             PartitionCols:_col0
                                              Please refer to the previous Select Operator [SEL_5]
               Reducer 8 llap
-              File Output Operator [FS_5]
-                Group By Operator [GBY_3] (rows=1/1 width=880)
+              File Output Operator [FS_121]
+                Group By Operator [GBY_119] (rows=1/1 width=880)
                   Output:["_col0","_col1"],aggregations:["compute_stats(VALUE._col0, 'hll')","compute_stats(VALUE._col2, 'hll')"]
                 <-Reducer 7 [CUSTOM_SIMPLE_EDGE] llap
-                  PARTITION_ONLY_SHUFFLE [RS_2]
-                    Select Operator [SEL_1] (rows=2899/319 width=178)
+                  PARTITION_ONLY_SHUFFLE [RS_118]
+                    Select Operator [SEL_117] (rows=2899/319 width=178)
                       Output:["key","value"]
                        Please refer to the previous Group By Operator [GBY_112]
               Reducer 9 llap
-              File Output Operator [FS_5]
-                Group By Operator [GBY_3] (rows=1/1 width=880)
+              File Output Operator [FS_129]
+                Group By Operator [GBY_127] (rows=1/1 width=880)
                   Output:["_col0","_col1"],aggregations:["compute_stats(VALUE._col0, 'hll')","compute_stats(VALUE._col2, 'hll')"]
                 <-Reducer 7 [CUSTOM_SIMPLE_EDGE] llap
-                  PARTITION_ONLY_SHUFFLE [RS_2]
-                    Select Operator [SEL_1] (rows=2899/319 width=178)
+                  PARTITION_ONLY_SHUFFLE [RS_126]
+                    Select Operator [SEL_125] (rows=2899/319 width=178)
                       Output:["key","value"]
                        Please refer to the previous Group By Operator [GBY_112]
 Stage-6
@@ -1822,8 +1822,8 @@ Stage-4
           Dependency Collection{}
             Stage-2
               Reducer 6 llap
-              File Output Operator [FS_5]
-                Group By Operator [GBY_3] (rows=1/2 width=880)
+              File Output Operator [FS_24]
+                Group By Operator [GBY_22] (rows=1/1 width=880)
                   Output:["_col0","_col1"],aggregations:["compute_stats(VALUE._col0, 'hll')","compute_stats(VALUE._col2, 'hll')"]
                 <-Reducer 5 [CUSTOM_SIMPLE_EDGE] llap
                   File Output Operator [FS_18]
@@ -1839,39 +1839,39 @@ Stage-4
                             Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                           <-Union 3 [SIMPLE_EDGE]
                             <-Map 8 [CONTAINS] llap
-                              Reduce Output Operator [RS_10]
+                              Reduce Output Operator [RS_44]
                                 PartitionCols:_col0, _col1
-                                Select Operator [SEL_6] (rows=500/500 width=178)
+                                Select Operator [SEL_42] (rows=500/500 width=178)
                                   Output:["_col0","_col1"]
-                                  TableScan [TS_5] (rows=500/500 width=178)
+                                  TableScan [TS_41] (rows=500/500 width=178)
                                     Output:["key","value"]
                             <-Reducer 2 [CONTAINS] llap
-                              Reduce Output Operator [RS_10]
+                              Reduce Output Operator [RS_40]
                                 PartitionCols:_col0, _col1
-                                Select Operator [SEL_4] (rows=1/1 width=272)
+                                Select Operator [SEL_38] (rows=1/1 width=272)
                                   Output:["_col0","_col1"]
-                                  Group By Operator [GBY_3] (rows=1/2 width=8)
+                                  Group By Operator [GBY_37] (rows=1/1 width=8)
                                     Output:["_col0"],aggregations:["count()"]
                                   <-Map 1 [CUSTOM_SIMPLE_EDGE] llap
                                     PARTITION_ONLY_SHUFFLE [RS_2]
-                                      Select Operator [SEL_1] (rows=500/310 width=10)
+                                      Select Operator [SEL_1] (rows=500/500 width=10)
                                         TableScan [TS_0] (rows=500/500 width=10)
                                           default@src,s1,Tbl:COMPLETE,Col:COMPLETE
-                  PARTITION_ONLY_SHUFFLE [RS_2]
-                    Select Operator [SEL_1] (rows=316/310 width=272)
+                  PARTITION_ONLY_SHUFFLE [RS_21]
+                    Select Operator [SEL_20] (rows=316/310 width=272)
                       Output:["key","value"]
                        Please refer to the previous Select Operator [SEL_16]
               Reducer 7 llap
-              File Output Operator [FS_5]
-                Group By Operator [GBY_3] (rows=1/2 width=1320)
+              File Output Operator [FS_36]
+                Group By Operator [GBY_34] (rows=1/1 width=1320)
                   Output:["_col0","_col1","_col2"],aggregations:["compute_stats(VALUE._col0, 'hll')","compute_stats(VALUE._col2, 'hll')","compute_stats(VALUE._col3, 'hll')"]
                 <-Reducer 4 [CUSTOM_SIMPLE_EDGE] llap
-                  PARTITION_ONLY_SHUFFLE [RS_2]
-                    Select Operator [SEL_1] (rows=501/310 width=456)
+                  PARTITION_ONLY_SHUFFLE [RS_33]
+                    Select Operator [SEL_32] (rows=501/310 width=456)
                       Output:["key","val1","val2"]
-                      Select Operator [SEL_22] (rows=501/310 width=456)
+                      Select Operator [SEL_28] (rows=501/310 width=456)
                         Output:["_col0","_col1","_col2"]
-                        Group By Operator [GBY_21] (rows=501/310 width=280)
+                        Group By Operator [GBY_27] (rows=501/310 width=280)
                           Output:["_col0","_col1","_col2"],aggregations:["count(DISTINCT substr(_col1, 5))"],keys:_col0, _col1
                            Please refer to the previous Group By Operator [GBY_11]
 Stage-5
@@ -2012,8 +2012,8 @@ Stage-4
           Dependency Collection{}
             Stage-2
               Reducer 5 llap
-              File Output Operator [FS_5]
-                Group By Operator [GBY_3] (rows=1/2 width=880)
+              File Output Operator [FS_22]
+                Group By Operator [GBY_20] (rows=1/1 width=880)
                   Output:["_col0","_col1"],aggregations:["compute_stats(VALUE._col0, 'hll')","compute_stats(VALUE._col2, 'hll')"]
                 <-Reducer 4 [CUSTOM_SIMPLE_EDGE] llap
                   File Output Operator [FS_16]
@@ -2024,60 +2024,60 @@ Stage-4
                         Output:["_col0","_col1"],aggregations:["count(DISTINCT KEY._col1:0._col0)"],keys:KEY._col0
                       <-Union 3 [SIMPLE_EDGE]
                         <-Map 8 [CONTAINS] llap
-                          Reduce Output Operator [RS_12]
+                          Reduce Output Operator [RS_43]
                             PartitionCols:_col0
-                            Select Operator [SEL_6] (rows=500/500 width=178)
+                            Select Operator [SEL_41] (rows=500/500 width=178)
                               Output:["_col0","_col1"]
-                              TableScan [TS_5] (rows=500/500 width=178)
+                              TableScan [TS_40] (rows=500/500 width=178)
                                 Output:["key","value"]
-                          Reduce Output Operator [RS_18]
+                          Reduce Output Operator [RS_44]
                             PartitionCols:_col0, _col1
-                             Please refer to the previous Select Operator [SEL_6]
+                             Please refer to the previous Select Operator [SEL_41]
                         <-Map 9 [CONTAINS] llap
-                          Reduce Output Operator [RS_12]
+                          Reduce Output Operator [RS_48]
                             PartitionCols:_col0
-                            Select Operator [SEL_9] (rows=500/500 width=178)
+                            Select Operator [SEL_46] (rows=500/500 width=178)
                               Output:["_col0","_col1"]
-                              TableScan [TS_8] (rows=500/500 width=178)
+                              TableScan [TS_45] (rows=500/500 width=178)
                                 Output:["key","value"]
-                          Reduce Output Operator [RS_18]
+                          Reduce Output Operator [RS_49]
                             PartitionCols:_col0, _col1
-                             Please refer to the previous Select Operator [SEL_9]
+                             Please refer to the previous Select Operator [SEL_46]
                         <-Reducer 2 [CONTAINS] llap
-                          Reduce Output Operator [RS_12]
+                          Reduce Output Operator [RS_38]
                             PartitionCols:_col0
-                            Select Operator [SEL_4] (rows=1/1 width=272)
+                            Select Operator [SEL_36] (rows=1/1 width=272)
                               Output:["_col0","_col1"]
-                              Group By Operator [GBY_3] (rows=1/2 width=8)
+                              Group By Operator [GBY_35] (rows=1/1 width=8)
                                 Output:["_col0"],aggregations:["count()"]
                               <-Map 1 [CUSTOM_SIMPLE_EDGE] llap
                                 PARTITION_ONLY_SHUFFLE [RS_2]
-                                  Select Operator [SEL_1] (rows=500/310 width=10)
+                                  Select Operator [SEL_1] (rows=500/500 width=10)
                                     TableScan [TS_0] (rows=500/500 width=10)
                                       default@src,s1,Tbl:COMPLETE,Col:COMPLETE
-                          Reduce Output Operator [RS_18]
+                          Reduce Output Operator [RS_39]
                             PartitionCols:_col0, _col1
-                             Please refer to the previous Select Operator [SEL_4]
-                  PARTITION_ONLY_SHUFFLE [RS_2]
-                    Select Operator [SEL_1] (rows=316/310 width=272)
+                             Please refer to the previous Select Operator [SEL_36]
+                  PARTITION_ONLY_SHUFFLE [RS_19]
+                    Select Operator [SEL_18] (rows=316/310 width=272)
                       Output:["key","value"]
                        Please refer to the previous Select Operator [SEL_14]
               Reducer 7 llap
-              File Output Operator [FS_5]
-                Group By Operator [GBY_3] (rows=1/2 width=1320)
+              File Output Operator [FS_34]
+                Group By Operator [GBY_32] (rows=1/1 width=1320)
                   Output:["_col0","_col1","_col2"],aggregations:["compute_stats(VALUE._col0, 'hll')","compute_stats(VALUE._col2, 'hll')","compute_stats(VALUE._col3, 'hll')"]
                 <-Reducer 6 [CUSTOM_SIMPLE_EDGE] llap
-                  File Output Operator [FS_22]
+                  File Output Operator [FS_28]
                     table:{"name:":"default.dest2_n29"}
-                    Select Operator [SEL_20] (rows=1001/310 width=456)
+                    Select Operator [SEL_26] (rows=1001/310 width=456)
                       Output:["_col0","_col1","_col2"]
-                      Group By Operator [GBY_19] (rows=1001/310 width=280)
+                      Group By Operator [GBY_25] (rows=1001/310 width=280)
                         Output:["_col0","_col1","_col2"],aggregations:["count(DISTINCT KEY._col2:0._col0)"],keys:KEY._col0, KEY._col1
                       <- Please refer to the previous Union 3 [SIMPLE_EDGE]
-                  PARTITION_ONLY_SHUFFLE [RS_2]
-                    Select Operator [SEL_1] (rows=1001/310 width=456)
+                  PARTITION_ONLY_SHUFFLE [RS_31]
+                    Select Operator [SEL_30] (rows=1001/310 width=456)
                       Output:["key","val1","val2"]
-                       Please refer to the previous Select Operator [SEL_20]
+                       Please refer to the previous Select Operator [SEL_26]
 Stage-5
   Stats Work{}
     Stage-1
@@ -2148,8 +2148,8 @@ Stage-4
           Dependency Collection{}
             Stage-2
               Reducer 5 llap
-              File Output Operator [FS_5]
-                Group By Operator [GBY_3] (rows=1/2 width=880)
+              File Output Operator [FS_20]
+                Group By Operator [GBY_18] (rows=1/1 width=880)
                   Output:["_col0","_col1"],aggregations:["compute_stats(VALUE._col0, 'hll')","compute_stats(VALUE._col2, 'hll')"]
                 <-Reducer 4 [CUSTOM_SIMPLE_EDGE] llap
                   File Output Operator [FS_14]
@@ -2160,50 +2160,50 @@ Stage-4
                         Output:["_col0","_col1"],aggregations:["count(DISTINCT KEY._col1:0._col0)"],keys:KEY._col0
                       <-Union 3 [SIMPLE_EDGE]
                         <-Map 8 [CONTAINS] llap
-                          Reduce Output Operator [RS_10]
+                          Reduce Output Operator [RS_41]
                             PartitionCols:_col0
-                            Select Operator [SEL_6] (rows=500/500 width=178)
+                            Select Operator [SEL_39] (rows=500/500 width=178)
                               Output:["_col0","_col1"]
-                              TableScan [TS_5] (rows=500/500 width=178)
+                              TableScan [TS_38] (rows=500/500 width=178)
                                 Output:["key","value"]
-                          Reduce Output Operator [RS_16]
+                          Reduce Output Operator [RS_42]
                             PartitionCols:_col0, _col1
-                             Please refer to the previous Select Operator [SEL_6]
+                             Please refer to the previous Select Operator [SEL_39]
                         <-Reducer 2 [CONTAINS] llap
-                          Reduce Output Operator [RS_10]
+                          Reduce Output Operator [RS_36]
                             PartitionCols:_col0
-                            Select Operator [SEL_4] (rows=1/1 width=272)
+                            Select Operator [SEL_34] (rows=1/1 width=272)
                               Output:["_col0","_col1"]
-                              Group By Operator [GBY_3] (rows=1/2 width=8)
+                              Group By Operator [GBY_33] (rows=1/1 width=8)
                                 Output:["_col0"],aggregations:["count()"]
                               <-Map 1 [CUSTOM_SIMPLE_EDGE] llap
                                 PARTITION_ONLY_SHUFFLE [RS_2]
-                                  Select Operator [SEL_1] (rows=500/310 width=10)
+                                  Select Operator [SEL_1] (rows=500/500 width=10)
                                     TableScan [TS_0] (rows=500/500 width=10)
                                       default@src,s1,Tbl:COMPLETE,Col:COMPLETE
-                          Reduce Output Operator [RS_16]
+                          Reduce Output Operator [RS_37]
                             PartitionCols:_col0, _col1
-                             Please refer to the previous Select Operator [SEL_4]
-                  PARTITION_ONLY_SHUFFLE [RS_2]
-                    Select Operator [SEL_1] (rows=316/310 width=272)
+                             Please refer to the previous Select Operator [SEL_34]
+                  PARTITION_ONLY_SHUFFLE [RS_17]
+                    Select Operator [SEL_16] (rows=316/310 width=272)
                       Output:["key","value"]
                        Please refer to the previous Select Operator [SEL_12]
               Reducer 7 llap
-              File Output Operator [FS_5]
-                Group By Operator [GBY_3] (rows=1/2 width=1320)
+              File Output Operator [FS_32]
+                Group By Operator [GBY_30] (rows=1/1 width=1320)
                   Output:["_col0","_col1","_col2"],aggregations:["compute_stats(VALUE._col0, 'hll')","compute_stats(VALUE._col2, 'hll')","compute_stats(VALUE._col3, 'hll')"]
                 <-Reducer 6 [CUSTOM_SIMPLE_EDGE] llap
-                  File Output Operator [FS_20]
+                  File Output Operator [FS_26]
                     table:{"name:":"default.dest2_n29"}
-                    Select Operator [SEL_18] (rows=501/310 width=456)
+                    Select Operator [SEL_24] (rows=501/310 width=456)
                       Output:["_col0","_col1","_col2"]
-                      Group By Operator [GBY_17] (rows=501/310 width=280)
+                      Group By Operator [GBY_23] (rows=501/310 width=280)
                         Output:["_col0","_col1","_col2"],aggregations:["count(DISTINCT KEY._col2:0._col0)"],keys:KEY._col0, KEY._col1
                       <- Please refer to the previous Union 3 [SIMPLE_EDGE]
-                  PARTITION_ONLY_SHUFFLE [RS_2]
-                    Select Operator [SEL_1] (rows=501/310 width=456)
+                  PARTITION_ONLY_SHUFFLE [RS_29]
+                    Select Operator [SEL_28] (rows=501/310 width=456)
                       Output:["key","val1","val2"]
-                       Please refer to the previous Select Operator [SEL_18]
+                       Please refer to the previous Select Operator [SEL_24]
 Stage-5
   Stats Work{}
     Stage-1


[14/14] hive git commit: HIVE-16505: Support "unknown" boolean truth value (Laszlo Bodor via Zoltan Haindrich)

Posted by kg...@apache.org.
HIVE-16505: Support "unknown" boolean truth value (Laszlo Bodor via Zoltan Haindrich)

Signed-off-by: Zoltan Haindrich <ki...@rxd.hu>


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

Branch: refs/heads/master
Commit: f37fef06f37a4bc5931eb6c9e63b48d2ae1182a6
Parents: 2842f88
Author: Laszlo Bodor <bo...@gmail.com>
Authored: Mon Jun 11 08:31:37 2018 +0200
Committer: Zoltan Haindrich <ki...@rxd.hu>
Committed: Mon Jun 11 08:31:37 2018 +0200

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/ql/parse/HiveLexer.g |  1 +
 .../apache/hadoop/hive/ql/parse/HiveParser.g    |  2 +
 .../hadoop/hive/ql/parse/IdentifiersParser.g    |  5 +-
 .../test/queries/clientpositive/bool_unknown.q  | 10 +++
 .../results/clientpositive/bool_unknown.q.out   | 65 ++++++++++++++++++++
 5 files changed, 82 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/f37fef06/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g b/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g
index d4b5782..43ad7dd 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g
@@ -43,6 +43,7 @@ import org.apache.hadoop.hive.conf.HiveConf;
 
 KW_TRUE : 'TRUE';
 KW_FALSE : 'FALSE';
+KW_UNKNOWN : 'UNKNOWN';
 KW_ALL : 'ALL';
 KW_NONE: 'NONE';
 KW_AND : 'AND';

http://git-wip-us.apache.org/repos/asf/hive/blob/f37fef06/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g b/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g
index d4a0ed3..324c804 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g
@@ -69,6 +69,7 @@ TOK_OP_NOT;
 TOK_OP_LIKE;
 TOK_TRUE;
 TOK_FALSE;
+TOK_UNKNOWN;
 TOK_TRANSFORM;
 TOK_SERDE;
 TOK_SERDENAME;
@@ -451,6 +452,7 @@ import org.apache.hadoop.hive.conf.HiveConf;
     // Keywords
     xlateMap.put("KW_TRUE", "TRUE");
     xlateMap.put("KW_FALSE", "FALSE");
+    xlateMap.put("KW_UNKNOWN", "UNKNOWN");
     xlateMap.put("KW_ALL", "ALL");
     xlateMap.put("KW_NONE", "NONE");
     xlateMap.put("KW_AND", "AND");

http://git-wip-us.apache.org/repos/asf/hive/blob/f37fef06/ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g b/ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g
index 55bd92d..7dc6146 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g
@@ -450,9 +450,11 @@ isCondition
     : KW_NULL -> Identifier["isnull"]
     | KW_TRUE -> Identifier["istrue"]
     | KW_FALSE -> Identifier["isfalse"]
+    | KW_UNKNOWN -> Identifier["isnull"]
     | KW_NOT KW_NULL -> Identifier["isnotnull"]
     | KW_NOT KW_TRUE -> Identifier["isnottrue"]
     | KW_NOT KW_FALSE -> Identifier["isnotfalse"]
+    | KW_NOT KW_UNKNOWN -> Identifier["isnotnull"]
     ;
 
 precedenceUnaryPrefixExpression
@@ -663,7 +665,7 @@ precedenceOrExpression
 
 booleanValue
     :
-    KW_TRUE^ | KW_FALSE^
+    KW_TRUE^ | KW_FALSE^ | KW_UNKNOWN^
     ;
 
 booleanValueTok
@@ -835,6 +837,7 @@ nonReserved
     | KW_REOPTIMIZATION
     | KW_RESOURCE | KW_PLAN | KW_PLANS | KW_QUERY_PARALLELISM | KW_ACTIVATE | KW_MOVE | KW_DO
     | KW_POOL | KW_ALLOC_FRACTION | KW_SCHEDULING_POLICY | KW_PATH | KW_MAPPING | KW_WORKLOAD | KW_MANAGEMENT | KW_ACTIVE | KW_UNMANAGED
+    | KW_UNKNOWN
 
 ;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/f37fef06/ql/src/test/queries/clientpositive/bool_unknown.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/bool_unknown.q b/ql/src/test/queries/clientpositive/bool_unknown.q
new file mode 100644
index 0000000..159bab3
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/bool_unknown.q
@@ -0,0 +1,10 @@
+select assert_true(null is unknown);
+
+select assert_true(true is not unknown);
+select assert_true(false is not unknown);
+
+select assert_true((null = null) is unknown);
+select assert_true((null = false) is unknown);
+select assert_true((null = true) is unknown);
+
+select assert_true((select cast(null as boolean)) is unknown);

http://git-wip-us.apache.org/repos/asf/hive/blob/f37fef06/ql/src/test/results/clientpositive/bool_unknown.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bool_unknown.q.out b/ql/src/test/results/clientpositive/bool_unknown.q.out
new file mode 100644
index 0000000..8e9b48c
--- /dev/null
+++ b/ql/src/test/results/clientpositive/bool_unknown.q.out
@@ -0,0 +1,65 @@
+PREHOOK: query: select assert_true(null is unknown)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
+POSTHOOK: query: select assert_true(null is unknown)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
+NULL
+PREHOOK: query: select assert_true(true is not unknown)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
+POSTHOOK: query: select assert_true(true is not unknown)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
+NULL
+PREHOOK: query: select assert_true(false is not unknown)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
+POSTHOOK: query: select assert_true(false is not unknown)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
+NULL
+PREHOOK: query: select assert_true((null = null) is unknown)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
+POSTHOOK: query: select assert_true((null = null) is unknown)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
+NULL
+PREHOOK: query: select assert_true((null = false) is unknown)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
+POSTHOOK: query: select assert_true((null = false) is unknown)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
+NULL
+PREHOOK: query: select assert_true((null = true) is unknown)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
+POSTHOOK: query: select assert_true((null = true) is unknown)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
+NULL
+Warning: Shuffle Join JOIN[17][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Stage-2:MAPRED' is a cross product
+Warning: Shuffle Join JOIN[14][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
+PREHOOK: query: select assert_true((select cast(null as boolean)) is unknown)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
+POSTHOOK: query: select assert_true((select cast(null as boolean)) is unknown)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
+NULL


[06/14] hive git commit: HIVE-19237: Only use an operatorId once in a plan (Zoltan Haindrich reviewed by Ashutosh Chauhan)

Posted by kg...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query2.q.out b/ql/src/test/results/clientpositive/perf/tez/query2.q.out
index 61776db..f964747 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query2.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query2.q.out
@@ -133,8 +133,8 @@ Stage-0
     limit:-1
     Stage-1
       Reducer 7 vectorized
-      File Output Operator [FS_112]
-        Select Operator [SEL_111] (rows=287491028 width=135)
+      File Output Operator [FS_122]
+        Select Operator [SEL_121] (rows=287491028 width=135)
           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
         <-Reducer 6 [SIMPLE_EDGE]
           SHUFFLE [RS_58]
@@ -146,20 +146,20 @@ Stage-0
                 FORWARD [RS_54]
                   PartitionCols:_col0
                   Merge Join Operator [MERGEJOIN_92] (rows=261355475 width=135)
-                    Conds:RS_103._col0=RS_109._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+                    Conds:RS_113._col0=RS_119._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                   <-Map 11 [SIMPLE_EDGE] vectorized
-                    SHUFFLE [RS_109]
+                    SHUFFLE [RS_119]
                       PartitionCols:_col0
-                      Select Operator [SEL_107] (rows=36524 width=1119)
+                      Select Operator [SEL_117] (rows=36524 width=1119)
                         Output:["_col0"]
-                        Filter Operator [FIL_105] (rows=36524 width=1119)
+                        Filter Operator [FIL_115] (rows=36524 width=1119)
                           predicate:((d_year = 2001) and d_week_seq is not null)
                           TableScan [TS_20] (rows=73049 width=1119)
                             default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_week_seq","d_year"]
                   <-Reducer 4 [ONE_TO_ONE_EDGE] vectorized
-                    FORWARD [RS_103]
+                    FORWARD [RS_113]
                       PartitionCols:_col0
-                      Group By Operator [GBY_102] (rows=237595882 width=135)
+                      Group By Operator [GBY_112] (rows=237595882 width=135)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)","sum(VALUE._col5)","sum(VALUE._col6)"],keys:KEY._col0
                       <-Reducer 3 [SIMPLE_EDGE]
                         SHUFFLE [RS_17]
@@ -169,50 +169,50 @@ Stage-0
                             Select Operator [SEL_14] (rows=475191764 width=135)
                               Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                               Merge Join Operator [MERGEJOIN_91] (rows=475191764 width=135)
-                                Conds:Union 2._col0=RS_101._col0(Inner),Output:["_col1","_col3","_col4"]
+                                Conds:Union 2._col0=RS_111._col0(Inner),Output:["_col1","_col3","_col4"]
                               <-Map 10 [SIMPLE_EDGE] vectorized
-                                SHUFFLE [RS_101]
+                                SHUFFLE [RS_111]
                                   PartitionCols:_col0
-                                  Select Operator [SEL_100] (rows=73049 width=1119)
+                                  Select Operator [SEL_110] (rows=73049 width=1119)
                                     Output:["_col0","_col1","_col2"]
-                                    Filter Operator [FIL_99] (rows=73049 width=1119)
+                                    Filter Operator [FIL_109] (rows=73049 width=1119)
                                       predicate:(d_date_sk is not null and d_week_seq is not null)
                                       TableScan [TS_8] (rows=73049 width=1119)
                                         default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_week_seq","d_day_name"]
                               <-Union 2 [SIMPLE_EDGE]
                                 <-Map 1 [CONTAINS] vectorized
-                                  Reduce Output Operator [RS_98]
+                                  Reduce Output Operator [RS_108]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_97] (rows=144002668 width=135)
+                                    Select Operator [SEL_107] (rows=144002668 width=135)
                                       Output:["_col0","_col1"]
-                                      Filter Operator [FIL_96] (rows=144002668 width=135)
+                                      Filter Operator [FIL_106] (rows=144002668 width=135)
                                         predicate:ws_sold_date_sk is not null
-                                        TableScan [TS_0] (rows=144002668 width=135)
+                                        TableScan [TS_96] (rows=144002668 width=135)
                                           Output:["ws_sold_date_sk","ws_ext_sales_price"]
                                 <-Map 9 [CONTAINS] vectorized
-                                  Reduce Output Operator [RS_115]
+                                  Reduce Output Operator [RS_125]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_114] (rows=287989836 width=135)
+                                    Select Operator [SEL_124] (rows=287989836 width=135)
                                       Output:["_col0","_col1"]
-                                      Filter Operator [FIL_113] (rows=287989836 width=135)
+                                      Filter Operator [FIL_123] (rows=287989836 width=135)
                                         predicate:cs_sold_date_sk is not null
-                                        TableScan [TS_3] (rows=287989836 width=135)
+                                        TableScan [TS_101] (rows=287989836 width=135)
                                           Output:["cs_sold_date_sk","cs_ext_sales_price"]
               <-Reducer 8 [SIMPLE_EDGE]
                 SHUFFLE [RS_55]
                   PartitionCols:(_col0 - 53)
                   Merge Join Operator [MERGEJOIN_94] (rows=261355475 width=135)
-                    Conds:RS_104._col0=RS_110._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+                    Conds:RS_114._col0=RS_120._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                   <-Map 11 [SIMPLE_EDGE] vectorized
-                    SHUFFLE [RS_110]
+                    SHUFFLE [RS_120]
                       PartitionCols:_col0
-                      Select Operator [SEL_108] (rows=36524 width=1119)
+                      Select Operator [SEL_118] (rows=36524 width=1119)
                         Output:["_col0"]
-                        Filter Operator [FIL_106] (rows=36524 width=1119)
+                        Filter Operator [FIL_116] (rows=36524 width=1119)
                           predicate:((d_year = 2002) and d_week_seq is not null)
                            Please refer to the previous TableScan [TS_20]
                   <-Reducer 4 [ONE_TO_ONE_EDGE] vectorized
-                    FORWARD [RS_104]
+                    FORWARD [RS_114]
                       PartitionCols:_col0
-                       Please refer to the previous Group By Operator [GBY_102]
+                       Please refer to the previous Group By Operator [GBY_112]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query23.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query23.q.out b/ql/src/test/results/clientpositive/perf/tez/query23.q.out
index 48184c9..3743000 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query23.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query23.q.out
@@ -132,19 +132,19 @@ Stage-0
     limit:100
     Stage-1
       Reducer 6 vectorized
-      File Output Operator [FS_443]
-        Limit [LIM_442] (rows=1 width=112)
+      File Output Operator [FS_453]
+        Limit [LIM_452] (rows=1 width=112)
           Number of rows:100
-          Group By Operator [GBY_441] (rows=1 width=112)
+          Group By Operator [GBY_451] (rows=1 width=112)
             Output:["_col0"],aggregations:["sum(VALUE._col0)"]
           <-Union 5 [CUSTOM_SIMPLE_EDGE]
             <-Reducer 10 [CONTAINS]
-              Reduce Output Operator [RS_252]
-                Group By Operator [GBY_251] (rows=1 width=112)
+              Reduce Output Operator [RS_390]
+                Group By Operator [GBY_389] (rows=1 width=112)
                   Output:["_col0"],aggregations:["sum(_col0)"]
-                  Select Operator [SEL_247] (rows=191667562 width=135)
+                  Select Operator [SEL_387] (rows=191667562 width=135)
                     Output:["_col0"]
-                    Merge Join Operator [MERGEJOIN_380] (rows=191667562 width=135)
+                    Merge Join Operator [MERGEJOIN_386] (rows=191667562 width=135)
                       Conds:RS_244._col2=RS_245._col0(Inner),Output:["_col3","_col4"]
                     <-Reducer 25 [SIMPLE_EDGE]
                       SHUFFLE [RS_245]
@@ -156,8 +156,8 @@ Stage-0
                             Merge Join Operator [MERGEJOIN_379] (rows=316797606 width=433)
                               Conds:(Inner),(Inner),Output:["_col1","_col2","_col3"]
                             <-Reducer 30 [CUSTOM_SIMPLE_EDGE] vectorized
-                              PARTITION_ONLY_SHUFFLE [RS_440]
-                                Group By Operator [GBY_438] (rows=316797606 width=88)
+                              PARTITION_ONLY_SHUFFLE [RS_450]
+                                Group By Operator [GBY_448] (rows=316797606 width=88)
                                   Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                                 <-Reducer 29 [SIMPLE_EDGE]
                                   SHUFFLE [RS_105]
@@ -167,42 +167,42 @@ Stage-0
                                       Select Operator [SEL_102] (rows=633595212 width=88)
                                         Output:["_col0","_col1"]
                                         Merge Join Operator [MERGEJOIN_366] (rows=633595212 width=88)
-                                          Conds:RS_437._col0=RS_412._col0(Inner),Output:["_col1","_col2","_col3"]
+                                          Conds:RS_447._col0=RS_422._col0(Inner),Output:["_col1","_col2","_col3"]
                                         <-Map 31 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_412]
+                                          SHUFFLE [RS_422]
                                             PartitionCols:_col0
-                                            Select Operator [SEL_411] (rows=80000000 width=860)
+                                            Select Operator [SEL_421] (rows=80000000 width=860)
                                               Output:["_col0"]
-                                              Filter Operator [FIL_410] (rows=80000000 width=860)
+                                              Filter Operator [FIL_420] (rows=80000000 width=860)
                                                 predicate:c_customer_sk is not null
                                                 TableScan [TS_96] (rows=80000000 width=860)
                                                   default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk"]
                                         <-Map 28 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_437]
+                                          SHUFFLE [RS_447]
                                             PartitionCols:_col0
-                                            Select Operator [SEL_436] (rows=575995635 width=88)
+                                            Select Operator [SEL_446] (rows=575995635 width=88)
                                               Output:["_col0","_col1","_col2"]
-                                              Filter Operator [FIL_435] (rows=575995635 width=88)
+                                              Filter Operator [FIL_445] (rows=575995635 width=88)
                                                 predicate:ss_customer_sk is not null
                                                 TableScan [TS_93] (rows=575995635 width=88)
                                                   default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_customer_sk","ss_quantity","ss_sales_price"]
                             <-Reducer 24 [CUSTOM_SIMPLE_EDGE] vectorized
-                              PARTITION_ONLY_SHUFFLE [RS_452]
-                                Select Operator [SEL_451] (rows=1 width=120)
-                                  Filter Operator [FIL_450] (rows=1 width=120)
+                              PARTITION_ONLY_SHUFFLE [RS_462]
+                                Select Operator [SEL_461] (rows=1 width=120)
+                                  Filter Operator [FIL_460] (rows=1 width=120)
                                     predicate:(sq_count_check(_col0) <= 1)
-                                    Group By Operator [GBY_449] (rows=1 width=120)
+                                    Group By Operator [GBY_459] (rows=1 width=120)
                                       Output:["_col0"],aggregations:["count()"]
-                                      Select Operator [SEL_448] (rows=1 width=120)
-                                        Group By Operator [GBY_447] (rows=1 width=120)
+                                      Select Operator [SEL_458] (rows=1 width=120)
+                                        Group By Operator [GBY_457] (rows=1 width=120)
                                           Output:["_col0"],aggregations:["count(VALUE._col0)"]
                                         <-Reducer 20 [CUSTOM_SIMPLE_EDGE] vectorized
-                                          PARTITION_ONLY_SHUFFLE [RS_425]
-                                            Group By Operator [GBY_421] (rows=1 width=120)
+                                          PARTITION_ONLY_SHUFFLE [RS_435]
+                                            Group By Operator [GBY_431] (rows=1 width=120)
                                               Output:["_col0"],aggregations:["count(_col0)"]
-                                              Select Operator [SEL_417] (rows=348477374 width=88)
+                                              Select Operator [SEL_427] (rows=348477374 width=88)
                                                 Output:["_col0"]
-                                                Group By Operator [GBY_414] (rows=348477374 width=88)
+                                                Group By Operator [GBY_424] (rows=348477374 width=88)
                                                   Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                                                 <-Reducer 19 [SIMPLE_EDGE]
                                                   SHUFFLE [RS_51]
@@ -212,62 +212,62 @@ Stage-0
                                                       Select Operator [SEL_48] (rows=696954748 width=88)
                                                         Output:["_col0","_col1"]
                                                         Merge Join Operator [MERGEJOIN_363] (rows=696954748 width=88)
-                                                          Conds:RS_45._col1=RS_413._col0(Inner),Output:["_col2","_col3","_col6"]
+                                                          Conds:RS_45._col1=RS_423._col0(Inner),Output:["_col2","_col3","_col6"]
                                                         <-Map 31 [SIMPLE_EDGE] vectorized
-                                                          SHUFFLE [RS_413]
+                                                          SHUFFLE [RS_423]
                                                             PartitionCols:_col0
-                                                             Please refer to the previous Select Operator [SEL_411]
+                                                             Please refer to the previous Select Operator [SEL_421]
                                                         <-Reducer 18 [SIMPLE_EDGE]
                                                           SHUFFLE [RS_45]
                                                             PartitionCols:_col1
                                                             Merge Join Operator [MERGEJOIN_362] (rows=633595212 width=88)
-                                                              Conds:RS_406._col0=RS_409._col0(Inner),Output:["_col1","_col2","_col3"]
+                                                              Conds:RS_416._col0=RS_419._col0(Inner),Output:["_col1","_col2","_col3"]
                                                             <-Map 17 [SIMPLE_EDGE] vectorized
-                                                              SHUFFLE [RS_406]
+                                                              SHUFFLE [RS_416]
                                                                 PartitionCols:_col0
-                                                                Select Operator [SEL_405] (rows=575995635 width=88)
+                                                                Select Operator [SEL_415] (rows=575995635 width=88)
                                                                   Output:["_col0","_col1","_col2","_col3"]
-                                                                  Filter Operator [FIL_404] (rows=575995635 width=88)
+                                                                  Filter Operator [FIL_414] (rows=575995635 width=88)
                                                                     predicate:(ss_customer_sk is not null and ss_sold_date_sk is not null)
                                                                     TableScan [TS_33] (rows=575995635 width=88)
                                                                       default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_customer_sk","ss_quantity","ss_sales_price"]
                                                             <-Map 27 [SIMPLE_EDGE] vectorized
-                                                              SHUFFLE [RS_409]
+                                                              SHUFFLE [RS_419]
                                                                 PartitionCols:_col0
-                                                                Select Operator [SEL_408] (rows=36525 width=1119)
+                                                                Select Operator [SEL_418] (rows=36525 width=1119)
                                                                   Output:["_col0"]
-                                                                  Filter Operator [FIL_407] (rows=36525 width=1119)
+                                                                  Filter Operator [FIL_417] (rows=36525 width=1119)
                                                                     predicate:((d_year) IN (1999, 2000, 2001, 2002) and d_date_sk is not null)
                                                                     TableScan [TS_36] (rows=73049 width=1119)
                                                                       default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
                             <-Reducer 26 [CUSTOM_SIMPLE_EDGE] vectorized
-                              PARTITION_ONLY_SHUFFLE [RS_454]
-                                Group By Operator [GBY_453] (rows=1 width=224)
+                              PARTITION_ONLY_SHUFFLE [RS_464]
+                                Group By Operator [GBY_463] (rows=1 width=224)
                                   Output:["_col0"],aggregations:["max(VALUE._col0)"]
                                 <-Reducer 20 [CUSTOM_SIMPLE_EDGE] vectorized
-                                  PARTITION_ONLY_SHUFFLE [RS_426]
-                                    Group By Operator [GBY_422] (rows=1 width=224)
+                                  PARTITION_ONLY_SHUFFLE [RS_436]
+                                    Group By Operator [GBY_432] (rows=1 width=224)
                                       Output:["_col0"],aggregations:["max(_col1)"]
-                                      Select Operator [SEL_418] (rows=348477374 width=88)
+                                      Select Operator [SEL_428] (rows=348477374 width=88)
                                         Output:["_col1"]
-                                         Please refer to the previous Group By Operator [GBY_414]
+                                         Please refer to the previous Group By Operator [GBY_424]
                     <-Reducer 9 [SIMPLE_EDGE]
                       SHUFFLE [RS_244]
                         PartitionCols:_col2
                         Merge Join Operator [MERGEJOIN_376] (rows=174243235 width=135)
-                          Conds:RS_241._col1=RS_403._col0(Inner),Output:["_col2","_col3","_col4"]
+                          Conds:RS_241._col1=RS_413._col0(Inner),Output:["_col2","_col3","_col4"]
                         <-Reducer 14 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_403]
+                          SHUFFLE [RS_413]
                             PartitionCols:_col0
-                            Group By Operator [GBY_401] (rows=58079562 width=88)
+                            Group By Operator [GBY_411] (rows=58079562 width=88)
                               Output:["_col0"],keys:_col1
-                              Select Operator [SEL_400] (rows=116159124 width=88)
+                              Select Operator [SEL_410] (rows=116159124 width=88)
                                 Output:["_col1"]
-                                Filter Operator [FIL_399] (rows=116159124 width=88)
+                                Filter Operator [FIL_409] (rows=116159124 width=88)
                                   predicate:(_col3 > 4L)
-                                  Select Operator [SEL_398] (rows=348477374 width=88)
+                                  Select Operator [SEL_408] (rows=348477374 width=88)
                                     Output:["_col0","_col3"]
-                                    Group By Operator [GBY_397] (rows=348477374 width=88)
+                                    Group By Operator [GBY_407] (rows=348477374 width=88)
                                       Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                     <-Reducer 13 [SIMPLE_EDGE]
                                       SHUFFLE [RS_24]
@@ -277,13 +277,13 @@ Stage-0
                                           Select Operator [SEL_21] (rows=696954748 width=88)
                                             Output:["_col0","_col1","_col2"]
                                             Merge Join Operator [MERGEJOIN_361] (rows=696954748 width=88)
-                                              Conds:RS_18._col1=RS_396._col0(Inner),Output:["_col3","_col5","_col6"]
+                                              Conds:RS_18._col1=RS_406._col0(Inner),Output:["_col3","_col5","_col6"]
                                             <-Map 16 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_396]
+                                              SHUFFLE [RS_406]
                                                 PartitionCols:_col0
-                                                Select Operator [SEL_395] (rows=462000 width=1436)
+                                                Select Operator [SEL_405] (rows=462000 width=1436)
                                                   Output:["_col0","_col1"]
-                                                  Filter Operator [FIL_394] (rows=462000 width=1436)
+                                                  Filter Operator [FIL_404] (rows=462000 width=1436)
                                                     predicate:i_item_sk is not null
                                                     TableScan [TS_12] (rows=462000 width=1436)
                                                       default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_desc"]
@@ -291,22 +291,22 @@ Stage-0
                                               SHUFFLE [RS_18]
                                                 PartitionCols:_col1
                                                 Merge Join Operator [MERGEJOIN_360] (rows=633595212 width=88)
-                                                  Conds:RS_390._col0=RS_393._col0(Inner),Output:["_col1","_col3"]
+                                                  Conds:RS_400._col0=RS_403._col0(Inner),Output:["_col1","_col3"]
                                                 <-Map 11 [SIMPLE_EDGE] vectorized
-                                                  SHUFFLE [RS_390]
+                                                  SHUFFLE [RS_400]
                                                     PartitionCols:_col0
-                                                    Select Operator [SEL_389] (rows=575995635 width=88)
+                                                    Select Operator [SEL_399] (rows=575995635 width=88)
                                                       Output:["_col0","_col1"]
-                                                      Filter Operator [FIL_388] (rows=575995635 width=88)
+                                                      Filter Operator [FIL_398] (rows=575995635 width=88)
                                                         predicate:(ss_item_sk is not null and ss_sold_date_sk is not null)
                                                         TableScan [TS_6] (rows=575995635 width=88)
                                                           default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk"]
                                                 <-Map 15 [SIMPLE_EDGE] vectorized
-                                                  SHUFFLE [RS_393]
+                                                  SHUFFLE [RS_403]
                                                     PartitionCols:_col0
-                                                    Select Operator [SEL_392] (rows=36525 width=1119)
+                                                    Select Operator [SEL_402] (rows=36525 width=1119)
                                                       Output:["_col0","_col1"]
-                                                      Filter Operator [FIL_391] (rows=36525 width=1119)
+                                                      Filter Operator [FIL_401] (rows=36525 width=1119)
                                                         predicate:((d_year) IN (1999, 2000, 2001, 2002) and d_date_sk is not null)
                                                         TableScan [TS_9] (rows=73049 width=1119)
                                                           default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date","d_year"]
@@ -314,32 +314,32 @@ Stage-0
                           SHUFFLE [RS_241]
                             PartitionCols:_col1
                             Merge Join Operator [MERGEJOIN_367] (rows=158402938 width=135)
-                              Conds:RS_446._col0=RS_387._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                              Conds:RS_456._col0=RS_397._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
                             <-Map 7 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_387]
+                              SHUFFLE [RS_397]
                                 PartitionCols:_col0
-                                Select Operator [SEL_385] (rows=18262 width=1119)
+                                Select Operator [SEL_395] (rows=18262 width=1119)
                                   Output:["_col0"]
-                                  Filter Operator [FIL_384] (rows=18262 width=1119)
+                                  Filter Operator [FIL_394] (rows=18262 width=1119)
                                     predicate:((d_moy = 1) and (d_year = 1999) and d_date_sk is not null)
                                     TableScan [TS_3] (rows=73049 width=1119)
                                       default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
                             <-Map 32 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_446]
+                              SHUFFLE [RS_456]
                                 PartitionCols:_col0
-                                Select Operator [SEL_445] (rows=144002668 width=135)
+                                Select Operator [SEL_455] (rows=144002668 width=135)
                                   Output:["_col0","_col1","_col2","_col3","_col4"]
-                                  Filter Operator [FIL_444] (rows=144002668 width=135)
+                                  Filter Operator [FIL_454] (rows=144002668 width=135)
                                     predicate:(ws_bill_customer_sk is not null and ws_item_sk is not null and ws_sold_date_sk is not null)
                                     TableScan [TS_124] (rows=144002668 width=135)
                                       default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_bill_customer_sk","ws_quantity","ws_list_price"]
             <-Reducer 4 [CONTAINS]
-              Reduce Output Operator [RS_252]
-                Group By Operator [GBY_251] (rows=1 width=112)
+              Reduce Output Operator [RS_385]
+                Group By Operator [GBY_384] (rows=1 width=112)
                   Output:["_col0"],aggregations:["sum(_col0)"]
-                  Select Operator [SEL_123] (rows=383314495 width=135)
+                  Select Operator [SEL_382] (rows=383314495 width=135)
                     Output:["_col0"]
-                    Merge Join Operator [MERGEJOIN_378] (rows=383314495 width=135)
+                    Merge Join Operator [MERGEJOIN_381] (rows=383314495 width=135)
                       Conds:RS_120._col1=RS_121._col0(Inner),Output:["_col3","_col4"]
                     <-Reducer 22 [SIMPLE_EDGE]
                       SHUFFLE [RS_121]
@@ -351,60 +351,60 @@ Stage-0
                             Merge Join Operator [MERGEJOIN_377] (rows=316797606 width=433)
                               Conds:(Inner),(Inner),Output:["_col1","_col2","_col3"]
                             <-Reducer 30 [CUSTOM_SIMPLE_EDGE] vectorized
-                              PARTITION_ONLY_SHUFFLE [RS_439]
-                                 Please refer to the previous Group By Operator [GBY_438]
+                              PARTITION_ONLY_SHUFFLE [RS_449]
+                                 Please refer to the previous Group By Operator [GBY_448]
                             <-Reducer 21 [CUSTOM_SIMPLE_EDGE] vectorized
-                              PARTITION_ONLY_SHUFFLE [RS_432]
-                                Select Operator [SEL_431] (rows=1 width=120)
-                                  Filter Operator [FIL_430] (rows=1 width=120)
+                              PARTITION_ONLY_SHUFFLE [RS_442]
+                                Select Operator [SEL_441] (rows=1 width=120)
+                                  Filter Operator [FIL_440] (rows=1 width=120)
                                     predicate:(sq_count_check(_col0) <= 1)
-                                    Group By Operator [GBY_429] (rows=1 width=120)
+                                    Group By Operator [GBY_439] (rows=1 width=120)
                                       Output:["_col0"],aggregations:["count()"]
-                                      Select Operator [SEL_428] (rows=1 width=120)
-                                        Group By Operator [GBY_427] (rows=1 width=120)
+                                      Select Operator [SEL_438] (rows=1 width=120)
+                                        Group By Operator [GBY_437] (rows=1 width=120)
                                           Output:["_col0"],aggregations:["count(VALUE._col0)"]
                                         <-Reducer 20 [CUSTOM_SIMPLE_EDGE] vectorized
-                                          PARTITION_ONLY_SHUFFLE [RS_423]
-                                            Group By Operator [GBY_419] (rows=1 width=120)
+                                          PARTITION_ONLY_SHUFFLE [RS_433]
+                                            Group By Operator [GBY_429] (rows=1 width=120)
                                               Output:["_col0"],aggregations:["count(_col0)"]
-                                              Select Operator [SEL_415] (rows=348477374 width=88)
+                                              Select Operator [SEL_425] (rows=348477374 width=88)
                                                 Output:["_col0"]
-                                                 Please refer to the previous Group By Operator [GBY_414]
+                                                 Please refer to the previous Group By Operator [GBY_424]
                             <-Reducer 23 [CUSTOM_SIMPLE_EDGE] vectorized
-                              PARTITION_ONLY_SHUFFLE [RS_434]
-                                Group By Operator [GBY_433] (rows=1 width=224)
+                              PARTITION_ONLY_SHUFFLE [RS_444]
+                                Group By Operator [GBY_443] (rows=1 width=224)
                                   Output:["_col0"],aggregations:["max(VALUE._col0)"]
                                 <-Reducer 20 [CUSTOM_SIMPLE_EDGE] vectorized
-                                  PARTITION_ONLY_SHUFFLE [RS_424]
-                                    Group By Operator [GBY_420] (rows=1 width=224)
+                                  PARTITION_ONLY_SHUFFLE [RS_434]
+                                    Group By Operator [GBY_430] (rows=1 width=224)
                                       Output:["_col0"],aggregations:["max(_col1)"]
-                                      Select Operator [SEL_416] (rows=348477374 width=88)
+                                      Select Operator [SEL_426] (rows=348477374 width=88)
                                         Output:["_col1"]
-                                         Please refer to the previous Group By Operator [GBY_414]
+                                         Please refer to the previous Group By Operator [GBY_424]
                     <-Reducer 3 [SIMPLE_EDGE]
                       SHUFFLE [RS_120]
                         PartitionCols:_col1
                         Merge Join Operator [MERGEJOIN_375] (rows=348467716 width=135)
-                          Conds:RS_117._col2=RS_402._col0(Inner),Output:["_col1","_col3","_col4"]
+                          Conds:RS_117._col2=RS_412._col0(Inner),Output:["_col1","_col3","_col4"]
                         <-Reducer 14 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_402]
+                          SHUFFLE [RS_412]
                             PartitionCols:_col0
-                             Please refer to the previous Group By Operator [GBY_401]
+                             Please refer to the previous Group By Operator [GBY_411]
                         <-Reducer 2 [SIMPLE_EDGE]
                           SHUFFLE [RS_117]
                             PartitionCols:_col2
                             Merge Join Operator [MERGEJOIN_359] (rows=316788826 width=135)
-                              Conds:RS_383._col0=RS_386._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                              Conds:RS_393._col0=RS_396._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
                             <-Map 7 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_386]
+                              SHUFFLE [RS_396]
                                 PartitionCols:_col0
-                                 Please refer to the previous Select Operator [SEL_385]
+                                 Please refer to the previous Select Operator [SEL_395]
                             <-Map 1 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_383]
+                              SHUFFLE [RS_393]
                                 PartitionCols:_col0
-                                Select Operator [SEL_382] (rows=287989836 width=135)
+                                Select Operator [SEL_392] (rows=287989836 width=135)
                                   Output:["_col0","_col1","_col2","_col3","_col4"]
-                                  Filter Operator [FIL_381] (rows=287989836 width=135)
+                                  Filter Operator [FIL_391] (rows=287989836 width=135)
                                     predicate:(cs_bill_customer_sk is not null and cs_item_sk is not null and cs_sold_date_sk is not null)
                                     TableScan [TS_0] (rows=287989836 width=135)
                                       default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_quantity","cs_list_price"]

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query33.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query33.q.out b/ql/src/test/results/clientpositive/perf/tez/query33.q.out
index 3618556..ad922e7 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query33.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query33.q.out
@@ -171,22 +171,22 @@ Stage-0
     limit:100
     Stage-1
       Reducer 7 vectorized
-      File Output Operator [FS_214]
-        Limit [LIM_213] (rows=100 width=108)
+      File Output Operator [FS_226]
+        Limit [LIM_225] (rows=100 width=108)
           Number of rows:100
-          Select Operator [SEL_212] (rows=335408073 width=108)
+          Select Operator [SEL_224] (rows=335408073 width=108)
             Output:["_col0","_col1"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_211]
-              Group By Operator [GBY_210] (rows=335408073 width=108)
+            SHUFFLE [RS_223]
+              Group By Operator [GBY_222] (rows=335408073 width=108)
                 Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
               <-Union 5 [SIMPLE_EDGE]
                 <-Reducer 11 [CONTAINS] vectorized
-                  Reduce Output Operator [RS_226]
+                  Reduce Output Operator [RS_238]
                     PartitionCols:_col0
-                    Group By Operator [GBY_225] (rows=670816147 width=108)
+                    Group By Operator [GBY_237] (rows=670816147 width=108)
                       Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
-                      Group By Operator [GBY_224] (rows=95833781 width=135)
+                      Group By Operator [GBY_236] (rows=95833781 width=135)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                       <-Reducer 10 [SIMPLE_EDGE]
                         SHUFFLE [RS_109]
@@ -199,29 +199,29 @@ Stage-0
                               SHUFFLE [RS_104]
                                 PartitionCols:_col0
                                 Merge Join Operator [MERGEJOIN_173] (rows=508200 width=1436)
-                                  Conds:RS_187._col1=RS_193._col0(Inner),Output:["_col0","_col1"]
+                                  Conds:RS_199._col1=RS_205._col0(Inner),Output:["_col0","_col1"]
                                 <-Map 1 [SIMPLE_EDGE] vectorized
-                                  SHUFFLE [RS_187]
+                                  SHUFFLE [RS_199]
                                     PartitionCols:_col1
-                                    Select Operator [SEL_186] (rows=462000 width=1436)
+                                    Select Operator [SEL_198] (rows=462000 width=1436)
                                       Output:["_col0","_col1"]
-                                      Filter Operator [FIL_185] (rows=462000 width=1436)
+                                      Filter Operator [FIL_197] (rows=462000 width=1436)
                                         predicate:(i_item_sk is not null and i_manufact_id is not null)
                                         TableScan [TS_0] (rows=462000 width=1436)
                                           default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_manufact_id"]
                                 <-Reducer 13 [ONE_TO_ONE_EDGE] vectorized
-                                  FORWARD [RS_193]
+                                  FORWARD [RS_205]
                                     PartitionCols:_col0
-                                    Group By Operator [GBY_192] (rows=115500 width=1436)
+                                    Group By Operator [GBY_204] (rows=115500 width=1436)
                                       Output:["_col0"],keys:KEY._col0
                                     <-Map 12 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_191]
+                                      SHUFFLE [RS_203]
                                         PartitionCols:_col0
-                                        Group By Operator [GBY_190] (rows=231000 width=1436)
+                                        Group By Operator [GBY_202] (rows=231000 width=1436)
                                           Output:["_col0"],keys:i_manufact_id
-                                          Select Operator [SEL_189] (rows=231000 width=1436)
+                                          Select Operator [SEL_201] (rows=231000 width=1436)
                                             Output:["i_manufact_id"]
-                                            Filter Operator [FIL_188] (rows=231000 width=1436)
+                                            Filter Operator [FIL_200] (rows=231000 width=1436)
                                               predicate:((i_category = 'Books') and i_manufact_id is not null)
                                               TableScan [TS_3] (rows=462000 width=1436)
                                                 default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_category","i_manufact_id"]
@@ -231,13 +231,13 @@ Stage-0
                                 Select Operator [SEL_100] (rows=174243235 width=135)
                                   Output:["_col3","_col5"]
                                   Merge Join Operator [MERGEJOIN_181] (rows=174243235 width=135)
-                                    Conds:RS_97._col2=RS_206._col0(Inner),Output:["_col1","_col3"]
+                                    Conds:RS_97._col2=RS_218._col0(Inner),Output:["_col1","_col3"]
                                   <-Map 22 [SIMPLE_EDGE] vectorized
-                                    SHUFFLE [RS_206]
+                                    SHUFFLE [RS_218]
                                       PartitionCols:_col0
-                                      Select Operator [SEL_203] (rows=20000000 width=1014)
+                                      Select Operator [SEL_215] (rows=20000000 width=1014)
                                         Output:["_col0"]
-                                        Filter Operator [FIL_202] (rows=20000000 width=1014)
+                                        Filter Operator [FIL_214] (rows=20000000 width=1014)
                                           predicate:((ca_gmt_offset = -6) and ca_address_sk is not null)
                                           TableScan [TS_16] (rows=40000000 width=1014)
                                             default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_gmt_offset"]
@@ -245,31 +245,31 @@ Stage-0
                                     SHUFFLE [RS_97]
                                       PartitionCols:_col2
                                       Merge Join Operator [MERGEJOIN_180] (rows=158402938 width=135)
-                                        Conds:RS_223._col0=RS_201._col0(Inner),Output:["_col1","_col2","_col3"]
+                                        Conds:RS_235._col0=RS_213._col0(Inner),Output:["_col1","_col2","_col3"]
                                       <-Map 17 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_201]
+                                        SHUFFLE [RS_213]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_198] (rows=18262 width=1119)
+                                          Select Operator [SEL_210] (rows=18262 width=1119)
                                             Output:["_col0"]
-                                            Filter Operator [FIL_197] (rows=18262 width=1119)
+                                            Filter Operator [FIL_209] (rows=18262 width=1119)
                                               predicate:((d_moy = 3) and (d_year = 1999) and d_date_sk is not null)
                                               TableScan [TS_13] (rows=73049 width=1119)
                                                 default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
                                       <-Map 24 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_223]
+                                        SHUFFLE [RS_235]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_222] (rows=144002668 width=135)
+                                          Select Operator [SEL_234] (rows=144002668 width=135)
                                             Output:["_col0","_col1","_col2","_col3"]
-                                            Filter Operator [FIL_221] (rows=144002668 width=135)
+                                            Filter Operator [FIL_233] (rows=144002668 width=135)
                                               predicate:(ws_bill_addr_sk is not null and ws_item_sk is not null and ws_sold_date_sk is not null)
                                               TableScan [TS_85] (rows=144002668 width=135)
                                                 default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_bill_addr_sk","ws_ext_sales_price"]
                 <-Reducer 4 [CONTAINS] vectorized
-                  Reduce Output Operator [RS_209]
+                  Reduce Output Operator [RS_221]
                     PartitionCols:_col0
-                    Group By Operator [GBY_208] (rows=670816147 width=108)
+                    Group By Operator [GBY_220] (rows=670816147 width=108)
                       Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
-                      Group By Operator [GBY_207] (rows=383325119 width=88)
+                      Group By Operator [GBY_219] (rows=383325119 width=88)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                       <-Reducer 3 [SIMPLE_EDGE]
                         SHUFFLE [RS_34]
@@ -288,35 +288,35 @@ Stage-0
                                 Select Operator [SEL_25] (rows=696954748 width=88)
                                   Output:["_col3","_col5"]
                                   Merge Join Operator [MERGEJOIN_175] (rows=696954748 width=88)
-                                    Conds:RS_22._col2=RS_204._col0(Inner),Output:["_col1","_col3"]
+                                    Conds:RS_22._col2=RS_216._col0(Inner),Output:["_col1","_col3"]
                                   <-Map 22 [SIMPLE_EDGE] vectorized
-                                    SHUFFLE [RS_204]
+                                    SHUFFLE [RS_216]
                                       PartitionCols:_col0
-                                       Please refer to the previous Select Operator [SEL_203]
+                                       Please refer to the previous Select Operator [SEL_215]
                                   <-Reducer 15 [SIMPLE_EDGE]
                                     SHUFFLE [RS_22]
                                       PartitionCols:_col2
                                       Merge Join Operator [MERGEJOIN_174] (rows=633595212 width=88)
-                                        Conds:RS_196._col0=RS_199._col0(Inner),Output:["_col1","_col2","_col3"]
+                                        Conds:RS_208._col0=RS_211._col0(Inner),Output:["_col1","_col2","_col3"]
                                       <-Map 17 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_199]
+                                        SHUFFLE [RS_211]
                                           PartitionCols:_col0
-                                           Please refer to the previous Select Operator [SEL_198]
+                                           Please refer to the previous Select Operator [SEL_210]
                                       <-Map 14 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_196]
+                                        SHUFFLE [RS_208]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_195] (rows=575995635 width=88)
+                                          Select Operator [SEL_207] (rows=575995635 width=88)
                                             Output:["_col0","_col1","_col2","_col3"]
-                                            Filter Operator [FIL_194] (rows=575995635 width=88)
+                                            Filter Operator [FIL_206] (rows=575995635 width=88)
                                               predicate:(ss_addr_sk is not null and ss_item_sk is not null and ss_sold_date_sk is not null)
                                               TableScan [TS_10] (rows=575995635 width=88)
                                                 default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_addr_sk","ss_ext_sales_price"]
                 <-Reducer 9 [CONTAINS] vectorized
-                  Reduce Output Operator [RS_220]
+                  Reduce Output Operator [RS_232]
                     PartitionCols:_col0
-                    Group By Operator [GBY_219] (rows=670816147 width=108)
+                    Group By Operator [GBY_231] (rows=670816147 width=108)
                       Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
-                      Group By Operator [GBY_218] (rows=191657247 width=135)
+                      Group By Operator [GBY_230] (rows=191657247 width=135)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                       <-Reducer 8 [SIMPLE_EDGE]
                         SHUFFLE [RS_71]
@@ -335,26 +335,26 @@ Stage-0
                                 Select Operator [SEL_62] (rows=348467716 width=135)
                                   Output:["_col4","_col5"]
                                   Merge Join Operator [MERGEJOIN_178] (rows=348467716 width=135)
-                                    Conds:RS_59._col1=RS_205._col0(Inner),Output:["_col2","_col3"]
+                                    Conds:RS_59._col1=RS_217._col0(Inner),Output:["_col2","_col3"]
                                   <-Map 22 [SIMPLE_EDGE] vectorized
-                                    SHUFFLE [RS_205]
+                                    SHUFFLE [RS_217]
                                       PartitionCols:_col0
-                                       Please refer to the previous Select Operator [SEL_203]
+                                       Please refer to the previous Select Operator [SEL_215]
                                   <-Reducer 18 [SIMPLE_EDGE]
                                     SHUFFLE [RS_59]
                                       PartitionCols:_col1
                                       Merge Join Operator [MERGEJOIN_177] (rows=316788826 width=135)
-                                        Conds:RS_217._col0=RS_200._col0(Inner),Output:["_col1","_col2","_col3"]
+                                        Conds:RS_229._col0=RS_212._col0(Inner),Output:["_col1","_col2","_col3"]
                                       <-Map 17 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_200]
+                                        SHUFFLE [RS_212]
                                           PartitionCols:_col0
-                                           Please refer to the previous Select Operator [SEL_198]
+                                           Please refer to the previous Select Operator [SEL_210]
                                       <-Map 23 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_217]
+                                        SHUFFLE [RS_229]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_216] (rows=287989836 width=135)
+                                          Select Operator [SEL_228] (rows=287989836 width=135)
                                             Output:["_col0","_col1","_col2","_col3"]
-                                            Filter Operator [FIL_215] (rows=287989836 width=135)
+                                            Filter Operator [FIL_227] (rows=287989836 width=135)
                                               predicate:(cs_bill_addr_sk is not null and cs_item_sk is not null and cs_sold_date_sk is not null)
                                               TableScan [TS_47] (rows=287989836 width=135)
                                                 default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_addr_sk","cs_item_sk","cs_ext_sales_price"]

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query38.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query38.q.out b/ql/src/test/results/clientpositive/perf/tez/query38.q.out
index 770e2ca..e3040e4 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query38.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query38.q.out
@@ -62,33 +62,33 @@ Stage-0
     limit:100
     Stage-1
       Reducer 7 vectorized
-      File Output Operator [FS_147]
-        Limit [LIM_146] (rows=1 width=16)
+      File Output Operator [FS_165]
+        Limit [LIM_164] (rows=1 width=16)
           Number of rows:100
-          Group By Operator [GBY_145] (rows=1 width=16)
+          Group By Operator [GBY_163] (rows=1 width=16)
             Output:["_col0"],aggregations:["count(VALUE._col0)"]
           <-Reducer 6 [CUSTOM_SIMPLE_EDGE] vectorized
-            PARTITION_ONLY_SHUFFLE [RS_144]
-              Group By Operator [GBY_143] (rows=1 width=16)
+            PARTITION_ONLY_SHUFFLE [RS_162]
+              Group By Operator [GBY_161] (rows=1 width=16)
                 Output:["_col0"],aggregations:["count()"]
-                Select Operator [SEL_142] (rows=1 width=108)
-                  Filter Operator [FIL_141] (rows=1 width=108)
+                Select Operator [SEL_160] (rows=1 width=108)
+                  Filter Operator [FIL_159] (rows=1 width=108)
                     predicate:(_col3 = 3L)
-                    Select Operator [SEL_140] (rows=152458212 width=108)
+                    Select Operator [SEL_158] (rows=152458212 width=108)
                       Output:["_col3"]
-                      Group By Operator [GBY_139] (rows=152458212 width=108)
+                      Group By Operator [GBY_157] (rows=152458212 width=108)
                         Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                       <-Union 5 [SIMPLE_EDGE]
                         <-Reducer 11 [CONTAINS] vectorized
-                          Reduce Output Operator [RS_155]
+                          Reduce Output Operator [RS_173]
                             PartitionCols:_col0, _col1, _col2
-                            Group By Operator [GBY_154] (rows=304916424 width=108)
+                            Group By Operator [GBY_172] (rows=304916424 width=108)
                               Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                              Group By Operator [GBY_153] (rows=87116929 width=135)
+                              Group By Operator [GBY_171] (rows=87116929 width=135)
                                 Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col1, _col0, _col2
-                                Select Operator [SEL_152] (rows=174233858 width=135)
+                                Select Operator [SEL_170] (rows=174233858 width=135)
                                   Output:["_col0","_col1","_col2"]
-                                  Group By Operator [GBY_151] (rows=174233858 width=135)
+                                  Group By Operator [GBY_169] (rows=174233858 width=135)
                                     Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
                                   <-Reducer 10 [SIMPLE_EDGE]
                                     SHUFFLE [RS_42]
@@ -96,13 +96,13 @@ Stage-0
                                       Group By Operator [GBY_41] (rows=348467716 width=135)
                                         Output:["_col0","_col1","_col2"],keys:_col7, _col6, _col3
                                         Merge Join Operator [MERGEJOIN_118] (rows=348467716 width=135)
-                                          Conds:RS_37._col1=RS_132._col0(Inner),Output:["_col3","_col6","_col7"]
+                                          Conds:RS_37._col1=RS_150._col0(Inner),Output:["_col3","_col6","_col7"]
                                         <-Map 15 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_132]
+                                          SHUFFLE [RS_150]
                                             PartitionCols:_col0
-                                            Select Operator [SEL_130] (rows=80000000 width=860)
+                                            Select Operator [SEL_148] (rows=80000000 width=860)
                                               Output:["_col0","_col1","_col2"]
-                                              Filter Operator [FIL_129] (rows=80000000 width=860)
+                                              Filter Operator [FIL_147] (rows=80000000 width=860)
                                                 predicate:c_customer_sk is not null
                                                 TableScan [TS_6] (rows=80000000 width=860)
                                                   default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_first_name","c_last_name"]
@@ -110,35 +110,35 @@ Stage-0
                                           SHUFFLE [RS_37]
                                             PartitionCols:_col1
                                             Merge Join Operator [MERGEJOIN_117] (rows=316788826 width=135)
-                                              Conds:RS_150._col0=RS_127._col0(Inner),Output:["_col1","_col3"]
+                                              Conds:RS_168._col0=RS_145._col0(Inner),Output:["_col1","_col3"]
                                             <-Map 8 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_127]
+                                              SHUFFLE [RS_145]
                                                 PartitionCols:_col0
-                                                Select Operator [SEL_125] (rows=8116 width=1119)
+                                                Select Operator [SEL_143] (rows=8116 width=1119)
                                                   Output:["_col0","_col1"]
-                                                  Filter Operator [FIL_124] (rows=8116 width=1119)
+                                                  Filter Operator [FIL_142] (rows=8116 width=1119)
                                                     predicate:(d_date_sk is not null and d_month_seq BETWEEN 1212 AND 1223)
                                                     TableScan [TS_3] (rows=73049 width=1119)
                                                       default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date","d_month_seq"]
                                             <-Map 16 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_150]
+                                              SHUFFLE [RS_168]
                                                 PartitionCols:_col0
-                                                Select Operator [SEL_149] (rows=287989836 width=135)
+                                                Select Operator [SEL_167] (rows=287989836 width=135)
                                                   Output:["_col0","_col1"]
-                                                  Filter Operator [FIL_148] (rows=287989836 width=135)
+                                                  Filter Operator [FIL_166] (rows=287989836 width=135)
                                                     predicate:(cs_bill_customer_sk is not null and cs_sold_date_sk is not null)
                                                     TableScan [TS_25] (rows=287989836 width=135)
                                                       default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_customer_sk"]
                         <-Reducer 14 [CONTAINS] vectorized
-                          Reduce Output Operator [RS_163]
+                          Reduce Output Operator [RS_181]
                             PartitionCols:_col0, _col1, _col2
-                            Group By Operator [GBY_162] (rows=304916424 width=108)
+                            Group By Operator [GBY_180] (rows=304916424 width=108)
                               Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                              Group By Operator [GBY_161] (rows=43560808 width=135)
+                              Group By Operator [GBY_179] (rows=43560808 width=135)
                                 Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col1, _col0, _col2
-                                Select Operator [SEL_160] (rows=87121617 width=135)
+                                Select Operator [SEL_178] (rows=87121617 width=135)
                                   Output:["_col0","_col1","_col2"]
-                                  Group By Operator [GBY_159] (rows=87121617 width=135)
+                                  Group By Operator [GBY_177] (rows=87121617 width=135)
                                     Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
                                   <-Reducer 13 [SIMPLE_EDGE]
                                     SHUFFLE [RS_68]
@@ -146,39 +146,39 @@ Stage-0
                                       Group By Operator [GBY_67] (rows=174243235 width=135)
                                         Output:["_col0","_col1","_col2"],keys:_col7, _col6, _col3
                                         Merge Join Operator [MERGEJOIN_120] (rows=174243235 width=135)
-                                          Conds:RS_63._col1=RS_133._col0(Inner),Output:["_col3","_col6","_col7"]
+                                          Conds:RS_63._col1=RS_151._col0(Inner),Output:["_col3","_col6","_col7"]
                                         <-Map 15 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_133]
+                                          SHUFFLE [RS_151]
                                             PartitionCols:_col0
-                                             Please refer to the previous Select Operator [SEL_130]
+                                             Please refer to the previous Select Operator [SEL_148]
                                         <-Reducer 12 [SIMPLE_EDGE]
                                           SHUFFLE [RS_63]
                                             PartitionCols:_col1
                                             Merge Join Operator [MERGEJOIN_119] (rows=158402938 width=135)
-                                              Conds:RS_158._col0=RS_128._col0(Inner),Output:["_col1","_col3"]
+                                              Conds:RS_176._col0=RS_146._col0(Inner),Output:["_col1","_col3"]
                                             <-Map 8 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_128]
+                                              SHUFFLE [RS_146]
                                                 PartitionCols:_col0
-                                                 Please refer to the previous Select Operator [SEL_125]
+                                                 Please refer to the previous Select Operator [SEL_143]
                                             <-Map 17 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_158]
+                                              SHUFFLE [RS_176]
                                                 PartitionCols:_col0
-                                                Select Operator [SEL_157] (rows=144002668 width=135)
+                                                Select Operator [SEL_175] (rows=144002668 width=135)
                                                   Output:["_col0","_col1"]
-                                                  Filter Operator [FIL_156] (rows=144002668 width=135)
+                                                  Filter Operator [FIL_174] (rows=144002668 width=135)
                                                     predicate:(ws_bill_customer_sk is not null and ws_sold_date_sk is not null)
                                                     TableScan [TS_51] (rows=144002668 width=135)
                                                       default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_bill_customer_sk"]
                         <-Reducer 4 [CONTAINS] vectorized
-                          Reduce Output Operator [RS_138]
+                          Reduce Output Operator [RS_156]
                             PartitionCols:_col0, _col1, _col2
-                            Group By Operator [GBY_137] (rows=304916424 width=108)
+                            Group By Operator [GBY_155] (rows=304916424 width=108)
                               Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                              Group By Operator [GBY_136] (rows=174238687 width=88)
+                              Group By Operator [GBY_154] (rows=174238687 width=88)
                                 Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col1, _col0, _col2
-                                Select Operator [SEL_135] (rows=348477374 width=88)
+                                Select Operator [SEL_153] (rows=348477374 width=88)
                                   Output:["_col0","_col1","_col2"]
-                                  Group By Operator [GBY_134] (rows=348477374 width=88)
+                                  Group By Operator [GBY_152] (rows=348477374 width=88)
                                     Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
                                   <-Reducer 3 [SIMPLE_EDGE]
                                     SHUFFLE [RS_17]
@@ -186,26 +186,26 @@ Stage-0
                                       Group By Operator [GBY_16] (rows=696954748 width=88)
                                         Output:["_col0","_col1","_col2"],keys:_col7, _col6, _col3
                                         Merge Join Operator [MERGEJOIN_116] (rows=696954748 width=88)
-                                          Conds:RS_12._col1=RS_131._col0(Inner),Output:["_col3","_col6","_col7"]
+                                          Conds:RS_12._col1=RS_149._col0(Inner),Output:["_col3","_col6","_col7"]
                                         <-Map 15 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_131]
+                                          SHUFFLE [RS_149]
                                             PartitionCols:_col0
-                                             Please refer to the previous Select Operator [SEL_130]
+                                             Please refer to the previous Select Operator [SEL_148]
                                         <-Reducer 2 [SIMPLE_EDGE]
                                           SHUFFLE [RS_12]
                                             PartitionCols:_col1
                                             Merge Join Operator [MERGEJOIN_115] (rows=633595212 width=88)
-                                              Conds:RS_123._col0=RS_126._col0(Inner),Output:["_col1","_col3"]
+                                              Conds:RS_141._col0=RS_144._col0(Inner),Output:["_col1","_col3"]
                                             <-Map 8 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_126]
+                                              SHUFFLE [RS_144]
                                                 PartitionCols:_col0
-                                                 Please refer to the previous Select Operator [SEL_125]
+                                                 Please refer to the previous Select Operator [SEL_143]
                                             <-Map 1 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_123]
+                                              SHUFFLE [RS_141]
                                                 PartitionCols:_col0
-                                                Select Operator [SEL_122] (rows=575995635 width=88)
+                                                Select Operator [SEL_140] (rows=575995635 width=88)
                                                   Output:["_col0","_col1"]
-                                                  Filter Operator [FIL_121] (rows=575995635 width=88)
+                                                  Filter Operator [FIL_139] (rows=575995635 width=88)
                                                     predicate:(ss_customer_sk is not null and ss_sold_date_sk is not null)
                                                     TableScan [TS_0] (rows=575995635 width=88)
                                                       default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_customer_sk"]


[09/14] hive git commit: HIVE-19237: Only use an operatorId once in a plan (Zoltan Haindrich reviewed by Ashutosh Chauhan)

Posted by kg...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/llap/lineage3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/lineage3.q.out b/ql/src/test/results/clientpositive/llap/lineage3.q.out
index 16c4efa..27dd874 100644
--- a/ql/src/test/results/clientpositive/llap/lineage3.q.out
+++ b/ql/src/test/results/clientpositive/llap/lineage3.q.out
@@ -25,7 +25,7 @@ PREHOOK: type: QUERY
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: default@d1
 PREHOOK: Output: default@d2
-{"version":"1.0","engine":"tez","database":"default","hash":"84e3cdc38011da5842162df175b2a494","queryText":"from (select a.ctinyint x, b.cstring1 y\nfrom alltypesorc a join alltypesorc b on a.cint = b.cbigint) t_n20\ninsert into table d1 select x where y is null\ninsert into table d2 select y where x > 0","edges":[{"sources":[2],"targets":[0],"expression":"UDFToInteger(x)","edgeType":"PROJECTION"},{"sources":[3],"targets":[0,1],"expression":"a.cint is not null","edgeType":"PREDICATE"},{"sources":[3,4],"targets":[0,1],"expression":"(UDFToLong(a.cint) = b.cbigint)","edgeType":"PREDICATE"},{"sources":[4],"targets":[0,1],"expression":"b.cbigint is not null","edgeType":"PREDICATE"},{"sources":[5],"targets":[0],"expression":"t_n20.y is null","edgeType":"PREDICATE"},{"sources":[5],"targets":[1],"expression":"CAST( y AS varchar(128))","edgeType":"PROJECTION"},{"sources":[2],"targets":[1],"expression":"(t_n20.x > 0Y)","edgeType":"PREDICATE"},{"sources":[2],"targets":[0],"expression":"compute
 _stats(UDFToInteger(x), 'hll')","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.d1.a"},{"id":1,"vertexType":"COLUMN","vertexId":"default.d2.b"},{"id":2,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"},{"id":3,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cbigint"},{"id":5,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cstring1"}]}
+{"version":"1.0","engine":"tez","database":"default","hash":"84e3cdc38011da5842162df175b2a494","queryText":"from (select a.ctinyint x, b.cstring1 y\nfrom alltypesorc a join alltypesorc b on a.cint = b.cbigint) t_n20\ninsert into table d1 select x where y is null\ninsert into table d2 select y where x > 0","edges":[{"sources":[2],"targets":[0],"expression":"UDFToInteger(x)","edgeType":"PROJECTION"},{"sources":[3],"targets":[0,1],"expression":"a.cint is not null","edgeType":"PREDICATE"},{"sources":[3,4],"targets":[0,1],"expression":"(UDFToLong(a.cint) = b.cbigint)","edgeType":"PREDICATE"},{"sources":[4],"targets":[0,1],"expression":"b.cbigint is not null","edgeType":"PREDICATE"},{"sources":[5],"targets":[0],"expression":"t_n20.y is null","edgeType":"PREDICATE"},{"sources":[5],"targets":[1],"expression":"CAST( y AS varchar(128))","edgeType":"PROJECTION"},{"sources":[2],"targets":[1,0],"expression":"(t_n20.x > 0Y)","edgeType":"PREDICATE"},{"sources":[2],"targets":[0],"expression":"compu
 te_stats(UDFToInteger(x), 'hll')","edgeType":"PROJECTION"},{"sources":[5],"targets":[0],"expression":"compute_stats(CAST( y AS varchar(128)), 'hll')","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.d1.a"},{"id":1,"vertexType":"COLUMN","vertexId":"default.d2.b"},{"id":2,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"},{"id":3,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cbigint"},{"id":5,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cstring1"}]}
 PREHOOK: query: drop table if exists t_n20
 PREHOOK: type: DROPTABLE
 PREHOOK: query: create table t_n20 as
@@ -372,7 +372,7 @@ PREHOOK: query: create table src_dp1 (f string, w string, m int)
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@src_dp1
-Warning: Shuffle Join MERGEJOIN[19][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product
+Warning: Shuffle Join MERGEJOIN[54][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product
 PREHOOK: query: from src_dp, src_dp1
 insert into dest_dp1 partition (year) select first, word, year
 insert into dest_dp2 partition (y, m) select first, word, year, month
@@ -387,4 +387,7 @@ PREHOOK: Output: default@dest_dp1@year=0
 PREHOOK: Output: default@dest_dp2
 PREHOOK: Output: default@dest_dp2@y=1
 PREHOOK: Output: default@dest_dp3@y=2
-{"version":"1.0","engine":"tez","database":"default","hash":"e540a88155ffa4bf6842a4fdf3bfe639","queryText":"from src_dp, src_dp1\ninsert into dest_dp1 partition (year) select first, word, year\ninsert into dest_dp2 partition (y, m) select first, word, year, month\ninsert into dest_dp3 partition (y=2, m, d) select first, word, month m, day d where year=2\ninsert into dest_dp2 partition (y=1, m) select f, w, m\ninsert into dest_dp1 partition (year=0) select f, w","edges":[{"sources":[11],"targets":[0,1,2],"edgeType":"PROJECTION"},{"sources":[12],"targets":[3,4,5],"edgeType":"PROJECTION"},{"sources":[13],"targets":[6,7],"edgeType":"PROJECTION"},{"sources":[14],"targets":[8,9],"edgeType":"PROJECTION"},{"sources":[15],"targets":[1,0],"edgeType":"PROJECTION"},{"sources":[16],"targets":[4,3],"edgeType":"PROJECTION"},{"sources":[17],"targets":[8],"edgeType":"PROJECTION"},{"sources":[18],"targets":[10],"edgeType":"PROJECTION"},{"sources":[13],"targets":[2,5,9,10],"expression":"(subq.col7 = 2
 )","edgeType":"PREDICATE"},{"sources":[11],"targets":[0],"expression":"compute_stats(default.src_dp.first, 'hll')","edgeType":"PROJECTION"},{"sources":[12],"targets":[3],"expression":"compute_stats(default.src_dp.word, 'hll')","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest_dp1.first"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest_dp2.first"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest_dp3.first"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest_dp1.word"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_dp2.word"},{"id":5,"vertexType":"COLUMN","vertexId":"default.dest_dp3.word"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_dp1.year"},{"id":7,"vertexType":"COLUMN","vertexId":"default.dest_dp2.y"},{"id":8,"vertexType":"COLUMN","vertexId":"default.dest_dp2.m"},{"id":9,"vertexType":"COLUMN","vertexId":"default.dest_dp3.m"},{"id":10,"vertexType":"COLUMN","vertexId":"default.dest_dp3.d"},{"id":11,"vert
 exType":"COLUMN","vertexId":"default.src_dp.first"},{"id":12,"vertexType":"COLUMN","vertexId":"default.src_dp.word"},{"id":13,"vertexType":"COLUMN","vertexId":"default.src_dp.year"},{"id":14,"vertexType":"COLUMN","vertexId":"default.src_dp.month"},{"id":15,"vertexType":"COLUMN","vertexId":"default.src_dp1.f"},{"id":16,"vertexType":"COLUMN","vertexId":"default.src_dp1.w"},{"id":17,"vertexType":"COLUMN","vertexId":"default.src_dp1.m"},{"id":18,"vertexType":"COLUMN","vertexId":"default.src_dp.day"}]}
+Failed to log lineage graph, query is not affected
+java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
+#### A masked pattern was here ####
+

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/llap/table_access_keys_stats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/table_access_keys_stats.q.out b/ql/src/test/results/clientpositive/llap/table_access_keys_stats.q.out
index 4f600a6..bb823d4 100644
--- a/ql/src/test/results/clientpositive/llap/table_access_keys_stats.q.out
+++ b/ql/src/test/results/clientpositive/llap/table_access_keys_stats.q.out
@@ -252,7 +252,7 @@ Operator:GBY_2
 Table:default@t1_n13
 Keys:key
 
-Operator:GBY_9
+Operator:GBY_16
 Table:default@t1_n13
 Keys:key
 

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/llap/tez_input_counters.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/tez_input_counters.q.out b/ql/src/test/results/clientpositive/llap/tez_input_counters.q.out
index 63fdd74..5a9fb30 100644
--- a/ql/src/test/results/clientpositive/llap/tez_input_counters.q.out
+++ b/ql/src/test/results/clientpositive/llap/tez_input_counters.q.out
@@ -1820,14 +1820,14 @@ Stage-1 HIVE COUNTERS:
    RECORDS_OUT_1_default.testpart1: 240
    RECORDS_OUT_INTERMEDIATE_Map_1: 240
    RECORDS_OUT_INTERMEDIATE_Reducer_2: 0
-   RECORDS_OUT_OPERATOR_FS_5: 74
-   RECORDS_OUT_OPERATOR_FS_6: 240
-   RECORDS_OUT_OPERATOR_GBY_3: 74
+   RECORDS_OUT_OPERATOR_FS_12: 240
+   RECORDS_OUT_OPERATOR_FS_9: 74
+   RECORDS_OUT_OPERATOR_GBY_7: 74
    RECORDS_OUT_OPERATOR_MAP_0: 0
-   RECORDS_OUT_OPERATOR_RS_7: 240
-   RECORDS_OUT_OPERATOR_SEL_4: 74
-   RECORDS_OUT_OPERATOR_SEL_5: 240
-   RECORDS_OUT_OPERATOR_SEL_6: 240
+   RECORDS_OUT_OPERATOR_RS_14: 240
+   RECORDS_OUT_OPERATOR_SEL_11: 240
+   RECORDS_OUT_OPERATOR_SEL_13: 240
+   RECORDS_OUT_OPERATOR_SEL_8: 74
    RECORDS_OUT_OPERATOR_TS_0: 240
    TOTAL_TABLE_ROWS_WRITTEN: 240
 Stage-1 LLAP IO COUNTERS:


[11/14] hive git commit: HIVE-19237: Only use an operatorId once in a plan (Zoltan Haindrich reviewed by Ashutosh Chauhan)

Posted by kg...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/explainuser_1.q.out b/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
index e022634..7b99494 100644
--- a/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
@@ -56,10 +56,10 @@ Stage-3
           Dependency Collection{}
             Stage-1
               Reducer 2 llap
-              File Output Operator [FS_6]
-                Select Operator [SEL_5] (rows=1 width=1077)
+              File Output Operator [FS_10]
+                Select Operator [SEL_9] (rows=1 width=1077)
                   Output:["_col0","_col1","_col2","_col3"]
-                  Group By Operator [GBY_4] (rows=1 width=1077)
+                  Group By Operator [GBY_8] (rows=1 width=1077)
                     Output:["_col0","_col1","_col2","_col3"],aggregations:["compute_stats(VALUE._col0)","compute_stats(VALUE._col1)"],keys:KEY._col0, KEY._col1
                   <-Map 1 [SIMPLE_EDGE] llap
                     File Output Operator [FS_3]
@@ -68,11 +68,11 @@ Stage-3
                         Output:["_col0","_col1"]
                         TableScan [TS_0] (rows=500 width=178)
                           default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
-                    SHUFFLE [RS_3]
+                    SHUFFLE [RS_7]
                       PartitionCols:_col0, _col1
-                      Group By Operator [GBY_2] (rows=1 width=1061)
+                      Group By Operator [GBY_6] (rows=1 width=1061)
                         Output:["_col0","_col1","_col2","_col3"],aggregations:["compute_stats(key, 'hll')","compute_stats(value, 'hll')"],keys:ds, ts
-                        Select Operator [SEL_1] (rows=500 width=292)
+                        Select Operator [SEL_5] (rows=500 width=292)
                           Output:["key","value","ds","ts"]
                            Please refer to the previous Select Operator [SEL_1]
 
@@ -105,10 +105,10 @@ Stage-3
           Dependency Collection{}
             Stage-1
               Reducer 3 llap
-              File Output Operator [FS_6]
-                Select Operator [SEL_5] (rows=1 width=1077)
+              File Output Operator [FS_14]
+                Select Operator [SEL_13] (rows=1 width=1077)
                   Output:["_col0","_col1","_col2","_col3"]
-                  Group By Operator [GBY_4] (rows=1 width=1077)
+                  Group By Operator [GBY_12] (rows=1 width=1077)
                     Output:["_col0","_col1","_col2","_col3"],aggregations:["compute_stats(VALUE._col0)","compute_stats(VALUE._col1)"],keys:KEY._col0, KEY._col1
                   <-Reducer 2 [SIMPLE_EDGE] llap
                     File Output Operator [FS_7]
@@ -127,11 +127,11 @@ Stage-3
                                   Output:["_col0","_col1"]
                                   TableScan [TS_0] (rows=500 width=178)
                                     default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
-                    SHUFFLE [RS_3]
+                    SHUFFLE [RS_11]
                       PartitionCols:_col0, _col1
-                      Group By Operator [GBY_2] (rows=1 width=1061)
+                      Group By Operator [GBY_10] (rows=1 width=1061)
                         Output:["_col0","_col1","_col2","_col3"],aggregations:["compute_stats(key, 'hll')","compute_stats(value, 'hll')"],keys:ds, ts
-                        Select Operator [SEL_1] (rows=100 width=292)
+                        Select Operator [SEL_9] (rows=100 width=292)
                           Output:["key","value","ds","ts"]
                            Please refer to the previous Select Operator [SEL_6]
 
@@ -778,10 +778,10 @@ Stage-0
           Output:["_col0"]
         <-Union 3 [SIMPLE_EDGE]
           <-Reducer 2 [CONTAINS] llap
-            Reduce Output Operator [RS_23]
-              Select Operator [SEL_5] (rows=1 width=87)
+            Reduce Output Operator [RS_29]
+              Select Operator [SEL_27] (rows=1 width=87)
                 Output:["_col0"]
-                Group By Operator [GBY_4] (rows=1 width=8)
+                Group By Operator [GBY_26] (rows=1 width=8)
                   Output:["_col0"],aggregations:["count(VALUE._col0)"]
                 <-Map 1 [CUSTOM_SIMPLE_EDGE] llap
                   PARTITION_ONLY_SHUFFLE [RS_3]
@@ -792,10 +792,10 @@ Stage-0
                         TableScan [TS_0] (rows=20 width=80)
                           default@cbo_t3,s1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
           <-Reducer 6 [CONTAINS] llap
-            Reduce Output Operator [RS_23]
-              Select Operator [SEL_12] (rows=1 width=87)
+            Reduce Output Operator [RS_33]
+              Select Operator [SEL_31] (rows=1 width=87)
                 Output:["_col0"]
-                Group By Operator [GBY_11] (rows=1 width=8)
+                Group By Operator [GBY_30] (rows=1 width=8)
                   Output:["_col0"],aggregations:["count(VALUE._col0)"]
                 <-Map 5 [CUSTOM_SIMPLE_EDGE] llap
                   PARTITION_ONLY_SHUFFLE [RS_10]
@@ -806,10 +806,10 @@ Stage-0
                         TableScan [TS_7] (rows=20 width=80)
                           default@cbo_t3,s2,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
           <-Reducer 8 [CONTAINS] llap
-            Reduce Output Operator [RS_23]
-              Select Operator [SEL_20] (rows=1 width=87)
+            Reduce Output Operator [RS_37]
+              Select Operator [SEL_35] (rows=1 width=87)
                 Output:["_col0"]
-                Group By Operator [GBY_19] (rows=1 width=8)
+                Group By Operator [GBY_34] (rows=1 width=8)
                   Output:["_col0"],aggregations:["count(VALUE._col0)"]
                 <-Map 7 [CUSTOM_SIMPLE_EDGE] llap
                   PARTITION_ONLY_SHUFFLE [RS_18]
@@ -855,13 +855,13 @@ Stage-0
               Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
             <-Union 3 [SIMPLE_EDGE]
               <-Reducer 2 [CONTAINS] llap
-                Reduce Output Operator [RS_25]
+                Reduce Output Operator [RS_35]
                   PartitionCols:_col0
-                  Group By Operator [GBY_24] (rows=1 width=95)
+                  Group By Operator [GBY_34] (rows=1 width=95)
                     Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
-                    Select Operator [SEL_5] (rows=1 width=87)
+                    Select Operator [SEL_32] (rows=1 width=87)
                       Output:["_col0"]
-                      Group By Operator [GBY_4] (rows=1 width=8)
+                      Group By Operator [GBY_31] (rows=1 width=8)
                         Output:["_col0"],aggregations:["count(VALUE._col0)"]
                       <-Map 1 [CUSTOM_SIMPLE_EDGE] llap
                         PARTITION_ONLY_SHUFFLE [RS_3]
@@ -872,13 +872,13 @@ Stage-0
                               TableScan [TS_0] (rows=20 width=80)
                                 default@cbo_t3,s1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
               <-Reducer 7 [CONTAINS] llap
-                Reduce Output Operator [RS_25]
+                Reduce Output Operator [RS_40]
                   PartitionCols:_col0
-                  Group By Operator [GBY_24] (rows=1 width=95)
+                  Group By Operator [GBY_39] (rows=1 width=95)
                     Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
-                    Select Operator [SEL_12] (rows=1 width=87)
+                    Select Operator [SEL_37] (rows=1 width=87)
                       Output:["_col0"]
-                      Group By Operator [GBY_11] (rows=1 width=8)
+                      Group By Operator [GBY_36] (rows=1 width=8)
                         Output:["_col0"],aggregations:["count(VALUE._col0)"]
                       <-Map 6 [CUSTOM_SIMPLE_EDGE] llap
                         PARTITION_ONLY_SHUFFLE [RS_10]
@@ -889,13 +889,13 @@ Stage-0
                               TableScan [TS_7] (rows=20 width=80)
                                 default@cbo_t3,s2,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
               <-Reducer 9 [CONTAINS] llap
-                Reduce Output Operator [RS_25]
+                Reduce Output Operator [RS_45]
                   PartitionCols:_col0
-                  Group By Operator [GBY_24] (rows=1 width=95)
+                  Group By Operator [GBY_44] (rows=1 width=95)
                     Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
-                    Select Operator [SEL_20] (rows=1 width=87)
+                    Select Operator [SEL_42] (rows=1 width=87)
                       Output:["_col0"]
-                      Group By Operator [GBY_19] (rows=1 width=8)
+                      Group By Operator [GBY_41] (rows=1 width=8)
                         Output:["_col0"],aggregations:["count(VALUE._col0)"]
                       <-Map 8 [CUSTOM_SIMPLE_EDGE] llap
                         PARTITION_ONLY_SHUFFLE [RS_18]
@@ -4828,12 +4828,12 @@ Stage-4
           Dependency Collection{}
             Stage-2
               Reducer 5 llap
-              File Output Operator [FS_7]
-                Group By Operator [GBY_5] (rows=1 width=2640)
+              File Output Operator [FS_17]
+                Group By Operator [GBY_15] (rows=1 width=2640)
                   Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["compute_stats(VALUE._col0)","compute_stats(VALUE._col1)","compute_stats(VALUE._col2)","compute_stats(VALUE._col3)","compute_stats(VALUE._col4)","compute_stats(VALUE._col5)"]
                 <-Reducer 4 [CUSTOM_SIMPLE_EDGE] llap
-                  PARTITION_ONLY_SHUFFLE [RS_4]
-                    Group By Operator [GBY_3] (rows=1 width=2576)
+                  PARTITION_ONLY_SHUFFLE [RS_14]
+                    Group By Operator [GBY_13] (rows=1 width=2576)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["compute_stats(VALUE._col0, 'hll')","compute_stats(VALUE._col2, 'hll')","compute_stats(VALUE._col3, 'hll')","compute_stats(VALUE._col4, 'hll')","compute_stats(VALUE._col5, 'hll')","compute_stats(VALUE._col6, 'hll')"]
                     <-Reducer 3 [CUSTOM_SIMPLE_EDGE] llap
                       File Output Operator [FS_9]
@@ -4856,46 +4856,46 @@ Stage-4
                                       PartitionCols:p_mfgr
                                       TableScan [TS_0] (rows=26 width=231)
                                         default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_name","p_retailprice","p_size"]
-                      PARTITION_ONLY_SHUFFLE [RS_2]
+                      PARTITION_ONLY_SHUFFLE [RS_12]
                         PartitionCols:rand()
-                        Select Operator [SEL_1] (rows=26 width=239)
+                        Select Operator [SEL_11] (rows=26 width=239)
                           Output:["p_mfgr","p_name","p_size","r","dr","s"]
                            Please refer to the previous Select Operator [SEL_7]
               Reducer 9 llap
-              File Output Operator [FS_7]
-                Group By Operator [GBY_5] (rows=1 width=3520)
+              File Output Operator [FS_36]
+                Group By Operator [GBY_34] (rows=1 width=3520)
                   Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["compute_stats(VALUE._col0)","compute_stats(VALUE._col1)","compute_stats(VALUE._col2)","compute_stats(VALUE._col3)","compute_stats(VALUE._col4)","compute_stats(VALUE._col5)","compute_stats(VALUE._col6)","compute_stats(VALUE._col7)"]
                 <-Reducer 8 [CUSTOM_SIMPLE_EDGE] llap
-                  PARTITION_ONLY_SHUFFLE [RS_4]
-                    Group By Operator [GBY_3] (rows=1 width=3424)
+                  PARTITION_ONLY_SHUFFLE [RS_33]
+                    Group By Operator [GBY_32] (rows=1 width=3424)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["compute_stats(VALUE._col0, 'hll')","compute_stats(VALUE._col2, 'hll')","compute_stats(VALUE._col3, 'hll')","compute_stats(VALUE._col4, 'hll')","compute_stats(VALUE._col5, 'hll')","compute_stats(VALUE._col6, 'hll')","compute_stats(VALUE._col7, 'hll')","compute_stats(VALUE._col8, 'hll')"]
                     <-Reducer 7 [CUSTOM_SIMPLE_EDGE] llap
-                      File Output Operator [FS_20]
+                      File Output Operator [FS_28]
                         table:{"name:":"default.part_5_n1"}
-                        Select Operator [SEL_17] (rows=26 width=247)
+                        Select Operator [SEL_25] (rows=26 width=247)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                          PTF Operator [PTF_16] (rows=26 width=499)
+                          PTF Operator [PTF_24] (rows=26 width=499)
                             Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col3 ASC NULLS FIRST, _col2 ASC NULLS FIRST","partition by:":"_col3"}]
-                            Select Operator [SEL_15] (rows=26 width=499)
+                            Select Operator [SEL_23] (rows=26 width=499)
                               Output:["_col0","_col2","_col3","_col6"]
                             <-Reducer 6 [SIMPLE_EDGE] llap
-                              SHUFFLE [RS_14]
+                              SHUFFLE [RS_22]
                                 PartitionCols:_col2
-                                Select Operator [SEL_13] (rows=26 width=491)
+                                Select Operator [SEL_21] (rows=26 width=491)
                                   Output:["sum_window_0","_col1","_col2","_col5"]
-                                  PTF Operator [PTF_12] (rows=26 width=491)
+                                  PTF Operator [PTF_20] (rows=26 width=491)
                                     Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col5 ASC NULLS FIRST","partition by:":"_col2"}]
-                                    Select Operator [SEL_11] (rows=26 width=491)
+                                    Select Operator [SEL_19] (rows=26 width=491)
                                       Output:["_col1","_col2","_col5"]
                                     <-Reducer 2 [SIMPLE_EDGE] llap
-                                      SHUFFLE [RS_10]
+                                      SHUFFLE [RS_18]
                                         PartitionCols:_col2
                                          Please refer to the previous PTF Operator [PTF_3]
-                      PARTITION_ONLY_SHUFFLE [RS_2]
+                      PARTITION_ONLY_SHUFFLE [RS_31]
                         PartitionCols:rand()
-                        Select Operator [SEL_1] (rows=26 width=247)
+                        Select Operator [SEL_30] (rows=26 width=247)
                           Output:["p_mfgr","p_name","p_size","s2","r","dr","cud","fv1"]
-                           Please refer to the previous Select Operator [SEL_17]
+                           Please refer to the previous Select Operator [SEL_25]
 Stage-5
   Stats Work{}
     Stage-1
@@ -5272,26 +5272,26 @@ Stage-3
           Dependency Collection{}
             Stage-1
               Reducer 4 llap
-              File Output Operator [FS_7]
-                Group By Operator [GBY_5] (rows=1 width=880)
+              File Output Operator [FS_19]
+                Group By Operator [GBY_17] (rows=1 width=880)
                   Output:["_col0","_col1"],aggregations:["compute_stats(VALUE._col0)","compute_stats(VALUE._col1)"]
                 <-Reducer 3 [CUSTOM_SIMPLE_EDGE] llap
-                  PARTITION_ONLY_SHUFFLE [RS_4]
-                    Group By Operator [GBY_3] (rows=1 width=864)
+                  PARTITION_ONLY_SHUFFLE [RS_16]
+                    Group By Operator [GBY_15] (rows=1 width=864)
                       Output:["_col0","_col1"],aggregations:["compute_stats(VALUE._col0, 'hll')","compute_stats(VALUE._col2, 'hll')"]
                     <-Reducer 2 [CUSTOM_SIMPLE_EDGE] llap
                       File Output Operator [FS_11]
                         table:{"name:":"default.dest_j1_n16"}
                         Select Operator [SEL_9] (rows=791 width=95)
                           Output:["_col0","_col1"]
-                          Merge Join Operator [MERGEJOIN_16] (rows=791 width=178)
+                          Merge Join Operator [MERGEJOIN_24] (rows=791 width=178)
                             Conds:RS_6._col0=RS_7._col0(Inner),Output:["_col0","_col2"]
                           <-Map 1 [SIMPLE_EDGE] llap
                             SHUFFLE [RS_6]
                               PartitionCols:_col0
                               Select Operator [SEL_2] (rows=500 width=87)
                                 Output:["_col0"]
-                                Filter Operator [FIL_14] (rows=500 width=87)
+                                Filter Operator [FIL_22] (rows=500 width=87)
                                   predicate:key is not null
                                   TableScan [TS_0] (rows=500 width=87)
                                     default@src,src1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
@@ -5300,13 +5300,13 @@ Stage-3
                               PartitionCols:_col0
                               Select Operator [SEL_5] (rows=500 width=178)
                                 Output:["_col0","_col1"]
-                                Filter Operator [FIL_15] (rows=500 width=178)
+                                Filter Operator [FIL_23] (rows=500 width=178)
                                   predicate:key is not null
                                   TableScan [TS_3] (rows=500 width=178)
                                     default@src,src2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
-                      PARTITION_ONLY_SHUFFLE [RS_2]
+                      PARTITION_ONLY_SHUFFLE [RS_14]
                         PartitionCols:rand()
-                        Select Operator [SEL_1] (rows=791 width=95)
+                        Select Operator [SEL_13] (rows=791 width=95)
                           Output:["key","value"]
                            Please refer to the previous Select Operator [SEL_9]
 


[08/14] hive git commit: HIVE-19237: Only use an operatorId once in a plan (Zoltan Haindrich reviewed by Ashutosh Chauhan)

Posted by kg...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/llap/union_fast_stats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/union_fast_stats.q.out b/ql/src/test/results/clientpositive/llap/union_fast_stats.q.out
index 66b6bd8..cdb9193 100644
--- a/ql/src/test/results/clientpositive/llap/union_fast_stats.q.out
+++ b/ql/src/test/results/clientpositive/llap/union_fast_stats.q.out
@@ -1,159 +1,159 @@
-PREHOOK: query: drop table small_alltypesorc1a
+PREHOOK: query: drop table small_alltypesorc1a_n2
 PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table small_alltypesorc1a
+POSTHOOK: query: drop table small_alltypesorc1a_n2
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: drop table small_alltypesorc2a
+PREHOOK: query: drop table small_alltypesorc2a_n2
 PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table small_alltypesorc2a
+POSTHOOK: query: drop table small_alltypesorc2a_n2
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: drop table small_alltypesorc3a
+PREHOOK: query: drop table small_alltypesorc3a_n2
 PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table small_alltypesorc3a
+POSTHOOK: query: drop table small_alltypesorc3a_n2
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: drop table small_alltypesorc4a
+PREHOOK: query: drop table small_alltypesorc4a_n2
 PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table small_alltypesorc4a
+POSTHOOK: query: drop table small_alltypesorc4a_n2
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: drop table small_alltypesorc_a
+PREHOOK: query: drop table small_alltypesorc_a_n2
 PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table small_alltypesorc_a
+POSTHOOK: query: drop table small_alltypesorc_a_n2
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table small_alltypesorc1a as select * from alltypesorc where cint is not null and ctinyint is not null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
+PREHOOK: query: create table small_alltypesorc1a_n2 as select * from alltypesorc where cint is not null and ctinyint is not null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: database:default
-PREHOOK: Output: default@small_alltypesorc1a
-POSTHOOK: query: create table small_alltypesorc1a as select * from alltypesorc where cint is not null and ctinyint is not null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
+PREHOOK: Output: default@small_alltypesorc1a_n2
+POSTHOOK: query: create table small_alltypesorc1a_n2 as select * from alltypesorc where cint is not null and ctinyint is not null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
-POSTHOOK: Output: default@small_alltypesorc1a
-POSTHOOK: Lineage: small_alltypesorc1a.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cbigint, type:bigint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.cboolean1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.cboolean2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.cfloat SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.cint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cint, type:int, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.csmallint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.cstring1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.cstring2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.ctimestamp1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.ctimestamp2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.ctinyint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
-PREHOOK: query: create table small_alltypesorc2a as select * from alltypesorc where cint is null and ctinyint is not null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
+POSTHOOK: Output: default@small_alltypesorc1a_n2
+POSTHOOK: Lineage: small_alltypesorc1a_n2.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.cboolean1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.cboolean2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.cfloat SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.cint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cint, type:int, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.csmallint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.cstring1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.cstring2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.ctimestamp1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.ctimestamp2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.ctinyint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
+PREHOOK: query: create table small_alltypesorc2a_n2 as select * from alltypesorc where cint is null and ctinyint is not null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: database:default
-PREHOOK: Output: default@small_alltypesorc2a
-POSTHOOK: query: create table small_alltypesorc2a as select * from alltypesorc where cint is null and ctinyint is not null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
+PREHOOK: Output: default@small_alltypesorc2a_n2
+POSTHOOK: query: create table small_alltypesorc2a_n2 as select * from alltypesorc where cint is null and ctinyint is not null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
-POSTHOOK: Output: default@small_alltypesorc2a
-POSTHOOK: Lineage: small_alltypesorc2a.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cbigint, type:bigint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.cboolean1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.cboolean2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.cfloat SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.cint SIMPLE []
-POSTHOOK: Lineage: small_alltypesorc2a.csmallint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.cstring1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.cstring2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.ctimestamp1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.ctimestamp2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.ctinyint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
-PREHOOK: query: create table small_alltypesorc3a as select * from alltypesorc where cint is not null and ctinyint is null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
+POSTHOOK: Output: default@small_alltypesorc2a_n2
+POSTHOOK: Lineage: small_alltypesorc2a_n2.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.cboolean1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.cboolean2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.cfloat SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.cint SIMPLE []
+POSTHOOK: Lineage: small_alltypesorc2a_n2.csmallint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.cstring1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.cstring2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.ctimestamp1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.ctimestamp2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.ctinyint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
+PREHOOK: query: create table small_alltypesorc3a_n2 as select * from alltypesorc where cint is not null and ctinyint is null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: database:default
-PREHOOK: Output: default@small_alltypesorc3a
-POSTHOOK: query: create table small_alltypesorc3a as select * from alltypesorc where cint is not null and ctinyint is null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
+PREHOOK: Output: default@small_alltypesorc3a_n2
+POSTHOOK: query: create table small_alltypesorc3a_n2 as select * from alltypesorc where cint is not null and ctinyint is null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
-POSTHOOK: Output: default@small_alltypesorc3a
-POSTHOOK: Lineage: small_alltypesorc3a.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cbigint, type:bigint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.cboolean1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.cboolean2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.cfloat SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.cint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cint, type:int, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.csmallint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.cstring1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.cstring2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.ctimestamp1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.ctimestamp2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.ctinyint SIMPLE []
-PREHOOK: query: create table small_alltypesorc4a as select * from alltypesorc where cint is null and ctinyint is null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
+POSTHOOK: Output: default@small_alltypesorc3a_n2
+POSTHOOK: Lineage: small_alltypesorc3a_n2.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.cboolean1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.cboolean2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.cfloat SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.cint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cint, type:int, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.csmallint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.cstring1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.cstring2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.ctimestamp1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.ctimestamp2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.ctinyint SIMPLE []
+PREHOOK: query: create table small_alltypesorc4a_n2 as select * from alltypesorc where cint is null and ctinyint is null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: database:default
-PREHOOK: Output: default@small_alltypesorc4a
-POSTHOOK: query: create table small_alltypesorc4a as select * from alltypesorc where cint is null and ctinyint is null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
+PREHOOK: Output: default@small_alltypesorc4a_n2
+POSTHOOK: query: create table small_alltypesorc4a_n2 as select * from alltypesorc where cint is null and ctinyint is null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
-POSTHOOK: Output: default@small_alltypesorc4a
-POSTHOOK: Lineage: small_alltypesorc4a.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cbigint, type:bigint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.cboolean1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.cboolean2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.cfloat SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.cint SIMPLE []
-POSTHOOK: Lineage: small_alltypesorc4a.csmallint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.cstring1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.cstring2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.ctimestamp1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.ctimestamp2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.ctinyint SIMPLE []
-PREHOOK: query: create table small_alltypesorc_a stored as orc as select * from
-(select * from (select * from small_alltypesorc1a) sq1
+POSTHOOK: Output: default@small_alltypesorc4a_n2
+POSTHOOK: Lineage: small_alltypesorc4a_n2.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.cboolean1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.cboolean2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.cfloat SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.cint SIMPLE []
+POSTHOOK: Lineage: small_alltypesorc4a_n2.csmallint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.cstring1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.cstring2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.ctimestamp1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.ctimestamp2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.ctinyint SIMPLE []
+PREHOOK: query: create table small_alltypesorc_a_n2 stored as orc as select * from
+(select * from (select * from small_alltypesorc1a_n2) sq1
  union all
- select * from (select * from small_alltypesorc2a) sq2
+ select * from (select * from small_alltypesorc2a_n2) sq2
  union all
- select * from (select * from small_alltypesorc3a) sq3
+ select * from (select * from small_alltypesorc3a_n2) sq3
  union all
- select * from (select * from small_alltypesorc4a) sq4) q
+ select * from (select * from small_alltypesorc4a_n2) sq4) q
 PREHOOK: type: CREATETABLE_AS_SELECT
-PREHOOK: Input: default@small_alltypesorc1a
-PREHOOK: Input: default@small_alltypesorc2a
-PREHOOK: Input: default@small_alltypesorc3a
-PREHOOK: Input: default@small_alltypesorc4a
+PREHOOK: Input: default@small_alltypesorc1a_n2
+PREHOOK: Input: default@small_alltypesorc2a_n2
+PREHOOK: Input: default@small_alltypesorc3a_n2
+PREHOOK: Input: default@small_alltypesorc4a_n2
 PREHOOK: Output: database:default
-PREHOOK: Output: default@small_alltypesorc_a
-POSTHOOK: query: create table small_alltypesorc_a stored as orc as select * from
-(select * from (select * from small_alltypesorc1a) sq1
+PREHOOK: Output: default@small_alltypesorc_a_n2
+POSTHOOK: query: create table small_alltypesorc_a_n2 stored as orc as select * from
+(select * from (select * from small_alltypesorc1a_n2) sq1
  union all
- select * from (select * from small_alltypesorc2a) sq2
+ select * from (select * from small_alltypesorc2a_n2) sq2
  union all
- select * from (select * from small_alltypesorc3a) sq3
+ select * from (select * from small_alltypesorc3a_n2) sq3
  union all
- select * from (select * from small_alltypesorc4a) sq4) q
+ select * from (select * from small_alltypesorc4a_n2) sq4) q
 POSTHOOK: type: CREATETABLE_AS_SELECT
-POSTHOOK: Input: default@small_alltypesorc1a
-POSTHOOK: Input: default@small_alltypesorc2a
-POSTHOOK: Input: default@small_alltypesorc3a
-POSTHOOK: Input: default@small_alltypesorc4a
+POSTHOOK: Input: default@small_alltypesorc1a_n2
+POSTHOOK: Input: default@small_alltypesorc2a_n2
+POSTHOOK: Input: default@small_alltypesorc3a_n2
+POSTHOOK: Input: default@small_alltypesorc4a_n2
 POSTHOOK: Output: database:default
-POSTHOOK: Output: default@small_alltypesorc_a
-POSTHOOK: Lineage: small_alltypesorc_a.cbigint EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cbigint, type:bigint, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:cbigint, type:bigint, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:cbigint, type:bigint, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:cbigint, type:bigint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cboolean1 EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cboolean1, type:boolean, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:cboolean1, type:boolean, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:cboolean1, type:boolean, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cboolean2 EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cboolean2, type:boolean, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:cboolean2, type:boolean, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:cboolean2, type:boolean, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cdouble EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cdouble, type:double, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:cdouble, type:double, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:cdouble, type:double, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:cdouble, type:double, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cfloat EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cfloat, type:float, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:cfloat, type:float, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:cfloat, type:float, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:cfloat, type:float, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cint EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cint, type:int, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:cint, type:int, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:cint, type:int, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:cint, type:int, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.csmallint EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:csmallint, type:smallint, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:csmallint, type:smallint, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:csmallint, type:smallint, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:csmallint, type:smallint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cstring1 EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cstring1, type:string, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:cstring1, type:string, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:cstring1, type:string, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:cstring1, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cstring2 EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cstring2, type:string, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:cstring2, type:string, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:cstring2, type:string, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:cstring2, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.ctimestamp1 EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.ctimestamp2 EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.ctinyint EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:ctinyint, type:tinyint, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:ctinyint, type:tinyint, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:ctinyint, type:tinyint, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
-PREHOOK: query: desc formatted small_alltypesorc_a
+POSTHOOK: Output: default@small_alltypesorc_a_n2
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cbigint EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cbigint, type:bigint, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:cbigint, type:bigint, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:cbigint, type:bigint, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cboolean1 EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cboolean1, type:boolean, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:cboolean1, type:boolean, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:cboolean1, type:boolean, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cboolean2 EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cboolean2, type:boolean, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:cboolean2, type:boolean, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:cboolean2, type:boolean, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cdouble EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cdouble, type:double, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:cdouble, type:double, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:cdouble, type:double, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:cdouble, type:double, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cfloat EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cfloat, type:float, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:cfloat, type:float, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:cfloat, type:float, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:cfloat, type:float, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cint EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cint, type:int, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:cint, type:int, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:cint, type:int, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:cint, type:int, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.csmallint EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:csmallint, type:smallint, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:csmallint, type:smallint, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:csmallint, type:smallint, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cstring1 EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cstring1, type:string, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:cstring1, type:string, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:cstring1, type:string, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:cstring1, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cstring2 EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cstring2, type:string, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:cstring2, type:string, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:cstring2, type:string, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:cstring2, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.ctimestamp1 EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.ctimestamp2 EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.ctinyint EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:ctinyint, type:tinyint, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:ctinyint, type:tinyint, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:ctinyint, type:tinyint, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
+PREHOOK: query: desc formatted small_alltypesorc_a_n2
 PREHOOK: type: DESCTABLE
-PREHOOK: Input: default@small_alltypesorc_a
-POSTHOOK: query: desc formatted small_alltypesorc_a
+PREHOOK: Input: default@small_alltypesorc_a_n2
+POSTHOOK: query: desc formatted small_alltypesorc_a_n2
 POSTHOOK: type: DESCTABLE
-POSTHOOK: Input: default@small_alltypesorc_a
+POSTHOOK: Input: default@small_alltypesorc_a_n2
 # col_name            	data_type           	comment             
 ctinyint            	tinyint             	                    
 csmallint           	smallint            	                    
@@ -175,11 +175,13 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
-	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
 	bucketing_version   	2                   
 	numFiles            	3                   
+<<<<<<< HEAD
+=======
 	numRows             	5                   
 	rawDataSize         	1300                
+>>>>>>> asf/master
 	totalSize           	4033                
 #### A masked pattern was here ####
 	 	 
@@ -193,20 +195,20 @@ Bucket Columns:     	[]
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: ANALYZE TABLE small_alltypesorc_a COMPUTE STATISTICS
+PREHOOK: query: ANALYZE TABLE small_alltypesorc_a_n2 COMPUTE STATISTICS
 PREHOOK: type: QUERY
-PREHOOK: Input: default@small_alltypesorc_a
-PREHOOK: Output: default@small_alltypesorc_a
-POSTHOOK: query: ANALYZE TABLE small_alltypesorc_a COMPUTE STATISTICS
+PREHOOK: Input: default@small_alltypesorc_a_n2
+PREHOOK: Output: default@small_alltypesorc_a_n2
+POSTHOOK: query: ANALYZE TABLE small_alltypesorc_a_n2 COMPUTE STATISTICS
 POSTHOOK: type: QUERY
-POSTHOOK: Input: default@small_alltypesorc_a
-POSTHOOK: Output: default@small_alltypesorc_a
-PREHOOK: query: desc formatted small_alltypesorc_a
+POSTHOOK: Input: default@small_alltypesorc_a_n2
+POSTHOOK: Output: default@small_alltypesorc_a_n2
+PREHOOK: query: desc formatted small_alltypesorc_a_n2
 PREHOOK: type: DESCTABLE
-PREHOOK: Input: default@small_alltypesorc_a
-POSTHOOK: query: desc formatted small_alltypesorc_a
+PREHOOK: Input: default@small_alltypesorc_a_n2
+POSTHOOK: query: desc formatted small_alltypesorc_a_n2
 POSTHOOK: type: DESCTABLE
-POSTHOOK: Input: default@small_alltypesorc_a
+POSTHOOK: Input: default@small_alltypesorc_a_n2
 # col_name            	data_type           	comment             
 ctinyint            	tinyint             	                    
 csmallint           	smallint            	                    
@@ -246,32 +248,32 @@ Bucket Columns:     	[]
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: insert into table small_alltypesorc_a select * from small_alltypesorc1a
+PREHOOK: query: insert into table small_alltypesorc_a_n2 select * from small_alltypesorc1a_n2
 PREHOOK: type: QUERY
-PREHOOK: Input: default@small_alltypesorc1a
-PREHOOK: Output: default@small_alltypesorc_a
-POSTHOOK: query: insert into table small_alltypesorc_a select * from small_alltypesorc1a
+PREHOOK: Input: default@small_alltypesorc1a_n2
+PREHOOK: Output: default@small_alltypesorc_a_n2
+POSTHOOK: query: insert into table small_alltypesorc_a_n2 select * from small_alltypesorc1a_n2
 POSTHOOK: type: QUERY
-POSTHOOK: Input: default@small_alltypesorc1a
-POSTHOOK: Output: default@small_alltypesorc_a
-POSTHOOK: Lineage: small_alltypesorc_a.cbigint SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cbigint, type:bigint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cboolean1 SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cboolean2 SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cdouble SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cdouble, type:double, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cfloat SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cfloat, type:float, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cint SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cint, type:int, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.csmallint SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:csmallint, type:smallint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cstring1 SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cstring1, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cstring2 SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cstring2, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.ctimestamp1 SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.ctimestamp2 SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.ctinyint SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
-PREHOOK: query: desc formatted small_alltypesorc_a
+POSTHOOK: Input: default@small_alltypesorc1a_n2
+POSTHOOK: Output: default@small_alltypesorc_a_n2
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cbigint SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cboolean1 SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cboolean2 SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cdouble SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cdouble, type:double, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cfloat SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cfloat, type:float, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cint SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cint, type:int, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.csmallint SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cstring1 SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cstring1, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cstring2 SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cstring2, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.ctimestamp1 SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.ctimestamp2 SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.ctinyint SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
+PREHOOK: query: desc formatted small_alltypesorc_a_n2
 PREHOOK: type: DESCTABLE
-PREHOOK: Input: default@small_alltypesorc_a
-POSTHOOK: query: desc formatted small_alltypesorc_a
+PREHOOK: Input: default@small_alltypesorc_a_n2
+POSTHOOK: query: desc formatted small_alltypesorc_a_n2
 POSTHOOK: type: DESCTABLE
-POSTHOOK: Input: default@small_alltypesorc_a
+POSTHOOK: Input: default@small_alltypesorc_a_n2
 # col_name            	data_type           	comment             
 ctinyint            	tinyint             	                    
 csmallint           	smallint            	                    
@@ -311,182 +313,182 @@ Bucket Columns:     	[]
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: drop table small_alltypesorc1a
+PREHOOK: query: drop table small_alltypesorc1a_n2
 PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@small_alltypesorc1a
-PREHOOK: Output: default@small_alltypesorc1a
-POSTHOOK: query: drop table small_alltypesorc1a
+PREHOOK: Input: default@small_alltypesorc1a_n2
+PREHOOK: Output: default@small_alltypesorc1a_n2
+POSTHOOK: query: drop table small_alltypesorc1a_n2
 POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: default@small_alltypesorc1a
-POSTHOOK: Output: default@small_alltypesorc1a
-PREHOOK: query: drop table small_alltypesorc2a
+POSTHOOK: Input: default@small_alltypesorc1a_n2
+POSTHOOK: Output: default@small_alltypesorc1a_n2
+PREHOOK: query: drop table small_alltypesorc2a_n2
 PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@small_alltypesorc2a
-PREHOOK: Output: default@small_alltypesorc2a
-POSTHOOK: query: drop table small_alltypesorc2a
+PREHOOK: Input: default@small_alltypesorc2a_n2
+PREHOOK: Output: default@small_alltypesorc2a_n2
+POSTHOOK: query: drop table small_alltypesorc2a_n2
 POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: default@small_alltypesorc2a
-POSTHOOK: Output: default@small_alltypesorc2a
-PREHOOK: query: drop table small_alltypesorc3a
+POSTHOOK: Input: default@small_alltypesorc2a_n2
+POSTHOOK: Output: default@small_alltypesorc2a_n2
+PREHOOK: query: drop table small_alltypesorc3a_n2
 PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@small_alltypesorc3a
-PREHOOK: Output: default@small_alltypesorc3a
-POSTHOOK: query: drop table small_alltypesorc3a
+PREHOOK: Input: default@small_alltypesorc3a_n2
+PREHOOK: Output: default@small_alltypesorc3a_n2
+POSTHOOK: query: drop table small_alltypesorc3a_n2
 POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: default@small_alltypesorc3a
-POSTHOOK: Output: default@small_alltypesorc3a
-PREHOOK: query: drop table small_alltypesorc4a
+POSTHOOK: Input: default@small_alltypesorc3a_n2
+POSTHOOK: Output: default@small_alltypesorc3a_n2
+PREHOOK: query: drop table small_alltypesorc4a_n2
 PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@small_alltypesorc4a
-PREHOOK: Output: default@small_alltypesorc4a
-POSTHOOK: query: drop table small_alltypesorc4a
+PREHOOK: Input: default@small_alltypesorc4a_n2
+PREHOOK: Output: default@small_alltypesorc4a_n2
+POSTHOOK: query: drop table small_alltypesorc4a_n2
 POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: default@small_alltypesorc4a
-POSTHOOK: Output: default@small_alltypesorc4a
-PREHOOK: query: drop table small_alltypesorc_a
+POSTHOOK: Input: default@small_alltypesorc4a_n2
+POSTHOOK: Output: default@small_alltypesorc4a_n2
+PREHOOK: query: drop table small_alltypesorc_a_n2
 PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@small_alltypesorc_a
-PREHOOK: Output: default@small_alltypesorc_a
-POSTHOOK: query: drop table small_alltypesorc_a
+PREHOOK: Input: default@small_alltypesorc_a_n2
+PREHOOK: Output: default@small_alltypesorc_a_n2
+POSTHOOK: query: drop table small_alltypesorc_a_n2
 POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: default@small_alltypesorc_a
-POSTHOOK: Output: default@small_alltypesorc_a
-PREHOOK: query: create table small_alltypesorc1a as select * from alltypesorc where cint is not null and ctinyint is not null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
+POSTHOOK: Input: default@small_alltypesorc_a_n2
+POSTHOOK: Output: default@small_alltypesorc_a_n2
+PREHOOK: query: create table small_alltypesorc1a_n2 as select * from alltypesorc where cint is not null and ctinyint is not null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: database:default
-PREHOOK: Output: default@small_alltypesorc1a
-POSTHOOK: query: create table small_alltypesorc1a as select * from alltypesorc where cint is not null and ctinyint is not null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
+PREHOOK: Output: default@small_alltypesorc1a_n2
+POSTHOOK: query: create table small_alltypesorc1a_n2 as select * from alltypesorc where cint is not null and ctinyint is not null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
-POSTHOOK: Output: default@small_alltypesorc1a
-POSTHOOK: Lineage: small_alltypesorc1a.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cbigint, type:bigint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.cboolean1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.cboolean2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.cfloat SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.cint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cint, type:int, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.csmallint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.cstring1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.cstring2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.ctimestamp1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.ctimestamp2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc1a.ctinyint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
-PREHOOK: query: create table small_alltypesorc2a as select * from alltypesorc where cint is null and ctinyint is not null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
+POSTHOOK: Output: default@small_alltypesorc1a_n2
+POSTHOOK: Lineage: small_alltypesorc1a_n2.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.cboolean1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.cboolean2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.cfloat SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.cint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cint, type:int, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.csmallint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.cstring1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.cstring2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.ctimestamp1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.ctimestamp2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc1a_n2.ctinyint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
+PREHOOK: query: create table small_alltypesorc2a_n2 as select * from alltypesorc where cint is null and ctinyint is not null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: database:default
-PREHOOK: Output: default@small_alltypesorc2a
-POSTHOOK: query: create table small_alltypesorc2a as select * from alltypesorc where cint is null and ctinyint is not null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
+PREHOOK: Output: default@small_alltypesorc2a_n2
+POSTHOOK: query: create table small_alltypesorc2a_n2 as select * from alltypesorc where cint is null and ctinyint is not null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
-POSTHOOK: Output: default@small_alltypesorc2a
-POSTHOOK: Lineage: small_alltypesorc2a.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cbigint, type:bigint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.cboolean1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.cboolean2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.cfloat SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.cint SIMPLE []
-POSTHOOK: Lineage: small_alltypesorc2a.csmallint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.cstring1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.cstring2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.ctimestamp1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.ctimestamp2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc2a.ctinyint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
-PREHOOK: query: create table small_alltypesorc3a as select * from alltypesorc where cint is not null and ctinyint is null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
+POSTHOOK: Output: default@small_alltypesorc2a_n2
+POSTHOOK: Lineage: small_alltypesorc2a_n2.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.cboolean1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.cboolean2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.cfloat SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.cint SIMPLE []
+POSTHOOK: Lineage: small_alltypesorc2a_n2.csmallint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.cstring1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.cstring2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.ctimestamp1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.ctimestamp2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc2a_n2.ctinyint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
+PREHOOK: query: create table small_alltypesorc3a_n2 as select * from alltypesorc where cint is not null and ctinyint is null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: database:default
-PREHOOK: Output: default@small_alltypesorc3a
-POSTHOOK: query: create table small_alltypesorc3a as select * from alltypesorc where cint is not null and ctinyint is null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
+PREHOOK: Output: default@small_alltypesorc3a_n2
+POSTHOOK: query: create table small_alltypesorc3a_n2 as select * from alltypesorc where cint is not null and ctinyint is null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
-POSTHOOK: Output: default@small_alltypesorc3a
-POSTHOOK: Lineage: small_alltypesorc3a.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cbigint, type:bigint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.cboolean1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.cboolean2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.cfloat SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.cint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cint, type:int, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.csmallint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.cstring1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.cstring2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.ctimestamp1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.ctimestamp2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc3a.ctinyint SIMPLE []
-PREHOOK: query: create table small_alltypesorc4a as select * from alltypesorc where cint is null and ctinyint is null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
+POSTHOOK: Output: default@small_alltypesorc3a_n2
+POSTHOOK: Lineage: small_alltypesorc3a_n2.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.cboolean1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.cboolean2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.cfloat SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.cint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cint, type:int, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.csmallint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.cstring1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.cstring2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.ctimestamp1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.ctimestamp2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc3a_n2.ctinyint SIMPLE []
+PREHOOK: query: create table small_alltypesorc4a_n2 as select * from alltypesorc where cint is null and ctinyint is null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: database:default
-PREHOOK: Output: default@small_alltypesorc4a
-POSTHOOK: query: create table small_alltypesorc4a as select * from alltypesorc where cint is null and ctinyint is null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
+PREHOOK: Output: default@small_alltypesorc4a_n2
+POSTHOOK: query: create table small_alltypesorc4a_n2 as select * from alltypesorc where cint is null and ctinyint is null order by ctinyint, csmallint, cint, cbigint, cfloat, cdouble, cstring1, cstring2, ctimestamp1, ctimestamp2, cboolean1, cboolean2 limit 5
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
-POSTHOOK: Output: default@small_alltypesorc4a
-POSTHOOK: Lineage: small_alltypesorc4a.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cbigint, type:bigint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.cboolean1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.cboolean2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.cfloat SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.cint SIMPLE []
-POSTHOOK: Lineage: small_alltypesorc4a.csmallint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.cstring1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.cstring2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.ctimestamp1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.ctimestamp2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc4a.ctinyint SIMPLE []
-PREHOOK: query: create table small_alltypesorc_a stored as orc as select * from
-(select * from (select * from small_alltypesorc1a) sq1
+POSTHOOK: Output: default@small_alltypesorc4a_n2
+POSTHOOK: Lineage: small_alltypesorc4a_n2.cbigint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.cboolean1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.cboolean2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.cdouble SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cdouble, type:double, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.cfloat SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cfloat, type:float, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.cint SIMPLE []
+POSTHOOK: Lineage: small_alltypesorc4a_n2.csmallint SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.cstring1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.cstring2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring2, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.ctimestamp1 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.ctimestamp2 SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc4a_n2.ctinyint SIMPLE []
+PREHOOK: query: create table small_alltypesorc_a_n2 stored as orc as select * from
+(select * from (select * from small_alltypesorc1a_n2) sq1
  union all
- select * from (select * from small_alltypesorc2a) sq2
+ select * from (select * from small_alltypesorc2a_n2) sq2
  union all
- select * from (select * from small_alltypesorc3a) sq3
+ select * from (select * from small_alltypesorc3a_n2) sq3
  union all
- select * from (select * from small_alltypesorc4a) sq4) q
+ select * from (select * from small_alltypesorc4a_n2) sq4) q
 PREHOOK: type: CREATETABLE_AS_SELECT
-PREHOOK: Input: default@small_alltypesorc1a
-PREHOOK: Input: default@small_alltypesorc2a
-PREHOOK: Input: default@small_alltypesorc3a
-PREHOOK: Input: default@small_alltypesorc4a
+PREHOOK: Input: default@small_alltypesorc1a_n2
+PREHOOK: Input: default@small_alltypesorc2a_n2
+PREHOOK: Input: default@small_alltypesorc3a_n2
+PREHOOK: Input: default@small_alltypesorc4a_n2
 PREHOOK: Output: database:default
-PREHOOK: Output: default@small_alltypesorc_a
-POSTHOOK: query: create table small_alltypesorc_a stored as orc as select * from
-(select * from (select * from small_alltypesorc1a) sq1
+PREHOOK: Output: default@small_alltypesorc_a_n2
+POSTHOOK: query: create table small_alltypesorc_a_n2 stored as orc as select * from
+(select * from (select * from small_alltypesorc1a_n2) sq1
  union all
- select * from (select * from small_alltypesorc2a) sq2
+ select * from (select * from small_alltypesorc2a_n2) sq2
  union all
- select * from (select * from small_alltypesorc3a) sq3
+ select * from (select * from small_alltypesorc3a_n2) sq3
  union all
- select * from (select * from small_alltypesorc4a) sq4) q
+ select * from (select * from small_alltypesorc4a_n2) sq4) q
 POSTHOOK: type: CREATETABLE_AS_SELECT
-POSTHOOK: Input: default@small_alltypesorc1a
-POSTHOOK: Input: default@small_alltypesorc2a
-POSTHOOK: Input: default@small_alltypesorc3a
-POSTHOOK: Input: default@small_alltypesorc4a
+POSTHOOK: Input: default@small_alltypesorc1a_n2
+POSTHOOK: Input: default@small_alltypesorc2a_n2
+POSTHOOK: Input: default@small_alltypesorc3a_n2
+POSTHOOK: Input: default@small_alltypesorc4a_n2
 POSTHOOK: Output: database:default
-POSTHOOK: Output: default@small_alltypesorc_a
-POSTHOOK: Lineage: small_alltypesorc_a.cbigint EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cbigint, type:bigint, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:cbigint, type:bigint, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:cbigint, type:bigint, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:cbigint, type:bigint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cboolean1 EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cboolean1, type:boolean, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:cboolean1, type:boolean, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:cboolean1, type:boolean, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cboolean2 EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cboolean2, type:boolean, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:cboolean2, type:boolean, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:cboolean2, type:boolean, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cdouble EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cdouble, type:double, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:cdouble, type:double, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:cdouble, type:double, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:cdouble, type:double, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cfloat EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cfloat, type:float, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:cfloat, type:float, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:cfloat, type:float, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:cfloat, type:float, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cint EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cint, type:int, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:cint, type:int, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:cint, type:int, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:cint, type:int, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.csmallint EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:csmallint, type:smallint, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:csmallint, type:smallint, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:csmallint, type:smallint, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:csmallint, type:smallint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cstring1 EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cstring1, type:string, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:cstring1, type:string, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:cstring1, type:string, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:cstring1, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cstring2 EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cstring2, type:string, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:cstring2, type:string, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:cstring2, type:string, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:cstring2, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.ctimestamp1 EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.ctimestamp2 EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.ctinyint EXPRESSION [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:ctinyint, type:tinyint, comment:null), (small_alltypesorc2a)small_alltypesorc2a.FieldSchema(name:ctinyint, type:tinyint, comment:null), (small_alltypesorc3a)small_alltypesorc3a.FieldSchema(name:ctinyint, type:tinyint, comment:null), (small_alltypesorc4a)small_alltypesorc4a.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
-PREHOOK: query: desc formatted small_alltypesorc_a
+POSTHOOK: Output: default@small_alltypesorc_a_n2
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cbigint EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cbigint, type:bigint, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:cbigint, type:bigint, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:cbigint, type:bigint, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cboolean1 EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cboolean1, type:boolean, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:cboolean1, type:boolean, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:cboolean1, type:boolean, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cboolean2 EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cboolean2, type:boolean, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:cboolean2, type:boolean, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:cboolean2, type:boolean, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cdouble EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cdouble, type:double, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:cdouble, type:double, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:cdouble, type:double, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:cdouble, type:double, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cfloat EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cfloat, type:float, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:cfloat, type:float, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:cfloat, type:float, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:cfloat, type:float, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cint EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cint, type:int, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:cint, type:int, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:cint, type:int, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:cint, type:int, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.csmallint EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:csmallint, type:smallint, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:csmallint, type:smallint, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:csmallint, type:smallint, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cstring1 EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cstring1, type:string, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:cstring1, type:string, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:cstring1, type:string, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:cstring1, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cstring2 EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cstring2, type:string, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:cstring2, type:string, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:cstring2, type:string, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:cstring2, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.ctimestamp1 EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.ctimestamp2 EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.ctinyint EXPRESSION [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:ctinyint, type:tinyint, comment:null), (small_alltypesorc2a_n2)small_alltypesorc2a_n2.FieldSchema(name:ctinyint, type:tinyint, comment:null), (small_alltypesorc3a_n2)small_alltypesorc3a_n2.FieldSchema(name:ctinyint, type:tinyint, comment:null), (small_alltypesorc4a_n2)small_alltypesorc4a_n2.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
+PREHOOK: query: desc formatted small_alltypesorc_a_n2
 PREHOOK: type: DESCTABLE
-PREHOOK: Input: default@small_alltypesorc_a
-POSTHOOK: query: desc formatted small_alltypesorc_a
+PREHOOK: Input: default@small_alltypesorc_a_n2
+POSTHOOK: query: desc formatted small_alltypesorc_a_n2
 POSTHOOK: type: DESCTABLE
-POSTHOOK: Input: default@small_alltypesorc_a
+POSTHOOK: Input: default@small_alltypesorc_a_n2
 # col_name            	data_type           	comment             
 ctinyint            	tinyint             	                    
 csmallint           	smallint            	                    
@@ -513,7 +515,11 @@ Table Parameters:
 	numFiles            	1                   
 	numRows             	5                   
 	rawDataSize         	1069                
+<<<<<<< HEAD
+	totalSize           	3243                
+=======
 	totalSize           	3247                
+>>>>>>> asf/master
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -526,20 +532,20 @@ Bucket Columns:     	[]
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: ANALYZE TABLE small_alltypesorc_a COMPUTE STATISTICS
+PREHOOK: query: ANALYZE TABLE small_alltypesorc_a_n2 COMPUTE STATISTICS
 PREHOOK: type: QUERY
-PREHOOK: Input: default@small_alltypesorc_a
-PREHOOK: Output: default@small_alltypesorc_a
-POSTHOOK: query: ANALYZE TABLE small_alltypesorc_a COMPUTE STATISTICS
+PREHOOK: Input: default@small_alltypesorc_a_n2
+PREHOOK: Output: default@small_alltypesorc_a_n2
+POSTHOOK: query: ANALYZE TABLE small_alltypesorc_a_n2 COMPUTE STATISTICS
 POSTHOOK: type: QUERY
-POSTHOOK: Input: default@small_alltypesorc_a
-POSTHOOK: Output: default@small_alltypesorc_a
-PREHOOK: query: desc formatted small_alltypesorc_a
+POSTHOOK: Input: default@small_alltypesorc_a_n2
+POSTHOOK: Output: default@small_alltypesorc_a_n2
+PREHOOK: query: desc formatted small_alltypesorc_a_n2
 PREHOOK: type: DESCTABLE
-PREHOOK: Input: default@small_alltypesorc_a
-POSTHOOK: query: desc formatted small_alltypesorc_a
+PREHOOK: Input: default@small_alltypesorc_a_n2
+POSTHOOK: query: desc formatted small_alltypesorc_a_n2
 POSTHOOK: type: DESCTABLE
-POSTHOOK: Input: default@small_alltypesorc_a
+POSTHOOK: Input: default@small_alltypesorc_a_n2
 # col_name            	data_type           	comment             
 ctinyint            	tinyint             	                    
 csmallint           	smallint            	                    
@@ -566,7 +572,11 @@ Table Parameters:
 	numFiles            	1                   
 	numRows             	15                  
 	rawDataSize         	3320                
+<<<<<<< HEAD
+	totalSize           	3243                
+=======
 	totalSize           	3247                
+>>>>>>> asf/master
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -579,32 +589,32 @@ Bucket Columns:     	[]
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: insert into table small_alltypesorc_a select * from small_alltypesorc1a
+PREHOOK: query: insert into table small_alltypesorc_a_n2 select * from small_alltypesorc1a_n2
 PREHOOK: type: QUERY
-PREHOOK: Input: default@small_alltypesorc1a
-PREHOOK: Output: default@small_alltypesorc_a
-POSTHOOK: query: insert into table small_alltypesorc_a select * from small_alltypesorc1a
+PREHOOK: Input: default@small_alltypesorc1a_n2
+PREHOOK: Output: default@small_alltypesorc_a_n2
+POSTHOOK: query: insert into table small_alltypesorc_a_n2 select * from small_alltypesorc1a_n2
 POSTHOOK: type: QUERY
-POSTHOOK: Input: default@small_alltypesorc1a
-POSTHOOK: Output: default@small_alltypesorc_a
-POSTHOOK: Lineage: small_alltypesorc_a.cbigint SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cbigint, type:bigint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cboolean1 SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cboolean2 SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cdouble SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cdouble, type:double, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cfloat SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cfloat, type:float, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cint SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cint, type:int, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.csmallint SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:csmallint, type:smallint, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cstring1 SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cstring1, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.cstring2 SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:cstring2, type:string, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.ctimestamp1 SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.ctimestamp2 SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
-POSTHOOK: Lineage: small_alltypesorc_a.ctinyint SIMPLE [(small_alltypesorc1a)small_alltypesorc1a.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
-PREHOOK: query: desc formatted small_alltypesorc_a
+POSTHOOK: Input: default@small_alltypesorc1a_n2
+POSTHOOK: Output: default@small_alltypesorc_a_n2
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cbigint SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cboolean1 SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cboolean1, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cboolean2 SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cboolean2, type:boolean, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cdouble SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cdouble, type:double, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cfloat SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cfloat, type:float, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cint SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cint, type:int, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.csmallint SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cstring1 SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cstring1, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.cstring2 SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:cstring2, type:string, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.ctimestamp1 SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:ctimestamp1, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.ctimestamp2 SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:ctimestamp2, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: small_alltypesorc_a_n2.ctinyint SIMPLE [(small_alltypesorc1a_n2)small_alltypesorc1a_n2.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
+PREHOOK: query: desc formatted small_alltypesorc_a_n2
 PREHOOK: type: DESCTABLE
-PREHOOK: Input: default@small_alltypesorc_a
-POSTHOOK: query: desc formatted small_alltypesorc_a
+PREHOOK: Input: default@small_alltypesorc_a_n2
+POSTHOOK: query: desc formatted small_alltypesorc_a_n2
 POSTHOOK: type: DESCTABLE
-POSTHOOK: Input: default@small_alltypesorc_a
+POSTHOOK: Input: default@small_alltypesorc_a_n2
 # col_name            	data_type           	comment             
 ctinyint            	tinyint             	                    
 csmallint           	smallint            	                    
@@ -631,7 +641,11 @@ Table Parameters:
 	numFiles            	2                   
 	numRows             	20                  
 	rawDataSize         	4389                
+<<<<<<< HEAD
+	totalSize           	4616                
+=======
 	totalSize           	4620                
+>>>>>>> asf/master
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/mapjoin47.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/mapjoin47.q.out b/ql/src/test/results/clientpositive/mapjoin47.q.out
index 0f67c38..cd61cee 100644
--- a/ql/src/test/results/clientpositive/mapjoin47.q.out
+++ b/ql/src/test/results/clientpositive/mapjoin47.q.out
@@ -1004,7 +1004,7 @@ POSTHOOK: Input: default@src1
 4	val_4	NULL	NULL	66	val_66
 35	val_35	NULL	NULL	66	val_66
 12	val_12	NULL	NULL	66	val_66
-Warning: Map Join MAPJOIN[18][bigTable=?] in task 'Stage-7:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[26][bigTable=?] in task 'Stage-7:MAPRED' is a cross product
 PREHOOK: query: EXPLAIN
 SELECT *
 FROM src
@@ -1175,7 +1175,7 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-Warning: Map Join MAPJOIN[18][bigTable=?] in task 'Stage-7:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[26][bigTable=?] in task 'Stage-7:MAPRED' is a cross product
 PREHOOK: query: SELECT *
 FROM src
 JOIN src1 a ON (a.key+src.key >= 100)

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/spark/query77.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query77.q.out b/ql/src/test/results/clientpositive/perf/spark/query77.q.out
index eea0f1d..e4362a6 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query77.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query77.q.out
@@ -1,4 +1,4 @@
-Warning: Map Join MAPJOIN[149][bigTable=?] in task 'Stage-1:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[182][bigTable=?] in task 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: explain
 with ss as
  (select s_store_sk,


[13/14] hive git commit: HIVE-19237: Only use an operatorId once in a plan (Zoltan Haindrich reviewed by Ashutosh Chauhan)

Posted by kg...@apache.org.
HIVE-19237: Only use an operatorId once in a plan (Zoltan Haindrich reviewed by Ashutosh Chauhan)

Signed-off-by: Zoltan Haindrich <ki...@rxd.hu>


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

Branch: refs/heads/master
Commit: 2842f88e228bb4f11e587fb41338c9a770c96262
Parents: 24a98ea
Author: Zoltan Haindrich <ki...@rxd.hu>
Authored: Mon Jun 11 08:01:49 2018 +0200
Committer: Zoltan Haindrich <ki...@rxd.hu>
Committed: Mon Jun 11 08:01:49 2018 +0200

----------------------------------------------------------------------
 data/conf/llap/hive-site.xml                    |    2 +-
 .../java/org/apache/hadoop/hive/ql/Context.java |    5 +
 .../apache/hadoop/hive/ql/exec/Operator.java    |   23 +-
 .../hadoop/hive/ql/exec/OperatorUtils.java      |    4 +-
 .../hive/ql/exec/SerializationUtilities.java    |   14 +-
 .../ql/hooks/NoOperatorReuseCheckerHook.java    |  109 ++
 .../ql/optimizer/physical/MemoryDecider.java    |   12 +-
 .../ql/optimizer/physical/SerializeFilter.java  |    6 +-
 .../ql/parse/ColumnStatsAutoGatherContext.java  |    1 +
 .../hive/ql/parse/spark/SplitOpTreeForDPP.java  |    7 +-
 .../hadoop/hive/ql/plan/MergeJoinWork.java      |    7 +-
 .../ql/plan/mapping/TestCounterMapping.java     |    8 +-
 .../hive/ql/plan/mapping/TestOperatorCmp.java   |   16 +-
 .../results/clientpositive/auto_join0.q.out     |    8 +-
 .../cbo_rp_cross_product_check_2.q.out          |    4 +-
 .../clientpositive/cross_product_check_2.q.out  |    4 +-
 .../llap/bucketizedhiveinputformat.q.out        |    2 +-
 .../clientpositive/llap/constprog_dpp.q.out     |   28 +-
 .../clientpositive/llap/dp_counter_mm.q.out     |  172 +-
 .../clientpositive/llap/dp_counter_non_mm.q.out |  172 +-
 .../llap/dynamic_semijoin_user_level.q.out      |   16 +-
 .../clientpositive/llap/explainanalyze_2.q.out  |  672 +++----
 .../clientpositive/llap/explainuser_1.q.out     |  128 +-
 .../clientpositive/llap/explainuser_2.q.out     | 1840 +++++++++---------
 .../results/clientpositive/llap/lineage3.q.out  |    9 +-
 .../llap/table_access_keys_stats.q.out          |    2 +-
 .../llap/tez_input_counters.q.out               |   14 +-
 .../clientpositive/llap/union_fast_stats.q.out  |  624 +++---
 .../test/results/clientpositive/mapjoin47.q.out |    4 +-
 .../clientpositive/perf/spark/query77.q.out     |    2 +-
 .../clientpositive/perf/tez/query14.q.out       |  746 +++----
 .../clientpositive/perf/tez/query2.q.out        |   52 +-
 .../clientpositive/perf/tez/query23.q.out       |  196 +-
 .../clientpositive/perf/tez/query33.q.out       |  106 +-
 .../clientpositive/perf/tez/query38.q.out       |  106 +-
 .../clientpositive/perf/tez/query49.q.out       |  154 +-
 .../clientpositive/perf/tez/query5.q.out        |  140 +-
 .../clientpositive/perf/tez/query54.q.out       |  160 +-
 .../clientpositive/perf/tez/query56.q.out       |  106 +-
 .../clientpositive/perf/tez/query60.q.out       |  106 +-
 .../clientpositive/perf/tez/query66.q.out       |   96 +-
 .../clientpositive/perf/tez/query71.q.out       |   86 +-
 .../clientpositive/perf/tez/query75.q.out       |  236 +--
 .../clientpositive/perf/tez/query76.q.out       |   96 +-
 .../clientpositive/perf/tez/query77.q.out       |  168 +-
 .../clientpositive/perf/tez/query8.q.out        |   84 +-
 .../clientpositive/perf/tez/query80.q.out       |  162 +-
 .../clientpositive/perf/tez/query87.q.out       |  132 +-
 .../results/clientpositive/smb_mapjoin_25.q.out |   16 +-
 .../results/clientpositive/smb_mapjoin_47.q.out |    4 +-
 .../spark/spark_explainuser_1.q.out             |   64 +-
 .../clientpositive/subquery_multiinsert.q.out   |   12 +-
 .../clientpositive/tez/explainanalyze_1.q.out   |   36 +-
 .../clientpositive/tez/explainanalyze_3.q.out   |   16 +-
 .../clientpositive/tez/explainanalyze_5.q.out   |   28 +-
 .../clientpositive/tez/explainuser_3.q.out      |   12 +-
 .../clientpositive/vector_groupby_mapjoin.q.out |    8 +-
 57 files changed, 3621 insertions(+), 3422 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/data/conf/llap/hive-site.xml
----------------------------------------------------------------------
diff --git a/data/conf/llap/hive-site.xml b/data/conf/llap/hive-site.xml
index 1507a56..44ca6c9 100644
--- a/data/conf/llap/hive-site.xml
+++ b/data/conf/llap/hive-site.xml
@@ -163,7 +163,7 @@
 
 <property>
   <name>hive.exec.post.hooks</name>
-  <value>org.apache.hadoop.hive.ql.hooks.PostExecutePrinter, org.apache.hadoop.hive.ql.hooks.RuntimeStatsPersistenceCheckerHook</value>
+  <value>org.apache.hadoop.hive.ql.hooks.PostExecutePrinter, org.apache.hadoop.hive.ql.hooks.RuntimeStatsPersistenceCheckerHook, org.apache.hadoop.hive.ql.hooks.NoOperatorReuseCheckerHook</value>
   <description>Post Execute Hook for Tests</description>
 </property>
 

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/java/org/apache/hadoop/hive/ql/Context.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/Context.java b/ql/src/java/org/apache/hadoop/hive/ql/Context.java
index 9eda4ed..e4e3d48 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/Context.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/Context.java
@@ -1026,6 +1026,10 @@ public class Context {
     return opContext;
   }
 
+  public void setOpContext(CompilationOpContext opContext) {
+    this.opContext = opContext;
+  }
+
   public Heartbeater getHeartbeater() {
     return heartbeater;
   }
@@ -1124,4 +1128,5 @@ public class Context {
   public void setTempTableForLoad(Table tempTableForLoad) {
     this.tempTableForLoad = tempTableForLoad;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java
index 4e9784d..acadb43 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java
@@ -89,6 +89,7 @@ public abstract class Operator<T extends OperatorDesc> implements Serializable,C
   protected int indexForTezUnion = -1;
   private transient Configuration hconf;
   protected final transient Collection<Future<?>> asyncInitOperations = new HashSet<>();
+  private String marker;
 
   protected int bucketingVersion = -1;
   // It can be optimized later so that an operator operator (init/close) is performed
@@ -134,6 +135,7 @@ public abstract class Operator<T extends OperatorDesc> implements Serializable,C
     initOperatorId();
   }
 
+  /** Kryo ctor. */
   protected Operator() {
     childOperators = new ArrayList<Operator<? extends OperatorDesc>>();
     parentOperators = new ArrayList<Operator<? extends OperatorDesc>>();
@@ -244,10 +246,6 @@ public abstract class Operator<T extends OperatorDesc> implements Serializable,C
   protected transient ObjectInspector outputObjInspector;
 
 
-  public void setId(String id) {
-    this.id = id;
-  }
-
   /**
    * This function is not named getId(), to make sure java serialization does
    * NOT serialize it. Some TestParse tests will fail if we serialize this
@@ -1167,12 +1165,16 @@ public abstract class Operator<T extends OperatorDesc> implements Serializable,C
     return operatorId;
   }
 
-  public void initOperatorId() {
-    setOperatorId(getName() + "_" + this.id);
+  public String getMarker() {
+    return marker;
   }
 
-  public void setOperatorId(String operatorId) {
-    this.operatorId = operatorId;
+  public void setMarker(String marker) {
+    this.marker = marker;
+  }
+
+  public void initOperatorId() {
+    this.operatorId = getName() + "_" + this.id;
   }
 
   /*
@@ -1539,7 +1541,12 @@ public abstract class Operator<T extends OperatorDesc> implements Serializable,C
   }
 
   public void setCompilationOpContext(CompilationOpContext ctx) {
+    if (cContext == ctx) {
+      return;
+    }
     cContext = ctx;
+    id = String.valueOf(ctx.nextOperatorId());
+    initOperatorId();
   }
 
   /** @return Compilation operator context. Only available during compilation. */

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorUtils.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorUtils.java
index 4634928..7b2ae40 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorUtils.java
@@ -427,12 +427,12 @@ public class OperatorUtils {
     return matchingOps;
   }
 
-  public static Operator<?> findOperatorById(Operator<?> start, String opId) {
+  public static Operator<?> findOperatorByMarker(Operator<?> start, String marker) {
     Deque<Operator<?>> queue = new ArrayDeque<>();
     queue.add(start);
     while (!queue.isEmpty()) {
       Operator<?> op = queue.remove();
-      if (op.getOperatorId().equals(opId)) {
+      if (marker.equals(op.getMarker())) {
         return op;
       }
       if (op.getChildOperators() != null) {

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java
index 66f0a00..ed1566f 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java
@@ -17,8 +17,6 @@
  */
 package org.apache.hadoop.hive.ql.exec;
 
-import java.util.LinkedList;
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
@@ -30,8 +28,10 @@ import java.lang.reflect.Field;
 import java.net.URI;
 import java.sql.Timestamp;
 import java.time.ZoneId;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
@@ -39,16 +39,14 @@ import java.util.Properties;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hive.common.type.TimestampTZ;
 import org.apache.hadoop.hive.common.CopyOnFirstWriteProperties;
+import org.apache.hadoop.hive.common.type.TimestampTZ;
 import org.apache.hadoop.hive.ql.CompilationOpContext;
 import org.apache.hadoop.hive.ql.exec.vector.VectorFileSinkOperator;
 import org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat;
 import org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat;
 import org.apache.hadoop.hive.ql.io.RCFileInputFormat;
 import org.apache.hadoop.hive.ql.log.PerfLogger;
-import org.apache.hadoop.hive.ql.metadata.Hive;
-import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.ql.plan.AbstractOperatorDesc;
 import org.apache.hadoop.hive.ql.plan.BaseWork;
 import org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc;
@@ -225,6 +223,7 @@ public class SerializationUtilities {
   private static final Object FAKE_REFERENCE = new Object();
 
   private static KryoFactory factory = new KryoFactory() {
+    @Override
     public Kryo create() {
       KryoWithHooks kryo = new KryoWithHooks();
       kryo.register(java.sql.Date.class, new SqlDateSerializer());
@@ -646,8 +645,11 @@ public class SerializationUtilities {
    * @return The clone.
    */
   public static List<Operator<?>> cloneOperatorTree(List<Operator<?>> roots) {
+    if (roots.isEmpty()) {
+      return new ArrayList<>();
+    }
     ByteArrayOutputStream baos = new ByteArrayOutputStream(4096);
-    CompilationOpContext ctx = roots.isEmpty() ? null : roots.get(0).getCompilationOpContext();
+    CompilationOpContext ctx = roots.get(0).getCompilationOpContext();
     serializePlan(roots, baos, true);
     @SuppressWarnings("unchecked")
     List<Operator<?>> result =

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/java/org/apache/hadoop/hive/ql/hooks/NoOperatorReuseCheckerHook.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/hooks/NoOperatorReuseCheckerHook.java b/ql/src/java/org/apache/hadoop/hive/ql/hooks/NoOperatorReuseCheckerHook.java
new file mode 100644
index 0000000..3fc5429
--- /dev/null
+++ b/ql/src/java/org/apache/hadoop/hive/ql/hooks/NoOperatorReuseCheckerHook.java
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.ql.hooks;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Stack;
+
+import org.apache.hadoop.hbase.shaded.com.google.common.collect.Lists;
+import org.apache.hadoop.hive.ql.exec.Operator;
+import org.apache.hadoop.hive.ql.exec.Task;
+import org.apache.hadoop.hive.ql.lib.DefaultGraphWalker;
+import org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher;
+import org.apache.hadoop.hive.ql.lib.Dispatcher;
+import org.apache.hadoop.hive.ql.lib.GraphWalker;
+import org.apache.hadoop.hive.ql.lib.Node;
+import org.apache.hadoop.hive.ql.lib.NodeProcessor;
+import org.apache.hadoop.hive.ql.lib.NodeProcessorCtx;
+import org.apache.hadoop.hive.ql.parse.SemanticException;
+import org.apache.hadoop.hive.ql.plan.BaseWork;
+import org.apache.hadoop.hive.ql.plan.MapWork;
+import org.apache.hadoop.hive.ql.plan.MapredWork;
+import org.apache.hadoop.hive.ql.plan.ReduceWork;
+import org.apache.hadoop.hive.ql.plan.TezWork;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Checks whenever operator ids are not reused.
+ */
+public class NoOperatorReuseCheckerHook implements ExecuteWithHookContext {
+
+  private static final Logger LOG = LoggerFactory.getLogger(NoOperatorReuseCheckerHook.class);
+
+  static class UniqueOpIdChecker implements NodeProcessor {
+
+    Map<String, Operator<?>> opMap = new HashMap<>();
+
+    @Override
+    public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs)
+        throws SemanticException {
+      Operator op = (Operator) nd;
+      String opKey = op.getOperatorId();
+      Operator<?> found = opMap.get(opKey);
+      if (found != null) {
+        throw new RuntimeException("operator id reuse found: " + opKey);
+      }
+      opMap.put(opKey, op);
+      return null;
+    }
+  }
+
+  @Override
+  public void run(HookContext hookContext) throws Exception {
+
+    List<Node> rootOps = Lists.newArrayList();
+
+    ArrayList<Task<? extends Serializable>> roots = hookContext.getQueryPlan().getRootTasks();
+    for (Task<? extends Serializable> task : roots) {
+
+      Object work = task.getWork();
+      if (work instanceof MapredWork) {
+        MapredWork mapredWork = (MapredWork) work;
+        MapWork mapWork = mapredWork.getMapWork();
+        if (mapWork != null) {
+          rootOps.addAll(mapWork.getAllRootOperators());
+        }
+        ReduceWork reduceWork = mapredWork.getReduceWork();
+        if (reduceWork != null) {
+          rootOps.addAll(reduceWork.getAllRootOperators());
+        }
+      }
+      if (work instanceof TezWork) {
+        for (BaseWork bw : ((TezWork) work).getAllWorkUnsorted()) {
+          rootOps.addAll(bw.getAllRootOperators());
+        }
+      }
+    }
+    if (rootOps.isEmpty()) {
+      return;
+    }
+
+    Dispatcher disp = new DefaultRuleDispatcher(new UniqueOpIdChecker(), new HashMap<>(), null);
+    GraphWalker ogw = new DefaultGraphWalker(disp);
+
+    HashMap<Node, Object> nodeOutput = new HashMap<Node, Object>();
+    ogw.startWalking(rootOps, nodeOutput);
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/MemoryDecider.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/MemoryDecider.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/MemoryDecider.java
index bf7a644..64f1e7b 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/MemoryDecider.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/MemoryDecider.java
@@ -20,21 +20,19 @@ package org.apache.hadoop.hive.ql.optimizer.physical;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Comparator;
-import java.util.Iterator;
 import java.util.HashMap;
-import java.util.Map;
+import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
+import java.util.Map;
 import java.util.Set;
 import java.util.SortedSet;
 import java.util.Stack;
 import java.util.TreeSet;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.hadoop.hive.conf.HiveConf;
-import org.apache.hadoop.hive.ql.exec.StatsTask;
 import org.apache.hadoop.hive.ql.exec.MapJoinOperator;
+import org.apache.hadoop.hive.ql.exec.StatsTask;
 import org.apache.hadoop.hive.ql.exec.Task;
 import org.apache.hadoop.hive.ql.exec.tez.TezTask;
 import org.apache.hadoop.hive.ql.lib.DefaultGraphWalker;
@@ -54,6 +52,8 @@ import org.apache.hadoop.hive.ql.plan.MapWork;
 import org.apache.hadoop.hive.ql.plan.MergeJoinWork;
 import org.apache.hadoop.hive.ql.plan.ReduceWork;
 import org.apache.hadoop.hive.ql.plan.TezWork;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * MemoryDecider is a simple physical optimizer that adjusts the memory layout of tez tasks.
@@ -129,7 +129,7 @@ public class MemoryDecider implements PhysicalPlanResolver {
       Dispatcher disp = null;
       final Set<MapJoinOperator> mapJoins = new LinkedHashSet<MapJoinOperator>();
 
-      Map<Rule, NodeProcessor> rules = new HashMap<Rule, NodeProcessor>();
+      LinkedHashMap<Rule, NodeProcessor> rules = new LinkedHashMap<Rule, NodeProcessor>();
       rules.put(new RuleRegExp("Map join memory estimator",
               MapJoinOperator.getOperatorName() + "%"), new NodeProcessor() {
           @Override

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/SerializeFilter.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/SerializeFilter.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/SerializeFilter.java
index 6a0ca5d..9224350 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/SerializeFilter.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/SerializeFilter.java
@@ -19,15 +19,13 @@ package org.apache.hadoop.hive.ql.optimizer.physical;
 
 import java.io.Serializable;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
-import java.util.Map;
 import java.util.Set;
 import java.util.Stack;
 
-import org.apache.hadoop.hive.ql.exec.StatsTask;
 import org.apache.hadoop.hive.ql.exec.SerializationUtilities;
+import org.apache.hadoop.hive.ql.exec.StatsTask;
 import org.apache.hadoop.hive.ql.exec.TableScanOperator;
 import org.apache.hadoop.hive.ql.exec.Task;
 import org.apache.hadoop.hive.ql.exec.tez.TezTask;
@@ -115,7 +113,7 @@ public class SerializeFilter implements PhysicalPlanResolver {
       Dispatcher disp = null;
       final Set<TableScanOperator> tableScans = new LinkedHashSet<TableScanOperator>();
 
-      Map<Rule, NodeProcessor> rules = new HashMap<Rule, NodeProcessor>();
+      LinkedHashMap<Rule, NodeProcessor> rules = new LinkedHashMap<Rule, NodeProcessor>();
       rules.put(new RuleRegExp("TS finder",
               TableScanOperator.getOperatorName() + "%"), new NodeProcessor() {
           @Override

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java
index fe26283..de0282f 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java
@@ -127,6 +127,7 @@ public class ColumnStatsAutoGatherContext {
   private Operator genSelOpForAnalyze(String analyzeCommand, Context origCtx) throws IOException, ParseException, SemanticException{
     //0. initialization
     Context ctx = new Context(conf);
+    ctx.setOpContext(origCtx.getOpContext());
     ctx.setExplainConfig(origCtx.getExplainConfig());
     ASTNode tree = ParseUtils.parse(analyzeCommand, ctx);
 

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/java/org/apache/hadoop/hive/ql/parse/spark/SplitOpTreeForDPP.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/spark/SplitOpTreeForDPP.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/spark/SplitOpTreeForDPP.java
index b0d7eec..b9c2c1c 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/spark/SplitOpTreeForDPP.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/spark/SplitOpTreeForDPP.java
@@ -25,7 +25,6 @@ import java.util.List;
 import java.util.Set;
 import java.util.Stack;
 
-import com.google.common.base.Preconditions;
 import org.apache.hadoop.hive.ql.exec.Operator;
 import org.apache.hadoop.hive.ql.exec.OperatorUtils;
 import org.apache.hadoop.hive.ql.exec.SerializationUtilities;
@@ -37,6 +36,8 @@ import org.apache.hadoop.hive.ql.lib.NodeProcessor;
 import org.apache.hadoop.hive.ql.lib.NodeProcessorCtx;
 import org.apache.hadoop.hive.ql.parse.SemanticException;
 
+import com.google.common.base.Preconditions;
+
 
 /**
  * This processor triggers on SparkPartitionPruningSinkOperator. For a operator tree like
@@ -100,6 +101,8 @@ public class SplitOpTreeForDPP implements NodeProcessor {
     collectRoots(roots, pruningSinkOp);
 
     Operator<?> branchingOp = pruningSinkOp.getBranchingOp();
+    String marker = "SPARK_DPP_BRANCH_POINT_" + branchingOp.getOperatorId();
+    branchingOp.setMarker(marker);
     List<Operator<?>> savedChildOps = branchingOp.getChildOperators();
     List<Operator<?>> firstNodesOfPruningBranch = findFirstNodesOfPruningBranch(branchingOp);
     branchingOp.setChildOperators(null);
@@ -115,7 +118,7 @@ public class SplitOpTreeForDPP implements NodeProcessor {
 
     Operator newBranchingOp = null;
     for (int i = 0; i < newRoots.size() && newBranchingOp == null; i++) {
-      newBranchingOp = OperatorUtils.findOperatorById(newRoots.get(i), branchingOp.getOperatorId());
+      newBranchingOp = OperatorUtils.findOperatorByMarker(newRoots.get(i), marker);
     }
     Preconditions.checkNotNull(newBranchingOp,
         "Cannot find the branching operator in cloned tree.");

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/java/org/apache/hadoop/hive/ql/plan/MergeJoinWork.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/MergeJoinWork.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/MergeJoinWork.java
index 24ce898..45f3347 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/MergeJoinWork.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/MergeJoinWork.java
@@ -19,7 +19,7 @@
 package org.apache.hadoop.hive.ql.plan;
 
 import java.util.ArrayList;
-import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -49,7 +49,7 @@ public class MergeJoinWork extends BaseWork {
 
   @Override
   public Set<Operator<?>> getAllRootOperators() {
-    Set<Operator<?>> set = new HashSet<>();
+    Set<Operator<?>> set = new LinkedHashSet<>();
     set.addAll(getMainWork().getAllRootOperators());
     for (BaseWork w : mergeWorkList) {
       set.addAll(w.getAllRootOperators());
@@ -92,7 +92,7 @@ public class MergeJoinWork extends BaseWork {
          * output name in the reduce sink needs to be setup appropriately. In the case of reduce
          * side merge work, we need to ensure that the parent work that provides data to this merge
          * work is setup to point to the right vertex name - the main work name.
-         * 
+         *
          * In this case, if the big table work has already been created, we can hook up the merge
          * work items for the small table correctly.
          */
@@ -176,6 +176,7 @@ public class MergeJoinWork extends BaseWork {
     return getMainWork().getLlapMode();
   }
 
+  @Override
   public void addDummyOp(HashTableDummyOperator dummyOp) {
     getMainWork().addDummyOp(dummyOp);
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/org/apache/hadoop/hive/ql/plan/mapping/TestCounterMapping.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/plan/mapping/TestCounterMapping.java b/ql/src/test/org/apache/hadoop/hive/ql/plan/mapping/TestCounterMapping.java
index e8a7a1b..b57b5dd 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/plan/mapping/TestCounterMapping.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/plan/mapping/TestCounterMapping.java
@@ -62,7 +62,13 @@ public class TestCounterMapping {
 
     @Override
     public int compare(Operator<?> o1, Operator<?> o2) {
-      return Objects.compare(o1.getOperatorId(), o2.getOperatorId(), Comparator.naturalOrder());
+      Long id1 = Long.valueOf(o1.getIdentifier());
+      Long id2 = Long.valueOf(o2.getIdentifier());
+      int c0 = Objects.compare(o1.getOperatorName(), o2.getOperatorName(), Comparator.naturalOrder());
+      if (c0 != 0) {
+        return c0;
+      }
+      return Long.compare(id1, id2);
     }
   };
 

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/org/apache/hadoop/hive/ql/plan/mapping/TestOperatorCmp.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/plan/mapping/TestOperatorCmp.java b/ql/src/test/org/apache/hadoop/hive/ql/plan/mapping/TestOperatorCmp.java
index 3e3e0b0..87d06ae 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/plan/mapping/TestOperatorCmp.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/plan/mapping/TestOperatorCmp.java
@@ -21,7 +21,6 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-import java.util.Iterator;
 import java.util.List;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
@@ -35,7 +34,6 @@ import org.apache.hadoop.hive.ql.exec.TableScanOperator;
 import org.apache.hadoop.hive.ql.optimizer.signature.TestOperatorSignature;
 import org.apache.hadoop.hive.ql.parse.ParseException;
 import org.apache.hadoop.hive.ql.plan.mapper.PlanMapper;
-import org.apache.hadoop.hive.ql.plan.mapper.PlanMapper.EquivGroup;
 import org.apache.hadoop.hive.ql.session.SessionState;
 import org.apache.hadoop.hive.ql.stats.OperatorStatsReaderHook;
 import org.apache.hive.testutils.HiveTestEnvSetup;
@@ -102,15 +100,19 @@ public class TestOperatorCmp {
     String query = "select u from tu where id_uv = 1 union all select v from tv where id_uv = 1";
 
     PlanMapper pm = getMapperForQuery(driver, query);
-    Iterator<EquivGroup> itG = pm.iterateGroups();
     List<FilterOperator> fos = pm.getAll(FilterOperator.class);
     // the same operator is present 2 times
-    fos.sort(TestCounterMapping.OPERATOR_ID_COMPARATOR.reversed());
     assertEquals(4, fos.size());
 
-    assertTrue("logicalEquals", compareOperators(fos.get(0), fos.get(1)));
-    assertFalse("logicalEquals", compareOperators(fos.get(0), fos.get(2)));
-    assertTrue("logicalEquals", compareOperators(fos.get(2), fos.get(3)));
+    int cnt = 0;
+    for (int i = 0; i < 3; i++) {
+      for (int j = i + 1; j < 4; j++) {
+        if (compareOperators(fos.get(i), fos.get(j))) {
+          cnt++;
+        }
+      }
+    }
+    assertEquals(2, cnt);
 
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/auto_join0.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join0.q.out b/ql/src/test/results/clientpositive/auto_join0.q.out
index da036b7..17fc2fd 100644
--- a/ql/src/test/results/clientpositive/auto_join0.q.out
+++ b/ql/src/test/results/clientpositive/auto_join0.q.out
@@ -1,5 +1,5 @@
-Warning: Map Join MAPJOIN[28][bigTable=?] in task 'Stage-5:MAPRED' is a cross product
-Warning: Map Join MAPJOIN[29][bigTable=?] in task 'Stage-6:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[35][bigTable=?] in task 'Stage-5:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[43][bigTable=?] in task 'Stage-6:MAPRED' is a cross product
 Warning: Shuffle Join JOIN[12][tables = [src1, src2]] in Stage 'Stage-2:MAPRED' is a cross product
 PREHOOK: query: explain 
 select sum(hash(a.k1,a.v1,a.k2, a.v2))
@@ -244,8 +244,8 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-Warning: Map Join MAPJOIN[28][bigTable=?] in task 'Stage-5:MAPRED' is a cross product
-Warning: Map Join MAPJOIN[29][bigTable=?] in task 'Stage-6:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[35][bigTable=?] in task 'Stage-5:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[43][bigTable=?] in task 'Stage-6:MAPRED' is a cross product
 Warning: Shuffle Join JOIN[12][tables = [src1, src2]] in Stage 'Stage-2:MAPRED' is a cross product
 PREHOOK: query: select sum(hash(a.k1,a.v1,a.k2, a.v2))
 from (

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/cbo_rp_cross_product_check_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cbo_rp_cross_product_check_2.q.out b/ql/src/test/results/clientpositive/cbo_rp_cross_product_check_2.q.out
index 390a679..10a8ae1 100644
--- a/ql/src/test/results/clientpositive/cbo_rp_cross_product_check_2.q.out
+++ b/ql/src/test/results/clientpositive/cbo_rp_cross_product_check_2.q.out
@@ -460,8 +460,8 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-Warning: Map Join MAPJOIN[31][bigTable=?] in task 'Stage-7:MAPRED' is a cross product
-Warning: Map Join MAPJOIN[30][bigTable=?] in task 'Stage-6:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[43][bigTable=?] in task 'Stage-7:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[36][bigTable=?] in task 'Stage-6:MAPRED' is a cross product
 Warning: Shuffle Join JOIN[20][tables = [, ]] in Stage 'Stage-2:MAPRED' is a cross product
 PREHOOK: query: explain select * from 
 (select A_n18.key from A_n18 group by key) ss join 

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/cross_product_check_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cross_product_check_2.q.out b/ql/src/test/results/clientpositive/cross_product_check_2.q.out
index 2c62cf0..6143431 100644
--- a/ql/src/test/results/clientpositive/cross_product_check_2.q.out
+++ b/ql/src/test/results/clientpositive/cross_product_check_2.q.out
@@ -452,8 +452,8 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-Warning: Map Join MAPJOIN[34][bigTable=?] in task 'Stage-7:MAPRED' is a cross product
-Warning: Map Join MAPJOIN[33][bigTable=?] in task 'Stage-6:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[46][bigTable=?] in task 'Stage-7:MAPRED' is a cross product
+Warning: Map Join MAPJOIN[39][bigTable=?] in task 'Stage-6:MAPRED' is a cross product
 Warning: Shuffle Join JOIN[22][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-2:MAPRED' is a cross product
 PREHOOK: query: explain select * from 
 (select A_n2.key from A_n2 group by key) ss join 

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/llap/bucketizedhiveinputformat.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucketizedhiveinputformat.q.out b/ql/src/test/results/clientpositive/llap/bucketizedhiveinputformat.q.out
index 37a9675..d87e3a3 100644
--- a/ql/src/test/results/clientpositive/llap/bucketizedhiveinputformat.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketizedhiveinputformat.q.out
@@ -22,7 +22,7 @@ POSTHOOK: query: CREATE TABLE T2_n74(name STRING) STORED AS SEQUENCEFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@T2_n74
-Warning: Shuffle Join MERGEJOIN[16][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Reducer 2' is a cross product
+Warning: Shuffle Join MERGEJOIN[23][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Reducer 2' is a cross product
 PREHOOK: query: INSERT OVERWRITE TABLE T2_n74 SELECT * FROM (
 SELECT tmp1.name as name FROM (
   SELECT name, 'MMM' AS n FROM T1_n125) tmp1 

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/llap/constprog_dpp.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/constprog_dpp.q.out b/ql/src/test/results/clientpositive/llap/constprog_dpp.q.out
index 4e9038d..aaa4ecc 100644
--- a/ql/src/test/results/clientpositive/llap/constprog_dpp.q.out
+++ b/ql/src/test/results/clientpositive/llap/constprog_dpp.q.out
@@ -53,35 +53,35 @@ Stage-0
       Reducer 2 llap
       File Output Operator [FS_17]
         Merge Join Operator [MERGEJOIN_21] (rows=1 width=4)
-          Conds:RS_23._col0=RS_26._col0(Left Outer),Output:["_col0"]
+          Conds:RS_33._col0=RS_36._col0(Left Outer),Output:["_col0"]
         <-Map 1 [SIMPLE_EDGE] vectorized, llap
-          SHUFFLE [RS_23]
+          SHUFFLE [RS_33]
             PartitionCols:_col0
-            Select Operator [SEL_22] (rows=1 width=4)
+            Select Operator [SEL_32] (rows=1 width=4)
               Output:["_col0"]
               TableScan [TS_0] (rows=1 width=4)
                 default@tb1,a,Tbl:COMPLETE,Col:NONE,Output:["id"]
         <-Reducer 5 [SIMPLE_EDGE] vectorized, llap
-          SHUFFLE [RS_26]
+          SHUFFLE [RS_36]
             PartitionCols:_col0
-            Limit [LIM_25] (rows=1 width=2)
+            Limit [LIM_35] (rows=1 width=2)
               Number of rows:1
-              Select Operator [SEL_24] (rows=1 width=2)
+              Select Operator [SEL_34] (rows=1 width=2)
                 Output:["_col0"]
               <-Union 4 [CUSTOM_SIMPLE_EDGE]
                 <-Map 3 [CONTAINS] vectorized, llap
-                  Reduce Output Operator [RS_29]
-                    Limit [LIM_28] (rows=1 width=2)
+                  Reduce Output Operator [RS_39]
+                    Limit [LIM_38] (rows=1 width=2)
                       Number of rows:1
-                      Select Operator [SEL_27] (rows=1 width=4)
+                      Select Operator [SEL_37] (rows=1 width=4)
                         Output:["_col0"]
-                        TableScan [TS_2] (rows=1 width=4)
+                        TableScan [TS_22] (rows=1 width=4)
                           Output:["id"]
                 <-Map 6 [CONTAINS] vectorized, llap
-                  Reduce Output Operator [RS_32]
-                    Limit [LIM_31] (rows=1 width=2)
+                  Reduce Output Operator [RS_42]
+                    Limit [LIM_41] (rows=1 width=2)
                       Number of rows:1
-                      Select Operator [SEL_30] (rows=1 width=0)
+                      Select Operator [SEL_40] (rows=1 width=0)
                         Output:["_col0"]
-                        TableScan [TS_4] (rows=1 width=0)
+                        TableScan [TS_27] (rows=1 width=0)
 

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/llap/dp_counter_mm.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/dp_counter_mm.q.out b/ql/src/test/results/clientpositive/llap/dp_counter_mm.q.out
index 25dc0c9..4ca60ba 100644
--- a/ql/src/test/results/clientpositive/llap/dp_counter_mm.q.out
+++ b/ql/src/test/results/clientpositive/llap/dp_counter_mm.q.out
@@ -24,16 +24,16 @@ Stage-1 HIVE COUNTERS:
    RECORDS_OUT_1_default.src2_n5: 84
    RECORDS_OUT_INTERMEDIATE_Map_1: 57
    RECORDS_OUT_INTERMEDIATE_Reducer_2: 0
-   RECORDS_OUT_OPERATOR_FIL_5: 84
+   RECORDS_OUT_OPERATOR_FIL_12: 84
+   RECORDS_OUT_OPERATOR_FS_11: 57
    RECORDS_OUT_OPERATOR_FS_4: 84
-   RECORDS_OUT_OPERATOR_FS_6: 57
-   RECORDS_OUT_OPERATOR_GBY_2: 57
-   RECORDS_OUT_OPERATOR_GBY_4: 57
+   RECORDS_OUT_OPERATOR_GBY_7: 57
+   RECORDS_OUT_OPERATOR_GBY_9: 57
    RECORDS_OUT_OPERATOR_MAP_0: 0
-   RECORDS_OUT_OPERATOR_RS_3: 57
-   RECORDS_OUT_OPERATOR_SEL_1: 84
+   RECORDS_OUT_OPERATOR_RS_8: 57
+   RECORDS_OUT_OPERATOR_SEL_10: 57
    RECORDS_OUT_OPERATOR_SEL_2: 84
-   RECORDS_OUT_OPERATOR_SEL_5: 57
+   RECORDS_OUT_OPERATOR_SEL_6: 84
    RECORDS_OUT_OPERATOR_TS_0: 500
    TOTAL_TABLE_ROWS_WRITTEN: 84
 Stage-1 INPUT COUNTERS:
@@ -55,16 +55,16 @@ Stage-1 HIVE COUNTERS:
    RECORDS_OUT_1_default.src2_n5: 189
    RECORDS_OUT_INTERMEDIATE_Map_1: 121
    RECORDS_OUT_INTERMEDIATE_Reducer_2: 0
-   RECORDS_OUT_OPERATOR_FIL_5: 189
+   RECORDS_OUT_OPERATOR_FIL_12: 189
+   RECORDS_OUT_OPERATOR_FS_11: 121
    RECORDS_OUT_OPERATOR_FS_4: 189
-   RECORDS_OUT_OPERATOR_FS_6: 121
-   RECORDS_OUT_OPERATOR_GBY_2: 121
-   RECORDS_OUT_OPERATOR_GBY_4: 121
+   RECORDS_OUT_OPERATOR_GBY_7: 121
+   RECORDS_OUT_OPERATOR_GBY_9: 121
    RECORDS_OUT_OPERATOR_MAP_0: 0
-   RECORDS_OUT_OPERATOR_RS_3: 121
-   RECORDS_OUT_OPERATOR_SEL_1: 189
+   RECORDS_OUT_OPERATOR_RS_8: 121
+   RECORDS_OUT_OPERATOR_SEL_10: 121
    RECORDS_OUT_OPERATOR_SEL_2: 189
-   RECORDS_OUT_OPERATOR_SEL_5: 121
+   RECORDS_OUT_OPERATOR_SEL_6: 189
    RECORDS_OUT_OPERATOR_TS_0: 500
    TOTAL_TABLE_ROWS_WRITTEN: 189
 Stage-1 INPUT COUNTERS:
@@ -94,16 +94,16 @@ Stage-1 HIVE COUNTERS:
    RECORDS_OUT_1_default.src2_n5: 189
    RECORDS_OUT_INTERMEDIATE_Map_1: 121
    RECORDS_OUT_INTERMEDIATE_Reducer_2: 0
-   RECORDS_OUT_OPERATOR_FIL_5: 189
+   RECORDS_OUT_OPERATOR_FIL_12: 189
+   RECORDS_OUT_OPERATOR_FS_11: 121
    RECORDS_OUT_OPERATOR_FS_4: 189
-   RECORDS_OUT_OPERATOR_FS_6: 121
-   RECORDS_OUT_OPERATOR_GBY_2: 121
-   RECORDS_OUT_OPERATOR_GBY_4: 121
+   RECORDS_OUT_OPERATOR_GBY_7: 121
+   RECORDS_OUT_OPERATOR_GBY_9: 121
    RECORDS_OUT_OPERATOR_MAP_0: 0
-   RECORDS_OUT_OPERATOR_RS_3: 121
-   RECORDS_OUT_OPERATOR_SEL_1: 189
+   RECORDS_OUT_OPERATOR_RS_8: 121
+   RECORDS_OUT_OPERATOR_SEL_10: 121
    RECORDS_OUT_OPERATOR_SEL_2: 189
-   RECORDS_OUT_OPERATOR_SEL_5: 121
+   RECORDS_OUT_OPERATOR_SEL_6: 189
    RECORDS_OUT_OPERATOR_TS_0: 500
    TOTAL_TABLE_ROWS_WRITTEN: 189
 Stage-1 INPUT COUNTERS:
@@ -125,16 +125,16 @@ Stage-1 HIVE COUNTERS:
    RECORDS_OUT_1_default.src2_n5: 292
    RECORDS_OUT_INTERMEDIATE_Map_1: 184
    RECORDS_OUT_INTERMEDIATE_Reducer_2: 0
-   RECORDS_OUT_OPERATOR_FIL_5: 292
+   RECORDS_OUT_OPERATOR_FIL_12: 292
+   RECORDS_OUT_OPERATOR_FS_11: 184
    RECORDS_OUT_OPERATOR_FS_4: 292
-   RECORDS_OUT_OPERATOR_FS_6: 184
-   RECORDS_OUT_OPERATOR_GBY_2: 184
-   RECORDS_OUT_OPERATOR_GBY_4: 184
+   RECORDS_OUT_OPERATOR_GBY_7: 184
+   RECORDS_OUT_OPERATOR_GBY_9: 184
    RECORDS_OUT_OPERATOR_MAP_0: 0
-   RECORDS_OUT_OPERATOR_RS_3: 184
-   RECORDS_OUT_OPERATOR_SEL_1: 292
+   RECORDS_OUT_OPERATOR_RS_8: 184
+   RECORDS_OUT_OPERATOR_SEL_10: 184
    RECORDS_OUT_OPERATOR_SEL_2: 292
-   RECORDS_OUT_OPERATOR_SEL_5: 184
+   RECORDS_OUT_OPERATOR_SEL_6: 292
    RECORDS_OUT_OPERATOR_TS_0: 500
    TOTAL_TABLE_ROWS_WRITTEN: 292
 Stage-1 INPUT COUNTERS:
@@ -175,19 +175,25 @@ Stage-2 HIVE COUNTERS:
    RECORDS_OUT_INTERMEDIATE_Map_1: 121
    RECORDS_OUT_INTERMEDIATE_Reducer_2: 0
    RECORDS_OUT_INTERMEDIATE_Reducer_3: 0
-   RECORDS_OUT_OPERATOR_FIL_10: 105
-   RECORDS_OUT_OPERATOR_FIL_9: 84
+   RECORDS_OUT_OPERATOR_FIL_23: 84
+   RECORDS_OUT_OPERATOR_FIL_24: 105
+   RECORDS_OUT_OPERATOR_FS_11: 57
+   RECORDS_OUT_OPERATOR_FS_15: 105
+   RECORDS_OUT_OPERATOR_FS_22: 64
    RECORDS_OUT_OPERATOR_FS_4: 84
-   RECORDS_OUT_OPERATOR_FS_6: 121
-   RECORDS_OUT_OPERATOR_FS_8: 105
-   RECORDS_OUT_OPERATOR_GBY_2: 121
-   RECORDS_OUT_OPERATOR_GBY_4: 121
+   RECORDS_OUT_OPERATOR_GBY_18: 64
+   RECORDS_OUT_OPERATOR_GBY_20: 64
+   RECORDS_OUT_OPERATOR_GBY_7: 57
+   RECORDS_OUT_OPERATOR_GBY_9: 57
    RECORDS_OUT_OPERATOR_MAP_0: 0
-   RECORDS_OUT_OPERATOR_RS_3: 121
-   RECORDS_OUT_OPERATOR_SEL_1: 189
+   RECORDS_OUT_OPERATOR_RS_19: 64
+   RECORDS_OUT_OPERATOR_RS_8: 57
+   RECORDS_OUT_OPERATOR_SEL_10: 57
+   RECORDS_OUT_OPERATOR_SEL_13: 105
+   RECORDS_OUT_OPERATOR_SEL_17: 105
    RECORDS_OUT_OPERATOR_SEL_2: 84
-   RECORDS_OUT_OPERATOR_SEL_5: 121
-   RECORDS_OUT_OPERATOR_SEL_6: 105
+   RECORDS_OUT_OPERATOR_SEL_21: 64
+   RECORDS_OUT_OPERATOR_SEL_6: 84
    RECORDS_OUT_OPERATOR_TS_0: 500
    TOTAL_TABLE_ROWS_WRITTEN: 189
 Stage-2 INPUT COUNTERS:
@@ -214,19 +220,25 @@ Stage-2 HIVE COUNTERS:
    RECORDS_OUT_INTERMEDIATE_Map_1: 184
    RECORDS_OUT_INTERMEDIATE_Reducer_2: 0
    RECORDS_OUT_INTERMEDIATE_Reducer_3: 0
-   RECORDS_OUT_OPERATOR_FIL_10: 208
-   RECORDS_OUT_OPERATOR_FIL_9: 84
+   RECORDS_OUT_OPERATOR_FIL_23: 84
+   RECORDS_OUT_OPERATOR_FIL_24: 208
+   RECORDS_OUT_OPERATOR_FS_11: 57
+   RECORDS_OUT_OPERATOR_FS_15: 208
+   RECORDS_OUT_OPERATOR_FS_22: 127
    RECORDS_OUT_OPERATOR_FS_4: 84
-   RECORDS_OUT_OPERATOR_FS_6: 184
-   RECORDS_OUT_OPERATOR_FS_8: 208
-   RECORDS_OUT_OPERATOR_GBY_2: 184
-   RECORDS_OUT_OPERATOR_GBY_4: 184
+   RECORDS_OUT_OPERATOR_GBY_18: 127
+   RECORDS_OUT_OPERATOR_GBY_20: 127
+   RECORDS_OUT_OPERATOR_GBY_7: 57
+   RECORDS_OUT_OPERATOR_GBY_9: 57
    RECORDS_OUT_OPERATOR_MAP_0: 0
-   RECORDS_OUT_OPERATOR_RS_3: 184
-   RECORDS_OUT_OPERATOR_SEL_1: 292
+   RECORDS_OUT_OPERATOR_RS_19: 127
+   RECORDS_OUT_OPERATOR_RS_8: 57
+   RECORDS_OUT_OPERATOR_SEL_10: 57
+   RECORDS_OUT_OPERATOR_SEL_13: 208
+   RECORDS_OUT_OPERATOR_SEL_17: 208
    RECORDS_OUT_OPERATOR_SEL_2: 84
-   RECORDS_OUT_OPERATOR_SEL_5: 184
-   RECORDS_OUT_OPERATOR_SEL_6: 208
+   RECORDS_OUT_OPERATOR_SEL_21: 127
+   RECORDS_OUT_OPERATOR_SEL_6: 84
    RECORDS_OUT_OPERATOR_TS_0: 500
    TOTAL_TABLE_ROWS_WRITTEN: 292
 Stage-2 INPUT COUNTERS:
@@ -262,20 +274,26 @@ Stage-1 HIVE COUNTERS:
    RECORDS_OUT_INTERMEDIATE_Map_1: 57
    RECORDS_OUT_INTERMEDIATE_Map_4: 64
    RECORDS_OUT_INTERMEDIATE_Reducer_3: 0
-   RECORDS_OUT_OPERATOR_FIL_10: 84
-   RECORDS_OUT_OPERATOR_FIL_11: 105
-   RECORDS_OUT_OPERATOR_FS_6: 121
-   RECORDS_OUT_OPERATOR_FS_9: 189
-   RECORDS_OUT_OPERATOR_GBY_2: 121
-   RECORDS_OUT_OPERATOR_GBY_4: 121
+   RECORDS_OUT_OPERATOR_FIL_20: 84
+   RECORDS_OUT_OPERATOR_FIL_29: 105
+   RECORDS_OUT_OPERATOR_FS_16: 121
+   RECORDS_OUT_OPERATOR_FS_24: 84
+   RECORDS_OUT_OPERATOR_FS_33: 105
+   RECORDS_OUT_OPERATOR_GBY_14: 121
+   RECORDS_OUT_OPERATOR_GBY_26: 57
+   RECORDS_OUT_OPERATOR_GBY_35: 64
    RECORDS_OUT_OPERATOR_MAP_0: 0
-   RECORDS_OUT_OPERATOR_RS_3: 121
-   RECORDS_OUT_OPERATOR_SEL_1: 189
-   RECORDS_OUT_OPERATOR_SEL_2: 84
-   RECORDS_OUT_OPERATOR_SEL_5: 226
-   RECORDS_OUT_OPERATOR_SEL_7: 189
-   RECORDS_OUT_OPERATOR_TS_0: 500
-   RECORDS_OUT_OPERATOR_TS_3: 500
+   RECORDS_OUT_OPERATOR_RS_27: 57
+   RECORDS_OUT_OPERATOR_RS_36: 64
+   RECORDS_OUT_OPERATOR_SEL_15: 121
+   RECORDS_OUT_OPERATOR_SEL_21: 84
+   RECORDS_OUT_OPERATOR_SEL_23: 84
+   RECORDS_OUT_OPERATOR_SEL_25: 84
+   RECORDS_OUT_OPERATOR_SEL_30: 105
+   RECORDS_OUT_OPERATOR_SEL_32: 105
+   RECORDS_OUT_OPERATOR_SEL_34: 105
+   RECORDS_OUT_OPERATOR_TS_19: 500
+   RECORDS_OUT_OPERATOR_TS_28: 500
    TOTAL_TABLE_ROWS_WRITTEN: 189
 Stage-1 INPUT COUNTERS:
    GROUPED_INPUT_SPLITS_Map_1: 1
@@ -306,20 +324,26 @@ Stage-1 HIVE COUNTERS:
    RECORDS_OUT_INTERMEDIATE_Map_1: 57
    RECORDS_OUT_INTERMEDIATE_Map_4: 127
    RECORDS_OUT_INTERMEDIATE_Reducer_3: 0
-   RECORDS_OUT_OPERATOR_FIL_10: 84
-   RECORDS_OUT_OPERATOR_FIL_11: 208
-   RECORDS_OUT_OPERATOR_FS_6: 184
-   RECORDS_OUT_OPERATOR_FS_9: 292
-   RECORDS_OUT_OPERATOR_GBY_2: 184
-   RECORDS_OUT_OPERATOR_GBY_4: 184
+   RECORDS_OUT_OPERATOR_FIL_20: 84
+   RECORDS_OUT_OPERATOR_FIL_29: 208
+   RECORDS_OUT_OPERATOR_FS_16: 184
+   RECORDS_OUT_OPERATOR_FS_24: 84
+   RECORDS_OUT_OPERATOR_FS_33: 208
+   RECORDS_OUT_OPERATOR_GBY_14: 184
+   RECORDS_OUT_OPERATOR_GBY_26: 57
+   RECORDS_OUT_OPERATOR_GBY_35: 127
    RECORDS_OUT_OPERATOR_MAP_0: 0
-   RECORDS_OUT_OPERATOR_RS_3: 184
-   RECORDS_OUT_OPERATOR_SEL_1: 292
-   RECORDS_OUT_OPERATOR_SEL_2: 84
-   RECORDS_OUT_OPERATOR_SEL_5: 392
-   RECORDS_OUT_OPERATOR_SEL_7: 292
-   RECORDS_OUT_OPERATOR_TS_0: 500
-   RECORDS_OUT_OPERATOR_TS_3: 500
+   RECORDS_OUT_OPERATOR_RS_27: 57
+   RECORDS_OUT_OPERATOR_RS_36: 127
+   RECORDS_OUT_OPERATOR_SEL_15: 184
+   RECORDS_OUT_OPERATOR_SEL_21: 84
+   RECORDS_OUT_OPERATOR_SEL_23: 84
+   RECORDS_OUT_OPERATOR_SEL_25: 84
+   RECORDS_OUT_OPERATOR_SEL_30: 208
+   RECORDS_OUT_OPERATOR_SEL_32: 208
+   RECORDS_OUT_OPERATOR_SEL_34: 208
+   RECORDS_OUT_OPERATOR_TS_19: 500
+   RECORDS_OUT_OPERATOR_TS_28: 500
    TOTAL_TABLE_ROWS_WRITTEN: 292
 Stage-1 INPUT COUNTERS:
    GROUPED_INPUT_SPLITS_Map_1: 1

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/llap/dp_counter_non_mm.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/dp_counter_non_mm.q.out b/ql/src/test/results/clientpositive/llap/dp_counter_non_mm.q.out
index bbe4044..101b343 100644
--- a/ql/src/test/results/clientpositive/llap/dp_counter_non_mm.q.out
+++ b/ql/src/test/results/clientpositive/llap/dp_counter_non_mm.q.out
@@ -24,16 +24,16 @@ Stage-1 HIVE COUNTERS:
    RECORDS_OUT_1_default.src2_n3: 84
    RECORDS_OUT_INTERMEDIATE_Map_1: 57
    RECORDS_OUT_INTERMEDIATE_Reducer_2: 0
-   RECORDS_OUT_OPERATOR_FIL_5: 84
+   RECORDS_OUT_OPERATOR_FIL_12: 84
+   RECORDS_OUT_OPERATOR_FS_11: 57
    RECORDS_OUT_OPERATOR_FS_4: 84
-   RECORDS_OUT_OPERATOR_FS_6: 57
-   RECORDS_OUT_OPERATOR_GBY_2: 57
-   RECORDS_OUT_OPERATOR_GBY_4: 57
+   RECORDS_OUT_OPERATOR_GBY_7: 57
+   RECORDS_OUT_OPERATOR_GBY_9: 57
    RECORDS_OUT_OPERATOR_MAP_0: 0
-   RECORDS_OUT_OPERATOR_RS_3: 57
-   RECORDS_OUT_OPERATOR_SEL_1: 84
+   RECORDS_OUT_OPERATOR_RS_8: 57
+   RECORDS_OUT_OPERATOR_SEL_10: 57
    RECORDS_OUT_OPERATOR_SEL_2: 84
-   RECORDS_OUT_OPERATOR_SEL_5: 57
+   RECORDS_OUT_OPERATOR_SEL_6: 84
    RECORDS_OUT_OPERATOR_TS_0: 500
    TOTAL_TABLE_ROWS_WRITTEN: 84
 Stage-1 INPUT COUNTERS:
@@ -55,16 +55,16 @@ Stage-1 HIVE COUNTERS:
    RECORDS_OUT_1_default.src2_n3: 189
    RECORDS_OUT_INTERMEDIATE_Map_1: 121
    RECORDS_OUT_INTERMEDIATE_Reducer_2: 0
-   RECORDS_OUT_OPERATOR_FIL_5: 189
+   RECORDS_OUT_OPERATOR_FIL_12: 189
+   RECORDS_OUT_OPERATOR_FS_11: 121
    RECORDS_OUT_OPERATOR_FS_4: 189
-   RECORDS_OUT_OPERATOR_FS_6: 121
-   RECORDS_OUT_OPERATOR_GBY_2: 121
-   RECORDS_OUT_OPERATOR_GBY_4: 121
+   RECORDS_OUT_OPERATOR_GBY_7: 121
+   RECORDS_OUT_OPERATOR_GBY_9: 121
    RECORDS_OUT_OPERATOR_MAP_0: 0
-   RECORDS_OUT_OPERATOR_RS_3: 121
-   RECORDS_OUT_OPERATOR_SEL_1: 189
+   RECORDS_OUT_OPERATOR_RS_8: 121
+   RECORDS_OUT_OPERATOR_SEL_10: 121
    RECORDS_OUT_OPERATOR_SEL_2: 189
-   RECORDS_OUT_OPERATOR_SEL_5: 121
+   RECORDS_OUT_OPERATOR_SEL_6: 189
    RECORDS_OUT_OPERATOR_TS_0: 500
    TOTAL_TABLE_ROWS_WRITTEN: 189
 Stage-1 INPUT COUNTERS:
@@ -94,16 +94,16 @@ Stage-1 HIVE COUNTERS:
    RECORDS_OUT_1_default.src2_n3: 189
    RECORDS_OUT_INTERMEDIATE_Map_1: 121
    RECORDS_OUT_INTERMEDIATE_Reducer_2: 0
-   RECORDS_OUT_OPERATOR_FIL_5: 189
+   RECORDS_OUT_OPERATOR_FIL_12: 189
+   RECORDS_OUT_OPERATOR_FS_11: 121
    RECORDS_OUT_OPERATOR_FS_4: 189
-   RECORDS_OUT_OPERATOR_FS_6: 121
-   RECORDS_OUT_OPERATOR_GBY_2: 121
-   RECORDS_OUT_OPERATOR_GBY_4: 121
+   RECORDS_OUT_OPERATOR_GBY_7: 121
+   RECORDS_OUT_OPERATOR_GBY_9: 121
    RECORDS_OUT_OPERATOR_MAP_0: 0
-   RECORDS_OUT_OPERATOR_RS_3: 121
-   RECORDS_OUT_OPERATOR_SEL_1: 189
+   RECORDS_OUT_OPERATOR_RS_8: 121
+   RECORDS_OUT_OPERATOR_SEL_10: 121
    RECORDS_OUT_OPERATOR_SEL_2: 189
-   RECORDS_OUT_OPERATOR_SEL_5: 121
+   RECORDS_OUT_OPERATOR_SEL_6: 189
    RECORDS_OUT_OPERATOR_TS_0: 500
    TOTAL_TABLE_ROWS_WRITTEN: 189
 Stage-1 INPUT COUNTERS:
@@ -125,16 +125,16 @@ Stage-1 HIVE COUNTERS:
    RECORDS_OUT_1_default.src2_n3: 292
    RECORDS_OUT_INTERMEDIATE_Map_1: 184
    RECORDS_OUT_INTERMEDIATE_Reducer_2: 0
-   RECORDS_OUT_OPERATOR_FIL_5: 292
+   RECORDS_OUT_OPERATOR_FIL_12: 292
+   RECORDS_OUT_OPERATOR_FS_11: 184
    RECORDS_OUT_OPERATOR_FS_4: 292
-   RECORDS_OUT_OPERATOR_FS_6: 184
-   RECORDS_OUT_OPERATOR_GBY_2: 184
-   RECORDS_OUT_OPERATOR_GBY_4: 184
+   RECORDS_OUT_OPERATOR_GBY_7: 184
+   RECORDS_OUT_OPERATOR_GBY_9: 184
    RECORDS_OUT_OPERATOR_MAP_0: 0
-   RECORDS_OUT_OPERATOR_RS_3: 184
-   RECORDS_OUT_OPERATOR_SEL_1: 292
+   RECORDS_OUT_OPERATOR_RS_8: 184
+   RECORDS_OUT_OPERATOR_SEL_10: 184
    RECORDS_OUT_OPERATOR_SEL_2: 292
-   RECORDS_OUT_OPERATOR_SEL_5: 184
+   RECORDS_OUT_OPERATOR_SEL_6: 292
    RECORDS_OUT_OPERATOR_TS_0: 500
    TOTAL_TABLE_ROWS_WRITTEN: 292
 Stage-1 INPUT COUNTERS:
@@ -175,19 +175,25 @@ Stage-2 HIVE COUNTERS:
    RECORDS_OUT_INTERMEDIATE_Map_1: 121
    RECORDS_OUT_INTERMEDIATE_Reducer_2: 0
    RECORDS_OUT_INTERMEDIATE_Reducer_3: 0
-   RECORDS_OUT_OPERATOR_FIL_10: 105
-   RECORDS_OUT_OPERATOR_FIL_9: 84
+   RECORDS_OUT_OPERATOR_FIL_23: 84
+   RECORDS_OUT_OPERATOR_FIL_24: 105
+   RECORDS_OUT_OPERATOR_FS_11: 57
+   RECORDS_OUT_OPERATOR_FS_15: 105
+   RECORDS_OUT_OPERATOR_FS_22: 64
    RECORDS_OUT_OPERATOR_FS_4: 84
-   RECORDS_OUT_OPERATOR_FS_6: 121
-   RECORDS_OUT_OPERATOR_FS_8: 105
-   RECORDS_OUT_OPERATOR_GBY_2: 121
-   RECORDS_OUT_OPERATOR_GBY_4: 121
+   RECORDS_OUT_OPERATOR_GBY_18: 64
+   RECORDS_OUT_OPERATOR_GBY_20: 64
+   RECORDS_OUT_OPERATOR_GBY_7: 57
+   RECORDS_OUT_OPERATOR_GBY_9: 57
    RECORDS_OUT_OPERATOR_MAP_0: 0
-   RECORDS_OUT_OPERATOR_RS_3: 121
-   RECORDS_OUT_OPERATOR_SEL_1: 189
+   RECORDS_OUT_OPERATOR_RS_19: 64
+   RECORDS_OUT_OPERATOR_RS_8: 57
+   RECORDS_OUT_OPERATOR_SEL_10: 57
+   RECORDS_OUT_OPERATOR_SEL_13: 105
+   RECORDS_OUT_OPERATOR_SEL_17: 105
    RECORDS_OUT_OPERATOR_SEL_2: 84
-   RECORDS_OUT_OPERATOR_SEL_5: 121
-   RECORDS_OUT_OPERATOR_SEL_6: 105
+   RECORDS_OUT_OPERATOR_SEL_21: 64
+   RECORDS_OUT_OPERATOR_SEL_6: 84
    RECORDS_OUT_OPERATOR_TS_0: 500
    TOTAL_TABLE_ROWS_WRITTEN: 189
 Stage-2 INPUT COUNTERS:
@@ -214,19 +220,25 @@ Stage-2 HIVE COUNTERS:
    RECORDS_OUT_INTERMEDIATE_Map_1: 184
    RECORDS_OUT_INTERMEDIATE_Reducer_2: 0
    RECORDS_OUT_INTERMEDIATE_Reducer_3: 0
-   RECORDS_OUT_OPERATOR_FIL_10: 208
-   RECORDS_OUT_OPERATOR_FIL_9: 84
+   RECORDS_OUT_OPERATOR_FIL_23: 84
+   RECORDS_OUT_OPERATOR_FIL_24: 208
+   RECORDS_OUT_OPERATOR_FS_11: 57
+   RECORDS_OUT_OPERATOR_FS_15: 208
+   RECORDS_OUT_OPERATOR_FS_22: 127
    RECORDS_OUT_OPERATOR_FS_4: 84
-   RECORDS_OUT_OPERATOR_FS_6: 184
-   RECORDS_OUT_OPERATOR_FS_8: 208
-   RECORDS_OUT_OPERATOR_GBY_2: 184
-   RECORDS_OUT_OPERATOR_GBY_4: 184
+   RECORDS_OUT_OPERATOR_GBY_18: 127
+   RECORDS_OUT_OPERATOR_GBY_20: 127
+   RECORDS_OUT_OPERATOR_GBY_7: 57
+   RECORDS_OUT_OPERATOR_GBY_9: 57
    RECORDS_OUT_OPERATOR_MAP_0: 0
-   RECORDS_OUT_OPERATOR_RS_3: 184
-   RECORDS_OUT_OPERATOR_SEL_1: 292
+   RECORDS_OUT_OPERATOR_RS_19: 127
+   RECORDS_OUT_OPERATOR_RS_8: 57
+   RECORDS_OUT_OPERATOR_SEL_10: 57
+   RECORDS_OUT_OPERATOR_SEL_13: 208
+   RECORDS_OUT_OPERATOR_SEL_17: 208
    RECORDS_OUT_OPERATOR_SEL_2: 84
-   RECORDS_OUT_OPERATOR_SEL_5: 184
-   RECORDS_OUT_OPERATOR_SEL_6: 208
+   RECORDS_OUT_OPERATOR_SEL_21: 127
+   RECORDS_OUT_OPERATOR_SEL_6: 84
    RECORDS_OUT_OPERATOR_TS_0: 500
    TOTAL_TABLE_ROWS_WRITTEN: 292
 Stage-2 INPUT COUNTERS:
@@ -262,20 +274,26 @@ Stage-1 HIVE COUNTERS:
    RECORDS_OUT_INTERMEDIATE_Map_1: 57
    RECORDS_OUT_INTERMEDIATE_Map_4: 64
    RECORDS_OUT_INTERMEDIATE_Reducer_3: 0
-   RECORDS_OUT_OPERATOR_FIL_10: 84
-   RECORDS_OUT_OPERATOR_FIL_11: 105
-   RECORDS_OUT_OPERATOR_FS_6: 121
-   RECORDS_OUT_OPERATOR_FS_9: 189
-   RECORDS_OUT_OPERATOR_GBY_2: 121
-   RECORDS_OUT_OPERATOR_GBY_4: 121
+   RECORDS_OUT_OPERATOR_FIL_20: 84
+   RECORDS_OUT_OPERATOR_FIL_29: 105
+   RECORDS_OUT_OPERATOR_FS_16: 121
+   RECORDS_OUT_OPERATOR_FS_24: 84
+   RECORDS_OUT_OPERATOR_FS_33: 105
+   RECORDS_OUT_OPERATOR_GBY_14: 121
+   RECORDS_OUT_OPERATOR_GBY_26: 57
+   RECORDS_OUT_OPERATOR_GBY_35: 64
    RECORDS_OUT_OPERATOR_MAP_0: 0
-   RECORDS_OUT_OPERATOR_RS_3: 121
-   RECORDS_OUT_OPERATOR_SEL_1: 189
-   RECORDS_OUT_OPERATOR_SEL_2: 84
-   RECORDS_OUT_OPERATOR_SEL_5: 226
-   RECORDS_OUT_OPERATOR_SEL_7: 189
-   RECORDS_OUT_OPERATOR_TS_0: 500
-   RECORDS_OUT_OPERATOR_TS_3: 500
+   RECORDS_OUT_OPERATOR_RS_27: 57
+   RECORDS_OUT_OPERATOR_RS_36: 64
+   RECORDS_OUT_OPERATOR_SEL_15: 121
+   RECORDS_OUT_OPERATOR_SEL_21: 84
+   RECORDS_OUT_OPERATOR_SEL_23: 84
+   RECORDS_OUT_OPERATOR_SEL_25: 84
+   RECORDS_OUT_OPERATOR_SEL_30: 105
+   RECORDS_OUT_OPERATOR_SEL_32: 105
+   RECORDS_OUT_OPERATOR_SEL_34: 105
+   RECORDS_OUT_OPERATOR_TS_19: 500
+   RECORDS_OUT_OPERATOR_TS_28: 500
    TOTAL_TABLE_ROWS_WRITTEN: 189
 Stage-1 INPUT COUNTERS:
    GROUPED_INPUT_SPLITS_Map_1: 1
@@ -306,20 +324,26 @@ Stage-1 HIVE COUNTERS:
    RECORDS_OUT_INTERMEDIATE_Map_1: 57
    RECORDS_OUT_INTERMEDIATE_Map_4: 127
    RECORDS_OUT_INTERMEDIATE_Reducer_3: 0
-   RECORDS_OUT_OPERATOR_FIL_10: 84
-   RECORDS_OUT_OPERATOR_FIL_11: 208
-   RECORDS_OUT_OPERATOR_FS_6: 184
-   RECORDS_OUT_OPERATOR_FS_9: 292
-   RECORDS_OUT_OPERATOR_GBY_2: 184
-   RECORDS_OUT_OPERATOR_GBY_4: 184
+   RECORDS_OUT_OPERATOR_FIL_20: 84
+   RECORDS_OUT_OPERATOR_FIL_29: 208
+   RECORDS_OUT_OPERATOR_FS_16: 184
+   RECORDS_OUT_OPERATOR_FS_24: 84
+   RECORDS_OUT_OPERATOR_FS_33: 208
+   RECORDS_OUT_OPERATOR_GBY_14: 184
+   RECORDS_OUT_OPERATOR_GBY_26: 57
+   RECORDS_OUT_OPERATOR_GBY_35: 127
    RECORDS_OUT_OPERATOR_MAP_0: 0
-   RECORDS_OUT_OPERATOR_RS_3: 184
-   RECORDS_OUT_OPERATOR_SEL_1: 292
-   RECORDS_OUT_OPERATOR_SEL_2: 84
-   RECORDS_OUT_OPERATOR_SEL_5: 392
-   RECORDS_OUT_OPERATOR_SEL_7: 292
-   RECORDS_OUT_OPERATOR_TS_0: 500
-   RECORDS_OUT_OPERATOR_TS_3: 500
+   RECORDS_OUT_OPERATOR_RS_27: 57
+   RECORDS_OUT_OPERATOR_RS_36: 127
+   RECORDS_OUT_OPERATOR_SEL_15: 184
+   RECORDS_OUT_OPERATOR_SEL_21: 84
+   RECORDS_OUT_OPERATOR_SEL_23: 84
+   RECORDS_OUT_OPERATOR_SEL_25: 84
+   RECORDS_OUT_OPERATOR_SEL_30: 208
+   RECORDS_OUT_OPERATOR_SEL_32: 208
+   RECORDS_OUT_OPERATOR_SEL_34: 208
+   RECORDS_OUT_OPERATOR_TS_19: 500
+   RECORDS_OUT_OPERATOR_TS_28: 500
    TOTAL_TABLE_ROWS_WRITTEN: 292
 Stage-1 INPUT COUNTERS:
    GROUPED_INPUT_SPLITS_Map_1: 1

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/llap/dynamic_semijoin_user_level.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/dynamic_semijoin_user_level.q.out b/ql/src/test/results/clientpositive/llap/dynamic_semijoin_user_level.q.out
index c3ef505..aa65613 100644
--- a/ql/src/test/results/clientpositive/llap/dynamic_semijoin_user_level.q.out
+++ b/ql/src/test/results/clientpositive/llap/dynamic_semijoin_user_level.q.out
@@ -1450,22 +1450,22 @@ Stage-0
           Conds:SEL_2._col1=Union 3._col0(Inner),Output:["_col0","_col1","_col2"]
         <-Union 3 [BROADCAST_EDGE]
           <-Map 2 [CONTAINS] llap
-            Reduce Output Operator [RS_12]
+            Reduce Output Operator [RS_39]
               PartitionCols:_col0
-              Select Operator [SEL_5] (rows=2000 width=87)
+              Select Operator [SEL_37] (rows=2000 width=87)
                 Output:["_col0"]
-                Filter Operator [FIL_20] (rows=2000 width=87)
+                Filter Operator [FIL_36] (rows=2000 width=87)
                   predicate:key is not null
-                  TableScan [TS_3] (rows=2000 width=87)
+                  TableScan [TS_35] (rows=2000 width=87)
                     Output:["key"]
           <-Map 4 [CONTAINS] llap
-            Reduce Output Operator [RS_12]
+            Reduce Output Operator [RS_44]
               PartitionCols:_col0
-              Select Operator [SEL_8] (rows=20 width=87)
+              Select Operator [SEL_42] (rows=20 width=87)
                 Output:["_col0"]
-                Filter Operator [FIL_21] (rows=20 width=87)
+                Filter Operator [FIL_41] (rows=20 width=87)
                   predicate:key1 is not null
-                  TableScan [TS_6] (rows=20 width=87)
+                  TableScan [TS_40] (rows=20 width=87)
                     Output:["key1"]
         <-Select Operator [SEL_2] (rows=9174 width=73)
             Output:["_col0","_col1"]


[04/14] hive git commit: HIVE-19237: Only use an operatorId once in a plan (Zoltan Haindrich reviewed by Ashutosh Chauhan)

Posted by kg...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query56.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query56.q.out b/ql/src/test/results/clientpositive/perf/tez/query56.q.out
index 80514cf..13657a8 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query56.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query56.q.out
@@ -157,22 +157,22 @@ Stage-0
     limit:100
     Stage-1
       Reducer 7 vectorized
-      File Output Operator [FS_214]
-        Limit [LIM_213] (rows=100 width=108)
+      File Output Operator [FS_226]
+        Limit [LIM_225] (rows=100 width=108)
           Number of rows:100
-          Select Operator [SEL_212] (rows=335408073 width=108)
+          Select Operator [SEL_224] (rows=335408073 width=108)
             Output:["_col0","_col1"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_211]
-              Group By Operator [GBY_210] (rows=335408073 width=108)
+            SHUFFLE [RS_223]
+              Group By Operator [GBY_222] (rows=335408073 width=108)
                 Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
               <-Union 5 [SIMPLE_EDGE]
                 <-Reducer 11 [CONTAINS] vectorized
-                  Reduce Output Operator [RS_226]
+                  Reduce Output Operator [RS_238]
                     PartitionCols:_col0
-                    Group By Operator [GBY_225] (rows=670816147 width=108)
+                    Group By Operator [GBY_237] (rows=670816147 width=108)
                       Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
-                      Group By Operator [GBY_224] (rows=95833781 width=135)
+                      Group By Operator [GBY_236] (rows=95833781 width=135)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                       <-Reducer 10 [SIMPLE_EDGE]
                         SHUFFLE [RS_109]
@@ -185,29 +185,29 @@ Stage-0
                               SHUFFLE [RS_104]
                                 PartitionCols:_col0
                                 Merge Join Operator [MERGEJOIN_173] (rows=508200 width=1436)
-                                  Conds:RS_187._col1=RS_193._col0(Inner),Output:["_col0","_col1"]
+                                  Conds:RS_199._col1=RS_205._col0(Inner),Output:["_col0","_col1"]
                                 <-Map 1 [SIMPLE_EDGE] vectorized
-                                  SHUFFLE [RS_187]
+                                  SHUFFLE [RS_199]
                                     PartitionCols:_col1
-                                    Select Operator [SEL_186] (rows=462000 width=1436)
+                                    Select Operator [SEL_198] (rows=462000 width=1436)
                                       Output:["_col0","_col1"]
-                                      Filter Operator [FIL_185] (rows=462000 width=1436)
+                                      Filter Operator [FIL_197] (rows=462000 width=1436)
                                         predicate:(i_item_id is not null and i_item_sk is not null)
                                         TableScan [TS_0] (rows=462000 width=1436)
                                           default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id"]
                                 <-Reducer 13 [ONE_TO_ONE_EDGE] vectorized
-                                  FORWARD [RS_193]
+                                  FORWARD [RS_205]
                                     PartitionCols:_col0
-                                    Group By Operator [GBY_192] (rows=115500 width=1436)
+                                    Group By Operator [GBY_204] (rows=115500 width=1436)
                                       Output:["_col0"],keys:KEY._col0
                                     <-Map 12 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_191]
+                                      SHUFFLE [RS_203]
                                         PartitionCols:_col0
-                                        Group By Operator [GBY_190] (rows=231000 width=1436)
+                                        Group By Operator [GBY_202] (rows=231000 width=1436)
                                           Output:["_col0"],keys:i_item_id
-                                          Select Operator [SEL_189] (rows=231000 width=1436)
+                                          Select Operator [SEL_201] (rows=231000 width=1436)
                                             Output:["i_item_id"]
-                                            Filter Operator [FIL_188] (rows=231000 width=1436)
+                                            Filter Operator [FIL_200] (rows=231000 width=1436)
                                               predicate:((i_color) IN ('orchid', 'chiffon', 'lace') and i_item_id is not null)
                                               TableScan [TS_3] (rows=462000 width=1436)
                                                 default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_id","i_color"]
@@ -217,13 +217,13 @@ Stage-0
                                 Select Operator [SEL_100] (rows=174243235 width=135)
                                   Output:["_col3","_col5"]
                                   Merge Join Operator [MERGEJOIN_181] (rows=174243235 width=135)
-                                    Conds:RS_97._col2=RS_206._col0(Inner),Output:["_col1","_col3"]
+                                    Conds:RS_97._col2=RS_218._col0(Inner),Output:["_col1","_col3"]
                                   <-Map 22 [SIMPLE_EDGE] vectorized
-                                    SHUFFLE [RS_206]
+                                    SHUFFLE [RS_218]
                                       PartitionCols:_col0
-                                      Select Operator [SEL_203] (rows=20000000 width=1014)
+                                      Select Operator [SEL_215] (rows=20000000 width=1014)
                                         Output:["_col0"]
-                                        Filter Operator [FIL_202] (rows=20000000 width=1014)
+                                        Filter Operator [FIL_214] (rows=20000000 width=1014)
                                           predicate:((ca_gmt_offset = -8) and ca_address_sk is not null)
                                           TableScan [TS_16] (rows=40000000 width=1014)
                                             default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_gmt_offset"]
@@ -231,31 +231,31 @@ Stage-0
                                     SHUFFLE [RS_97]
                                       PartitionCols:_col2
                                       Merge Join Operator [MERGEJOIN_180] (rows=158402938 width=135)
-                                        Conds:RS_223._col0=RS_201._col0(Inner),Output:["_col1","_col2","_col3"]
+                                        Conds:RS_235._col0=RS_213._col0(Inner),Output:["_col1","_col2","_col3"]
                                       <-Map 17 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_201]
+                                        SHUFFLE [RS_213]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_198] (rows=18262 width=1119)
+                                          Select Operator [SEL_210] (rows=18262 width=1119)
                                             Output:["_col0"]
-                                            Filter Operator [FIL_197] (rows=18262 width=1119)
+                                            Filter Operator [FIL_209] (rows=18262 width=1119)
                                               predicate:((d_moy = 1) and (d_year = 2000) and d_date_sk is not null)
                                               TableScan [TS_13] (rows=73049 width=1119)
                                                 default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
                                       <-Map 24 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_223]
+                                        SHUFFLE [RS_235]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_222] (rows=144002668 width=135)
+                                          Select Operator [SEL_234] (rows=144002668 width=135)
                                             Output:["_col0","_col1","_col2","_col3"]
-                                            Filter Operator [FIL_221] (rows=144002668 width=135)
+                                            Filter Operator [FIL_233] (rows=144002668 width=135)
                                               predicate:(ws_bill_addr_sk is not null and ws_item_sk is not null and ws_sold_date_sk is not null)
                                               TableScan [TS_85] (rows=144002668 width=135)
                                                 default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_bill_addr_sk","ws_ext_sales_price"]
                 <-Reducer 4 [CONTAINS] vectorized
-                  Reduce Output Operator [RS_209]
+                  Reduce Output Operator [RS_221]
                     PartitionCols:_col0
-                    Group By Operator [GBY_208] (rows=670816147 width=108)
+                    Group By Operator [GBY_220] (rows=670816147 width=108)
                       Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
-                      Group By Operator [GBY_207] (rows=383325119 width=88)
+                      Group By Operator [GBY_219] (rows=383325119 width=88)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                       <-Reducer 3 [SIMPLE_EDGE]
                         SHUFFLE [RS_34]
@@ -274,35 +274,35 @@ Stage-0
                                 Select Operator [SEL_25] (rows=696954748 width=88)
                                   Output:["_col3","_col5"]
                                   Merge Join Operator [MERGEJOIN_175] (rows=696954748 width=88)
-                                    Conds:RS_22._col2=RS_204._col0(Inner),Output:["_col1","_col3"]
+                                    Conds:RS_22._col2=RS_216._col0(Inner),Output:["_col1","_col3"]
                                   <-Map 22 [SIMPLE_EDGE] vectorized
-                                    SHUFFLE [RS_204]
+                                    SHUFFLE [RS_216]
                                       PartitionCols:_col0
-                                       Please refer to the previous Select Operator [SEL_203]
+                                       Please refer to the previous Select Operator [SEL_215]
                                   <-Reducer 15 [SIMPLE_EDGE]
                                     SHUFFLE [RS_22]
                                       PartitionCols:_col2
                                       Merge Join Operator [MERGEJOIN_174] (rows=633595212 width=88)
-                                        Conds:RS_196._col0=RS_199._col0(Inner),Output:["_col1","_col2","_col3"]
+                                        Conds:RS_208._col0=RS_211._col0(Inner),Output:["_col1","_col2","_col3"]
                                       <-Map 17 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_199]
+                                        SHUFFLE [RS_211]
                                           PartitionCols:_col0
-                                           Please refer to the previous Select Operator [SEL_198]
+                                           Please refer to the previous Select Operator [SEL_210]
                                       <-Map 14 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_196]
+                                        SHUFFLE [RS_208]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_195] (rows=575995635 width=88)
+                                          Select Operator [SEL_207] (rows=575995635 width=88)
                                             Output:["_col0","_col1","_col2","_col3"]
-                                            Filter Operator [FIL_194] (rows=575995635 width=88)
+                                            Filter Operator [FIL_206] (rows=575995635 width=88)
                                               predicate:(ss_addr_sk is not null and ss_item_sk is not null and ss_sold_date_sk is not null)
                                               TableScan [TS_10] (rows=575995635 width=88)
                                                 default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_addr_sk","ss_ext_sales_price"]
                 <-Reducer 9 [CONTAINS] vectorized
-                  Reduce Output Operator [RS_220]
+                  Reduce Output Operator [RS_232]
                     PartitionCols:_col0
-                    Group By Operator [GBY_219] (rows=670816147 width=108)
+                    Group By Operator [GBY_231] (rows=670816147 width=108)
                       Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
-                      Group By Operator [GBY_218] (rows=191657247 width=135)
+                      Group By Operator [GBY_230] (rows=191657247 width=135)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                       <-Reducer 8 [SIMPLE_EDGE]
                         SHUFFLE [RS_71]
@@ -321,26 +321,26 @@ Stage-0
                                 Select Operator [SEL_62] (rows=348467716 width=135)
                                   Output:["_col4","_col5"]
                                   Merge Join Operator [MERGEJOIN_178] (rows=348467716 width=135)
-                                    Conds:RS_59._col1=RS_205._col0(Inner),Output:["_col2","_col3"]
+                                    Conds:RS_59._col1=RS_217._col0(Inner),Output:["_col2","_col3"]
                                   <-Map 22 [SIMPLE_EDGE] vectorized
-                                    SHUFFLE [RS_205]
+                                    SHUFFLE [RS_217]
                                       PartitionCols:_col0
-                                       Please refer to the previous Select Operator [SEL_203]
+                                       Please refer to the previous Select Operator [SEL_215]
                                   <-Reducer 18 [SIMPLE_EDGE]
                                     SHUFFLE [RS_59]
                                       PartitionCols:_col1
                                       Merge Join Operator [MERGEJOIN_177] (rows=316788826 width=135)
-                                        Conds:RS_217._col0=RS_200._col0(Inner),Output:["_col1","_col2","_col3"]
+                                        Conds:RS_229._col0=RS_212._col0(Inner),Output:["_col1","_col2","_col3"]
                                       <-Map 17 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_200]
+                                        SHUFFLE [RS_212]
                                           PartitionCols:_col0
-                                           Please refer to the previous Select Operator [SEL_198]
+                                           Please refer to the previous Select Operator [SEL_210]
                                       <-Map 23 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_217]
+                                        SHUFFLE [RS_229]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_216] (rows=287989836 width=135)
+                                          Select Operator [SEL_228] (rows=287989836 width=135)
                                             Output:["_col0","_col1","_col2","_col3"]
-                                            Filter Operator [FIL_215] (rows=287989836 width=135)
+                                            Filter Operator [FIL_227] (rows=287989836 width=135)
                                               predicate:(cs_bill_addr_sk is not null and cs_item_sk is not null and cs_sold_date_sk is not null)
                                               TableScan [TS_47] (rows=287989836 width=135)
                                                 default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_addr_sk","cs_item_sk","cs_ext_sales_price"]

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query60.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query60.q.out b/ql/src/test/results/clientpositive/perf/tez/query60.q.out
index 0e3aed8..515d5e0 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query60.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query60.q.out
@@ -177,22 +177,22 @@ Stage-0
     limit:100
     Stage-1
       Reducer 7 vectorized
-      File Output Operator [FS_214]
-        Limit [LIM_213] (rows=100 width=108)
+      File Output Operator [FS_226]
+        Limit [LIM_225] (rows=100 width=108)
           Number of rows:100
-          Select Operator [SEL_212] (rows=335408073 width=108)
+          Select Operator [SEL_224] (rows=335408073 width=108)
             Output:["_col0","_col1"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_211]
-              Group By Operator [GBY_210] (rows=335408073 width=108)
+            SHUFFLE [RS_223]
+              Group By Operator [GBY_222] (rows=335408073 width=108)
                 Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
               <-Union 5 [SIMPLE_EDGE]
                 <-Reducer 11 [CONTAINS] vectorized
-                  Reduce Output Operator [RS_226]
+                  Reduce Output Operator [RS_238]
                     PartitionCols:_col0
-                    Group By Operator [GBY_225] (rows=670816147 width=108)
+                    Group By Operator [GBY_237] (rows=670816147 width=108)
                       Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
-                      Group By Operator [GBY_224] (rows=95833781 width=135)
+                      Group By Operator [GBY_236] (rows=95833781 width=135)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                       <-Reducer 10 [SIMPLE_EDGE]
                         SHUFFLE [RS_109]
@@ -205,29 +205,29 @@ Stage-0
                               SHUFFLE [RS_104]
                                 PartitionCols:_col0
                                 Merge Join Operator [MERGEJOIN_173] (rows=508200 width=1436)
-                                  Conds:RS_187._col1=RS_193._col0(Inner),Output:["_col0","_col1"]
+                                  Conds:RS_199._col1=RS_205._col0(Inner),Output:["_col0","_col1"]
                                 <-Map 1 [SIMPLE_EDGE] vectorized
-                                  SHUFFLE [RS_187]
+                                  SHUFFLE [RS_199]
                                     PartitionCols:_col1
-                                    Select Operator [SEL_186] (rows=462000 width=1436)
+                                    Select Operator [SEL_198] (rows=462000 width=1436)
                                       Output:["_col0","_col1"]
-                                      Filter Operator [FIL_185] (rows=462000 width=1436)
+                                      Filter Operator [FIL_197] (rows=462000 width=1436)
                                         predicate:(i_item_id is not null and i_item_sk is not null)
                                         TableScan [TS_0] (rows=462000 width=1436)
                                           default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id"]
                                 <-Reducer 13 [ONE_TO_ONE_EDGE] vectorized
-                                  FORWARD [RS_193]
+                                  FORWARD [RS_205]
                                     PartitionCols:_col0
-                                    Group By Operator [GBY_192] (rows=115500 width=1436)
+                                    Group By Operator [GBY_204] (rows=115500 width=1436)
                                       Output:["_col0"],keys:KEY._col0
                                     <-Map 12 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_191]
+                                      SHUFFLE [RS_203]
                                         PartitionCols:_col0
-                                        Group By Operator [GBY_190] (rows=231000 width=1436)
+                                        Group By Operator [GBY_202] (rows=231000 width=1436)
                                           Output:["_col0"],keys:i_item_id
-                                          Select Operator [SEL_189] (rows=231000 width=1436)
+                                          Select Operator [SEL_201] (rows=231000 width=1436)
                                             Output:["i_item_id"]
-                                            Filter Operator [FIL_188] (rows=231000 width=1436)
+                                            Filter Operator [FIL_200] (rows=231000 width=1436)
                                               predicate:((i_category = 'Children') and i_item_id is not null)
                                               TableScan [TS_3] (rows=462000 width=1436)
                                                 default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_id","i_category"]
@@ -237,13 +237,13 @@ Stage-0
                                 Select Operator [SEL_100] (rows=174243235 width=135)
                                   Output:["_col3","_col5"]
                                   Merge Join Operator [MERGEJOIN_181] (rows=174243235 width=135)
-                                    Conds:RS_97._col2=RS_206._col0(Inner),Output:["_col1","_col3"]
+                                    Conds:RS_97._col2=RS_218._col0(Inner),Output:["_col1","_col3"]
                                   <-Map 22 [SIMPLE_EDGE] vectorized
-                                    SHUFFLE [RS_206]
+                                    SHUFFLE [RS_218]
                                       PartitionCols:_col0
-                                      Select Operator [SEL_203] (rows=20000000 width=1014)
+                                      Select Operator [SEL_215] (rows=20000000 width=1014)
                                         Output:["_col0"]
-                                        Filter Operator [FIL_202] (rows=20000000 width=1014)
+                                        Filter Operator [FIL_214] (rows=20000000 width=1014)
                                           predicate:((ca_gmt_offset = -6) and ca_address_sk is not null)
                                           TableScan [TS_16] (rows=40000000 width=1014)
                                             default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_gmt_offset"]
@@ -251,31 +251,31 @@ Stage-0
                                     SHUFFLE [RS_97]
                                       PartitionCols:_col2
                                       Merge Join Operator [MERGEJOIN_180] (rows=158402938 width=135)
-                                        Conds:RS_223._col0=RS_201._col0(Inner),Output:["_col1","_col2","_col3"]
+                                        Conds:RS_235._col0=RS_213._col0(Inner),Output:["_col1","_col2","_col3"]
                                       <-Map 17 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_201]
+                                        SHUFFLE [RS_213]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_198] (rows=18262 width=1119)
+                                          Select Operator [SEL_210] (rows=18262 width=1119)
                                             Output:["_col0"]
-                                            Filter Operator [FIL_197] (rows=18262 width=1119)
+                                            Filter Operator [FIL_209] (rows=18262 width=1119)
                                               predicate:((d_moy = 9) and (d_year = 1999) and d_date_sk is not null)
                                               TableScan [TS_13] (rows=73049 width=1119)
                                                 default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
                                       <-Map 24 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_223]
+                                        SHUFFLE [RS_235]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_222] (rows=144002668 width=135)
+                                          Select Operator [SEL_234] (rows=144002668 width=135)
                                             Output:["_col0","_col1","_col2","_col3"]
-                                            Filter Operator [FIL_221] (rows=144002668 width=135)
+                                            Filter Operator [FIL_233] (rows=144002668 width=135)
                                               predicate:(ws_bill_addr_sk is not null and ws_item_sk is not null and ws_sold_date_sk is not null)
                                               TableScan [TS_85] (rows=144002668 width=135)
                                                 default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_bill_addr_sk","ws_ext_sales_price"]
                 <-Reducer 4 [CONTAINS] vectorized
-                  Reduce Output Operator [RS_209]
+                  Reduce Output Operator [RS_221]
                     PartitionCols:_col0
-                    Group By Operator [GBY_208] (rows=670816147 width=108)
+                    Group By Operator [GBY_220] (rows=670816147 width=108)
                       Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
-                      Group By Operator [GBY_207] (rows=383325119 width=88)
+                      Group By Operator [GBY_219] (rows=383325119 width=88)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                       <-Reducer 3 [SIMPLE_EDGE]
                         SHUFFLE [RS_34]
@@ -294,35 +294,35 @@ Stage-0
                                 Select Operator [SEL_25] (rows=696954748 width=88)
                                   Output:["_col3","_col5"]
                                   Merge Join Operator [MERGEJOIN_175] (rows=696954748 width=88)
-                                    Conds:RS_22._col2=RS_204._col0(Inner),Output:["_col1","_col3"]
+                                    Conds:RS_22._col2=RS_216._col0(Inner),Output:["_col1","_col3"]
                                   <-Map 22 [SIMPLE_EDGE] vectorized
-                                    SHUFFLE [RS_204]
+                                    SHUFFLE [RS_216]
                                       PartitionCols:_col0
-                                       Please refer to the previous Select Operator [SEL_203]
+                                       Please refer to the previous Select Operator [SEL_215]
                                   <-Reducer 15 [SIMPLE_EDGE]
                                     SHUFFLE [RS_22]
                                       PartitionCols:_col2
                                       Merge Join Operator [MERGEJOIN_174] (rows=633595212 width=88)
-                                        Conds:RS_196._col0=RS_199._col0(Inner),Output:["_col1","_col2","_col3"]
+                                        Conds:RS_208._col0=RS_211._col0(Inner),Output:["_col1","_col2","_col3"]
                                       <-Map 17 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_199]
+                                        SHUFFLE [RS_211]
                                           PartitionCols:_col0
-                                           Please refer to the previous Select Operator [SEL_198]
+                                           Please refer to the previous Select Operator [SEL_210]
                                       <-Map 14 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_196]
+                                        SHUFFLE [RS_208]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_195] (rows=575995635 width=88)
+                                          Select Operator [SEL_207] (rows=575995635 width=88)
                                             Output:["_col0","_col1","_col2","_col3"]
-                                            Filter Operator [FIL_194] (rows=575995635 width=88)
+                                            Filter Operator [FIL_206] (rows=575995635 width=88)
                                               predicate:(ss_addr_sk is not null and ss_item_sk is not null and ss_sold_date_sk is not null)
                                               TableScan [TS_10] (rows=575995635 width=88)
                                                 default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_addr_sk","ss_ext_sales_price"]
                 <-Reducer 9 [CONTAINS] vectorized
-                  Reduce Output Operator [RS_220]
+                  Reduce Output Operator [RS_232]
                     PartitionCols:_col0
-                    Group By Operator [GBY_219] (rows=670816147 width=108)
+                    Group By Operator [GBY_231] (rows=670816147 width=108)
                       Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
-                      Group By Operator [GBY_218] (rows=191657247 width=135)
+                      Group By Operator [GBY_230] (rows=191657247 width=135)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                       <-Reducer 8 [SIMPLE_EDGE]
                         SHUFFLE [RS_71]
@@ -341,26 +341,26 @@ Stage-0
                                 Select Operator [SEL_62] (rows=348467716 width=135)
                                   Output:["_col4","_col5"]
                                   Merge Join Operator [MERGEJOIN_178] (rows=348467716 width=135)
-                                    Conds:RS_59._col1=RS_205._col0(Inner),Output:["_col2","_col3"]
+                                    Conds:RS_59._col1=RS_217._col0(Inner),Output:["_col2","_col3"]
                                   <-Map 22 [SIMPLE_EDGE] vectorized
-                                    SHUFFLE [RS_205]
+                                    SHUFFLE [RS_217]
                                       PartitionCols:_col0
-                                       Please refer to the previous Select Operator [SEL_203]
+                                       Please refer to the previous Select Operator [SEL_215]
                                   <-Reducer 18 [SIMPLE_EDGE]
                                     SHUFFLE [RS_59]
                                       PartitionCols:_col1
                                       Merge Join Operator [MERGEJOIN_177] (rows=316788826 width=135)
-                                        Conds:RS_217._col0=RS_200._col0(Inner),Output:["_col1","_col2","_col3"]
+                                        Conds:RS_229._col0=RS_212._col0(Inner),Output:["_col1","_col2","_col3"]
                                       <-Map 17 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_200]
+                                        SHUFFLE [RS_212]
                                           PartitionCols:_col0
-                                           Please refer to the previous Select Operator [SEL_198]
+                                           Please refer to the previous Select Operator [SEL_210]
                                       <-Map 23 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_217]
+                                        SHUFFLE [RS_229]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_216] (rows=287989836 width=135)
+                                          Select Operator [SEL_228] (rows=287989836 width=135)
                                             Output:["_col0","_col1","_col2","_col3"]
-                                            Filter Operator [FIL_215] (rows=287989836 width=135)
+                                            Filter Operator [FIL_227] (rows=287989836 width=135)
                                               predicate:(cs_bill_addr_sk is not null and cs_item_sk is not null and cs_sold_date_sk is not null)
                                               TableScan [TS_47] (rows=287989836 width=135)
                                                 default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_addr_sk","cs_item_sk","cs_ext_sales_price"]

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query66.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query66.q.out b/ql/src/test/results/clientpositive/perf/tez/query66.q.out
index ab31c06..97c1636 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query66.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query66.q.out
@@ -461,26 +461,26 @@ Stage-0
     limit:-1
     Stage-1
       Reducer 9 vectorized
-      File Output Operator [FS_152]
-        Select Operator [SEL_151] (rows=100 width=135)
+      File Output Operator [FS_162]
+        Select Operator [SEL_161] (rows=100 width=135)
           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30","_col31","_col32","_col33","_col34","_col35","_col36","_col37","_col38","_col39","_col40","_col41","_col42","_col43"]
-          Limit [LIM_150] (rows=100 width=135)
+          Limit [LIM_160] (rows=100 width=135)
             Number of rows:100
-            Select Operator [SEL_149] (rows=158120068 width=135)
+            Select Operator [SEL_159] (rows=158120068 width=135)
               Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30","_col31","_col32","_col33","_col34","_col35","_col36","_col37","_col38","_col39","_col40","_col41"]
             <-Reducer 8 [SIMPLE_EDGE] vectorized
-              SHUFFLE [RS_148]
-                Group By Operator [GBY_147] (rows=158120068 width=135)
+              SHUFFLE [RS_158]
+                Group By Operator [GBY_157] (rows=158120068 width=135)
                   Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30","_col31","_col32","_col33","_col34","_col35","_col36","_col37","_col38","_col39","_col40","_col41"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)","sum(VALUE._col5)","sum(VALUE._col6)","sum(VALUE._col7)","sum(VALUE._col8)","sum(VALUE._col9)","sum(VALUE._col10)","sum(VALUE._col11)","sum(VALUE._col12)","sum(VALUE._col13)","sum(VALUE._col14)","sum(VALUE._col15)","sum(VALUE._col16)","sum(VALUE._col17)","sum(VALUE._col18)","sum(VALUE._col19)","sum(VALUE._col20)","sum(VALUE._col21)","sum(VALUE._col22)","sum(VALUE._col23)","sum(VALUE._col24)","sum(VALUE._col25)","sum(VALUE._col26)","sum(VALUE._col27)","sum(VALUE._col28)","sum(VALUE._col29)
 ","sum(VALUE._col30)","sum(VALUE._col31)","sum(VALUE._col32)","sum(VALUE._col33)","sum(VALUE._col34)","sum(VALUE._col35)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
                 <-Union 7 [SIMPLE_EDGE]
                   <-Reducer 15 [CONTAINS] vectorized
-                    Reduce Output Operator [RS_159]
+                    Reduce Output Operator [RS_169]
                       PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5
-                      Group By Operator [GBY_158] (rows=316240137 width=135)
+                      Group By Operator [GBY_168] (rows=316240137 width=135)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30","_col31","_col32","_col33","_col34","_col35","_col36","_col37","_col38","_col39","_col40","_col41"],aggregations:["sum(_col6)","sum(_col7)","sum(_col8)","sum(_col9)","sum(_col10)","sum(_col11)","sum(_col12)","sum(_col13)","sum(_col14)","sum(_col15)","sum(_col16)","sum(_col17)","sum(_col18)","sum(_col19)","sum(_col20)","sum(_col21)","sum(_col22)","sum(_col23)","sum(_col24)","sum(_col25)","sum(_col26)","sum(_col27)","sum(_col28)","sum(_col29)","sum(_col30)","sum(_col31)","sum(_col32)","sum(_col33)","sum(_col34)","sum(_col35)","sum(_col36)","sum(_col37)","sum(_col38)","sum(_col39)","sum(_col40)","sum(_col41)"],keys:_col0, _col1, _col2, _col3, _col4, _col5
-                        Select Operator [SEL_157] (rows=316240137 width=135)
+                        Select Operator [SEL_167] (rows=316240137 width=135)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30","_col31","_col32","_col33","_col34","_col35","_col36","_col37","_col38","_col39","_col40","_col41"]
-                          Group By Operator [GBY_156] (rows=210822976 width=135)
+                          Group By Operator [GBY_166] (rows=210822976 width=135)
                             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)","sum(VALUE._col5)","sum(VALUE._col6)","sum(VALUE._col7)","sum(VALUE._col8)","sum(VALUE._col9)","sum(VALUE._col10)","sum(VALUE._col11)","sum(VALUE._col12)","sum(VALUE._col13)","sum(VALUE._col14)","sum(VALUE._col15)","sum(VALUE._col16)","sum(VALUE._col17)","sum(VALUE._col18)","sum(VALUE._col19)","sum(VALUE._col20)","sum(VALUE._col21)","sum(VALUE._col22)","sum(VALUE._col23)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
                           <-Reducer 14 [SIMPLE_EDGE]
                             SHUFFLE [RS_63]
@@ -490,13 +490,13 @@ Stage-0
                                 Select Operator [SEL_60] (rows=421645953 width=135)
                                   Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29"]
                                   Merge Join Operator [MERGEJOIN_123] (rows=421645953 width=135)
-                                    Conds:RS_57._col3=RS_142._col0(Inner),Output:["_col4","_col5","_col6","_col11","_col15","_col16","_col17","_col18","_col19","_col20"]
+                                    Conds:RS_57._col3=RS_152._col0(Inner),Output:["_col4","_col5","_col6","_col11","_col15","_col16","_col17","_col18","_col19","_col20"]
                                   <-Map 18 [SIMPLE_EDGE] vectorized
-                                    SHUFFLE [RS_142]
+                                    SHUFFLE [RS_152]
                                       PartitionCols:_col0
-                                      Select Operator [SEL_140] (rows=27 width=1029)
+                                      Select Operator [SEL_150] (rows=27 width=1029)
                                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                        Filter Operator [FIL_139] (rows=27 width=1029)
+                                        Filter Operator [FIL_149] (rows=27 width=1029)
                                           predicate:w_warehouse_sk is not null
                                           TableScan [TS_12] (rows=27 width=1029)
                                             default@warehouse,warehouse,Tbl:COMPLETE,Col:NONE,Output:["w_warehouse_sk","w_warehouse_name","w_warehouse_sq_ft","w_city","w_county","w_state","w_country"]
@@ -504,13 +504,13 @@ Stage-0
                                     SHUFFLE [RS_57]
                                       PartitionCols:_col3
                                       Merge Join Operator [MERGEJOIN_122] (rows=383314495 width=135)
-                                        Conds:RS_54._col2=RS_138._col0(Inner),Output:["_col3","_col4","_col5","_col6","_col11"]
+                                        Conds:RS_54._col2=RS_148._col0(Inner),Output:["_col3","_col4","_col5","_col6","_col11"]
                                       <-Map 17 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_138]
+                                        SHUFFLE [RS_148]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_136] (rows=1 width=0)
+                                          Select Operator [SEL_146] (rows=1 width=0)
                                             Output:["_col0"]
-                                            Filter Operator [FIL_135] (rows=1 width=0)
+                                            Filter Operator [FIL_145] (rows=1 width=0)
                                               predicate:((sm_carrier) IN ('DIAMOND', 'AIRBORNE') and sm_ship_mode_sk is not null)
                                               TableScan [TS_9] (rows=1 width=0)
                                                 default@ship_mode,ship_mode,Tbl:PARTIAL,Col:NONE,Output:["sm_ship_mode_sk","sm_carrier"]
@@ -518,13 +518,13 @@ Stage-0
                                         SHUFFLE [RS_54]
                                           PartitionCols:_col2
                                           Merge Join Operator [MERGEJOIN_121] (rows=348467716 width=135)
-                                            Conds:RS_51._col0=RS_134._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6","_col11"]
+                                            Conds:RS_51._col0=RS_144._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6","_col11"]
                                           <-Map 16 [SIMPLE_EDGE] vectorized
-                                            SHUFFLE [RS_134]
+                                            SHUFFLE [RS_144]
                                               PartitionCols:_col0
-                                              Select Operator [SEL_132] (rows=36524 width=1119)
+                                              Select Operator [SEL_142] (rows=36524 width=1119)
                                                 Output:["_col0","_col2"]
-                                                Filter Operator [FIL_131] (rows=36524 width=1119)
+                                                Filter Operator [FIL_141] (rows=36524 width=1119)
                                                   predicate:((d_year = 2002) and d_date_sk is not null)
                                                   TableScan [TS_6] (rows=73049 width=1119)
                                                     default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
@@ -532,33 +532,33 @@ Stage-0
                                             SHUFFLE [RS_51]
                                               PartitionCols:_col0
                                               Merge Join Operator [MERGEJOIN_120] (rows=316788826 width=135)
-                                                Conds:RS_155._col1=RS_130._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5","_col6"]
+                                                Conds:RS_165._col1=RS_140._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5","_col6"]
                                               <-Map 10 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_130]
+                                                SHUFFLE [RS_140]
                                                   PartitionCols:_col0
-                                                  Select Operator [SEL_128] (rows=9600 width=471)
+                                                  Select Operator [SEL_138] (rows=9600 width=471)
                                                     Output:["_col0"]
-                                                    Filter Operator [FIL_127] (rows=9600 width=471)
+                                                    Filter Operator [FIL_137] (rows=9600 width=471)
                                                       predicate:(t_time BETWEEN 49530 AND 78330 and t_time_sk is not null)
                                                       TableScan [TS_3] (rows=86400 width=471)
                                                         default@time_dim,time_dim,Tbl:COMPLETE,Col:NONE,Output:["t_time_sk","t_time"]
                                               <-Map 19 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_155]
+                                                SHUFFLE [RS_165]
                                                   PartitionCols:_col1
-                                                  Select Operator [SEL_154] (rows=287989836 width=135)
+                                                  Select Operator [SEL_164] (rows=287989836 width=135)
                                                     Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                                    Filter Operator [FIL_153] (rows=287989836 width=135)
+                                                    Filter Operator [FIL_163] (rows=287989836 width=135)
                                                       predicate:(cs_ship_mode_sk is not null and cs_sold_date_sk is not null and cs_sold_time_sk is not null and cs_warehouse_sk is not null)
                                                       TableScan [TS_33] (rows=287989836 width=135)
                                                         default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_sold_time_sk","cs_ship_mode_sk","cs_warehouse_sk","cs_quantity","cs_ext_sales_price","cs_net_paid_inc_ship_tax"]
                   <-Reducer 6 [CONTAINS] vectorized
-                    Reduce Output Operator [RS_146]
+                    Reduce Output Operator [RS_156]
                       PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5
-                      Group By Operator [GBY_145] (rows=316240137 width=135)
+                      Group By Operator [GBY_155] (rows=316240137 width=135)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30","_col31","_col32","_col33","_col34","_col35","_col36","_col37","_col38","_col39","_col40","_col41"],aggregations:["sum(_col6)","sum(_col7)","sum(_col8)","sum(_col9)","sum(_col10)","sum(_col11)","sum(_col12)","sum(_col13)","sum(_col14)","sum(_col15)","sum(_col16)","sum(_col17)","sum(_col18)","sum(_col19)","sum(_col20)","sum(_col21)","sum(_col22)","sum(_col23)","sum(_col24)","sum(_col25)","sum(_col26)","sum(_col27)","sum(_col28)","sum(_col29)","sum(_col30)","sum(_col31)","sum(_col32)","sum(_col33)","sum(_col34)","sum(_col35)","sum(_col36)","sum(_col37)","sum(_col38)","sum(_col39)","sum(_col40)","sum(_col41)"],keys:_col0, _col1, _col2, _col3, _col4, _col5
-                        Select Operator [SEL_144] (rows=316240137 width=135)
+                        Select Operator [SEL_154] (rows=316240137 width=135)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30","_col31","_col32","_col33","_col34","_col35","_col36","_col37","_col38","_col39","_col40","_col41"]
-                          Group By Operator [GBY_143] (rows=105417161 width=135)
+                          Group By Operator [GBY_153] (rows=105417161 width=135)
                             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)","sum(VALUE._col5)","sum(VALUE._col6)","sum(VALUE._col7)","sum(VALUE._col8)","sum(VALUE._col9)","sum(VALUE._col10)","sum(VALUE._col11)","sum(VALUE._col12)","sum(VALUE._col13)","sum(VALUE._col14)","sum(VALUE._col15)","sum(VALUE._col16)","sum(VALUE._col17)","sum(VALUE._col18)","sum(VALUE._col19)","sum(VALUE._col20)","sum(VALUE._col21)","sum(VALUE._col22)","sum(VALUE._col23)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
                           <-Reducer 5 [SIMPLE_EDGE]
                             SHUFFLE [RS_30]
@@ -568,44 +568,44 @@ Stage-0
                                 Select Operator [SEL_27] (rows=210834322 width=135)
                                   Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29"]
                                   Merge Join Operator [MERGEJOIN_119] (rows=210834322 width=135)
-                                    Conds:RS_24._col3=RS_141._col0(Inner),Output:["_col4","_col5","_col6","_col11","_col15","_col16","_col17","_col18","_col19","_col20"]
+                                    Conds:RS_24._col3=RS_151._col0(Inner),Output:["_col4","_col5","_col6","_col11","_col15","_col16","_col17","_col18","_col19","_col20"]
                                   <-Map 18 [SIMPLE_EDGE] vectorized
-                                    SHUFFLE [RS_141]
+                                    SHUFFLE [RS_151]
                                       PartitionCols:_col0
-                                       Please refer to the previous Select Operator [SEL_140]
+                                       Please refer to the previous Select Operator [SEL_150]
                                   <-Reducer 4 [SIMPLE_EDGE]
                                     SHUFFLE [RS_24]
                                       PartitionCols:_col3
                                       Merge Join Operator [MERGEJOIN_118] (rows=191667562 width=135)
-                                        Conds:RS_21._col2=RS_137._col0(Inner),Output:["_col3","_col4","_col5","_col6","_col11"]
+                                        Conds:RS_21._col2=RS_147._col0(Inner),Output:["_col3","_col4","_col5","_col6","_col11"]
                                       <-Map 17 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_137]
+                                        SHUFFLE [RS_147]
                                           PartitionCols:_col0
-                                           Please refer to the previous Select Operator [SEL_136]
+                                           Please refer to the previous Select Operator [SEL_146]
                                       <-Reducer 3 [SIMPLE_EDGE]
                                         SHUFFLE [RS_21]
                                           PartitionCols:_col2
                                           Merge Join Operator [MERGEJOIN_117] (rows=174243235 width=135)
-                                            Conds:RS_18._col0=RS_133._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6","_col11"]
+                                            Conds:RS_18._col0=RS_143._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6","_col11"]
                                           <-Map 16 [SIMPLE_EDGE] vectorized
-                                            SHUFFLE [RS_133]
+                                            SHUFFLE [RS_143]
                                               PartitionCols:_col0
-                                               Please refer to the previous Select Operator [SEL_132]
+                                               Please refer to the previous Select Operator [SEL_142]
                                           <-Reducer 2 [SIMPLE_EDGE]
                                             SHUFFLE [RS_18]
                                               PartitionCols:_col0
                                               Merge Join Operator [MERGEJOIN_116] (rows=158402938 width=135)
-                                                Conds:RS_126._col1=RS_129._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5","_col6"]
+                                                Conds:RS_136._col1=RS_139._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5","_col6"]
                                               <-Map 10 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_129]
+                                                SHUFFLE [RS_139]
                                                   PartitionCols:_col0
-                                                   Please refer to the previous Select Operator [SEL_128]
+                                                   Please refer to the previous Select Operator [SEL_138]
                                               <-Map 1 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_126]
+                                                SHUFFLE [RS_136]
                                                   PartitionCols:_col1
-                                                  Select Operator [SEL_125] (rows=144002668 width=135)
+                                                  Select Operator [SEL_135] (rows=144002668 width=135)
                                                     Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                                    Filter Operator [FIL_124] (rows=144002668 width=135)
+                                                    Filter Operator [FIL_134] (rows=144002668 width=135)
                                                       predicate:(ws_ship_mode_sk is not null and ws_sold_date_sk is not null and ws_sold_time_sk is not null and ws_warehouse_sk is not null)
                                                       TableScan [TS_0] (rows=144002668 width=135)
                                                         default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_sold_time_sk","ws_ship_mode_sk","ws_warehouse_sk","ws_quantity","ws_sales_price","ws_net_paid_inc_tax"]

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query71.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query71.q.out b/ql/src/test/results/clientpositive/perf/tez/query71.q.out
index c46c6db..7618826 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query71.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query71.q.out
@@ -90,14 +90,14 @@ Stage-0
     limit:-1
     Stage-1
       Reducer 7 vectorized
-      File Output Operator [FS_103]
-        Select Operator [SEL_102] (rows=670816149 width=108)
+      File Output Operator [FS_115]
+        Select Operator [SEL_114] (rows=670816149 width=108)
           Output:["_col0","_col1","_col2","_col3","_col4"]
         <-Reducer 6 [SIMPLE_EDGE] vectorized
-          SHUFFLE [RS_101]
-            Select Operator [SEL_100] (rows=670816149 width=108)
+          SHUFFLE [RS_113]
+            Select Operator [SEL_112] (rows=670816149 width=108)
               Output:["_col1","_col2","_col3","_col4","_col5"]
-              Group By Operator [GBY_99] (rows=670816149 width=108)
+              Group By Operator [GBY_111] (rows=670816149 width=108)
                 Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3
               <-Reducer 5 [SIMPLE_EDGE]
                 SHUFFLE [RS_46]
@@ -105,13 +105,13 @@ Stage-0
                   Group By Operator [GBY_45] (rows=1341632299 width=108)
                     Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col0)"],keys:_col4, _col8, _col9, _col5
                     Merge Join Operator [MERGEJOIN_86] (rows=1341632299 width=108)
-                      Conds:RS_41._col2=RS_98._col0(Inner),Output:["_col0","_col4","_col5","_col8","_col9"]
+                      Conds:RS_41._col2=RS_110._col0(Inner),Output:["_col0","_col4","_col5","_col8","_col9"]
                     <-Map 16 [SIMPLE_EDGE] vectorized
-                      SHUFFLE [RS_98]
+                      SHUFFLE [RS_110]
                         PartitionCols:_col0
-                        Select Operator [SEL_97] (rows=86400 width=471)
+                        Select Operator [SEL_109] (rows=86400 width=471)
                           Output:["_col0","_col1","_col2"]
-                          Filter Operator [FIL_96] (rows=86400 width=471)
+                          Filter Operator [FIL_108] (rows=86400 width=471)
                             predicate:(((t_meal_time = 'breakfast') or (t_meal_time = 'dinner')) and t_time_sk is not null)
                             TableScan [TS_35] (rows=86400 width=471)
                               default@time_dim,time_dim,Tbl:COMPLETE,Col:NONE,Output:["t_time_sk","t_hour","t_minute","t_meal_time"]
@@ -119,89 +119,89 @@ Stage-0
                       SHUFFLE [RS_41]
                         PartitionCols:_col2
                         Merge Join Operator [MERGEJOIN_85] (rows=1219665700 width=108)
-                          Conds:Union 3._col1=RS_95._col0(Inner),Output:["_col0","_col2","_col4","_col5"]
+                          Conds:Union 3._col1=RS_107._col0(Inner),Output:["_col0","_col2","_col4","_col5"]
                         <-Map 15 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_95]
+                          SHUFFLE [RS_107]
                             PartitionCols:_col0
-                            Select Operator [SEL_94] (rows=231000 width=1436)
+                            Select Operator [SEL_106] (rows=231000 width=1436)
                               Output:["_col0","_col1","_col2"]
-                              Filter Operator [FIL_93] (rows=231000 width=1436)
+                              Filter Operator [FIL_105] (rows=231000 width=1436)
                                 predicate:((i_manager_id = 1) and i_item_sk is not null)
                                 TableScan [TS_32] (rows=462000 width=1436)
                                   default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_brand","i_manager_id"]
                         <-Union 3 [SIMPLE_EDGE]
                           <-Reducer 10 [CONTAINS]
-                            Reduce Output Operator [RS_38]
+                            Reduce Output Operator [RS_94]
                               PartitionCols:_col1
-                              Select Operator [SEL_19] (rows=316788826 width=135)
+                              Select Operator [SEL_92] (rows=316788826 width=135)
                                 Output:["_col0","_col1","_col2"]
-                                Merge Join Operator [MERGEJOIN_83] (rows=316788826 width=135)
-                                  Conds:RS_106._col0=RS_109._col0(Inner),Output:["_col1","_col2","_col3"]
+                                Merge Join Operator [MERGEJOIN_91] (rows=316788826 width=135)
+                                  Conds:RS_118._col0=RS_121._col0(Inner),Output:["_col1","_col2","_col3"]
                                 <-Map 11 [SIMPLE_EDGE] vectorized
-                                  SHUFFLE [RS_109]
+                                  SHUFFLE [RS_121]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_108] (rows=18262 width=1119)
+                                    Select Operator [SEL_120] (rows=18262 width=1119)
                                       Output:["_col0"]
-                                      Filter Operator [FIL_107] (rows=18262 width=1119)
+                                      Filter Operator [FIL_119] (rows=18262 width=1119)
                                         predicate:((d_moy = 12) and (d_year = 2001) and d_date_sk is not null)
                                         TableScan [TS_13] (rows=73049 width=1119)
                                           default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
                                 <-Map 9 [SIMPLE_EDGE] vectorized
-                                  SHUFFLE [RS_106]
+                                  SHUFFLE [RS_118]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_105] (rows=287989836 width=135)
+                                    Select Operator [SEL_117] (rows=287989836 width=135)
                                       Output:["_col0","_col1","_col2","_col3"]
-                                      Filter Operator [FIL_104] (rows=287989836 width=135)
+                                      Filter Operator [FIL_116] (rows=287989836 width=135)
                                         predicate:(cs_item_sk is not null and cs_sold_date_sk is not null and cs_sold_time_sk is not null)
                                         TableScan [TS_10] (rows=287989836 width=135)
                                           default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_sold_time_sk","cs_item_sk","cs_ext_sales_price"]
                           <-Reducer 13 [CONTAINS]
-                            Reduce Output Operator [RS_38]
+                            Reduce Output Operator [RS_98]
                               PartitionCols:_col1
-                              Select Operator [SEL_30] (rows=633595212 width=88)
+                              Select Operator [SEL_96] (rows=633595212 width=88)
                                 Output:["_col0","_col1","_col2"]
-                                Merge Join Operator [MERGEJOIN_84] (rows=633595212 width=88)
-                                  Conds:RS_112._col0=RS_115._col0(Inner),Output:["_col1","_col2","_col3"]
+                                Merge Join Operator [MERGEJOIN_95] (rows=633595212 width=88)
+                                  Conds:RS_124._col0=RS_127._col0(Inner),Output:["_col1","_col2","_col3"]
                                 <-Map 12 [SIMPLE_EDGE] vectorized
-                                  SHUFFLE [RS_112]
+                                  SHUFFLE [RS_124]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_111] (rows=575995635 width=88)
+                                    Select Operator [SEL_123] (rows=575995635 width=88)
                                       Output:["_col0","_col1","_col2","_col3"]
-                                      Filter Operator [FIL_110] (rows=575995635 width=88)
+                                      Filter Operator [FIL_122] (rows=575995635 width=88)
                                         predicate:(ss_item_sk is not null and ss_sold_date_sk is not null and ss_sold_time_sk is not null)
                                         TableScan [TS_21] (rows=575995635 width=88)
                                           default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_sold_time_sk","ss_item_sk","ss_ext_sales_price"]
                                 <-Map 14 [SIMPLE_EDGE] vectorized
-                                  SHUFFLE [RS_115]
+                                  SHUFFLE [RS_127]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_114] (rows=18262 width=1119)
+                                    Select Operator [SEL_126] (rows=18262 width=1119)
                                       Output:["_col0"]
-                                      Filter Operator [FIL_113] (rows=18262 width=1119)
+                                      Filter Operator [FIL_125] (rows=18262 width=1119)
                                         predicate:((d_moy = 12) and (d_year = 2001) and d_date_sk is not null)
                                         TableScan [TS_24] (rows=73049 width=1119)
                                           default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
                           <-Reducer 2 [CONTAINS]
-                            Reduce Output Operator [RS_38]
+                            Reduce Output Operator [RS_90]
                               PartitionCols:_col1
-                              Select Operator [SEL_9] (rows=158402938 width=135)
+                              Select Operator [SEL_88] (rows=158402938 width=135)
                                 Output:["_col0","_col1","_col2"]
-                                Merge Join Operator [MERGEJOIN_82] (rows=158402938 width=135)
-                                  Conds:RS_89._col0=RS_92._col0(Inner),Output:["_col1","_col2","_col3"]
+                                Merge Join Operator [MERGEJOIN_87] (rows=158402938 width=135)
+                                  Conds:RS_101._col0=RS_104._col0(Inner),Output:["_col1","_col2","_col3"]
                                 <-Map 1 [SIMPLE_EDGE] vectorized
-                                  SHUFFLE [RS_89]
+                                  SHUFFLE [RS_101]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_88] (rows=144002668 width=135)
+                                    Select Operator [SEL_100] (rows=144002668 width=135)
                                       Output:["_col0","_col1","_col2","_col3"]
-                                      Filter Operator [FIL_87] (rows=144002668 width=135)
+                                      Filter Operator [FIL_99] (rows=144002668 width=135)
                                         predicate:(ws_item_sk is not null and ws_sold_date_sk is not null and ws_sold_time_sk is not null)
                                         TableScan [TS_0] (rows=144002668 width=135)
                                           default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_sold_time_sk","ws_item_sk","ws_ext_sales_price"]
                                 <-Map 8 [SIMPLE_EDGE] vectorized
-                                  SHUFFLE [RS_92]
+                                  SHUFFLE [RS_104]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_91] (rows=18262 width=1119)
+                                    Select Operator [SEL_103] (rows=18262 width=1119)
                                       Output:["_col0"]
-                                      Filter Operator [FIL_90] (rows=18262 width=1119)
+                                      Filter Operator [FIL_102] (rows=18262 width=1119)
                                         predicate:((d_moy = 12) and (d_year = 2001) and d_date_sk is not null)
                                         TableScan [TS_3] (rows=73049 width=1119)
                                           default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]


[05/14] hive git commit: HIVE-19237: Only use an operatorId once in a plan (Zoltan Haindrich reviewed by Ashutosh Chauhan)

Posted by kg...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query49.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query49.q.out b/ql/src/test/results/clientpositive/perf/tez/query49.q.out
index 3a9c640..47f37a2 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query49.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query49.q.out
@@ -277,44 +277,44 @@ Stage-0
     limit:100
     Stage-1
       Reducer 11 vectorized
-      File Output Operator [FS_179]
-        Limit [LIM_178] (rows=100 width=101)
+      File Output Operator [FS_205]
+        Limit [LIM_204] (rows=100 width=101)
           Number of rows:100
-          Select Operator [SEL_177] (rows=5915494 width=101)
+          Select Operator [SEL_203] (rows=5915494 width=101)
             Output:["_col0","_col1","_col2","_col3","_col4"]
           <-Reducer 10 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_176]
-              Select Operator [SEL_175] (rows=5915494 width=101)
+            SHUFFLE [RS_202]
+              Select Operator [SEL_201] (rows=5915494 width=101)
                 Output:["_col0","_col1","_col2","_col3","_col4"]
-                Group By Operator [GBY_174] (rows=5915494 width=101)
+                Group By Operator [GBY_200] (rows=5915494 width=101)
                   Output:["_col0","_col1","_col2","_col3","_col4"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4
                 <-Union 9 [SIMPLE_EDGE]
                   <-Reducer 22 [CONTAINS] vectorized
-                    Reduce Output Operator [RS_215]
+                    Reduce Output Operator [RS_241]
                       PartitionCols:_col0, _col1, _col2, _col3, _col4
-                      Group By Operator [GBY_214] (rows=11830988 width=101)
+                      Group By Operator [GBY_240] (rows=11830988 width=101)
                         Output:["_col0","_col1","_col2","_col3","_col4"],keys:_col0, _col3, _col4, _col1, _col2
-                        Select Operator [SEL_213] (rows=8604378 width=88)
+                        Select Operator [SEL_239] (rows=8604378 width=88)
                           Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Filter Operator [FIL_212] (rows=8604378 width=88)
+                          Filter Operator [FIL_238] (rows=8604378 width=88)
                             predicate:((_col0 <= 10) or (rank_window_1 <= 10))
-                            PTF Operator [PTF_211] (rows=12906568 width=88)
+                            PTF Operator [PTF_237] (rows=12906568 width=88)
                               Function definitions:[{},{"name:":"windowingtablefunction","order by:":"(CAST( _col4 AS decimal(15,4)) / CAST( _col5 AS decimal(15,4))) ASC NULLS FIRST","partition by:":"0"}]
-                              Select Operator [SEL_210] (rows=12906568 width=88)
+                              Select Operator [SEL_236] (rows=12906568 width=88)
                                 Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                               <-Reducer 21 [SIMPLE_EDGE] vectorized
-                                SHUFFLE [RS_209]
+                                SHUFFLE [RS_235]
                                   PartitionCols:0
-                                  Select Operator [SEL_208] (rows=12906568 width=88)
+                                  Select Operator [SEL_234] (rows=12906568 width=88)
                                     Output:["rank_window_0","_col0","_col1","_col2","_col3","_col4"]
-                                    PTF Operator [PTF_207] (rows=12906568 width=88)
+                                    PTF Operator [PTF_233] (rows=12906568 width=88)
                                       Function definitions:[{},{"name:":"windowingtablefunction","order by:":"(CAST( _col1 AS decimal(15,4)) / CAST( _col2 AS decimal(15,4))) ASC NULLS FIRST","partition by:":"0"}]
-                                      Select Operator [SEL_206] (rows=12906568 width=88)
+                                      Select Operator [SEL_232] (rows=12906568 width=88)
                                         Output:["_col0","_col1","_col2","_col3","_col4"]
                                       <-Reducer 20 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_205]
+                                        SHUFFLE [RS_231]
                                           PartitionCols:0
-                                          Group By Operator [GBY_204] (rows=12906568 width=88)
+                                          Group By Operator [GBY_230] (rows=12906568 width=88)
                                             Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)"],keys:KEY._col0
                                           <-Reducer 19 [SIMPLE_EDGE]
                                             SHUFFLE [RS_89]
@@ -324,13 +324,13 @@ Stage-0
                                                 Select Operator [SEL_86] (rows=25813137 width=88)
                                                   Output:["_col0","_col1","_col2","_col3","_col4"]
                                                   Merge Join Operator [MERGEJOIN_146] (rows=25813137 width=88)
-                                                    Conds:RS_83._col1, _col2=RS_203._col0, _col1(Inner),Output:["_col1","_col3","_col4","_col11","_col12"]
+                                                    Conds:RS_83._col1, _col2=RS_229._col0, _col1(Inner),Output:["_col1","_col3","_col4","_col11","_col12"]
                                                   <-Map 27 [SIMPLE_EDGE] vectorized
-                                                    SHUFFLE [RS_203]
+                                                    SHUFFLE [RS_229]
                                                       PartitionCols:_col0, _col1
-                                                      Select Operator [SEL_202] (rows=19197050 width=77)
+                                                      Select Operator [SEL_228] (rows=19197050 width=77)
                                                         Output:["_col0","_col1","_col2","_col3"]
-                                                        Filter Operator [FIL_201] (rows=19197050 width=77)
+                                                        Filter Operator [FIL_227] (rows=19197050 width=77)
                                                           predicate:((sr_return_amt > 10000) and sr_item_sk is not null and sr_ticket_number is not null)
                                                           TableScan [TS_77] (rows=57591150 width=77)
                                                             default@store_returns,sr,Tbl:COMPLETE,Col:NONE,Output:["sr_item_sk","sr_ticket_number","sr_return_quantity","sr_return_amt"]
@@ -338,61 +338,61 @@ Stage-0
                                                     SHUFFLE [RS_83]
                                                       PartitionCols:_col1, _col2
                                                       Merge Join Operator [MERGEJOIN_145] (rows=23466488 width=88)
-                                                        Conds:RS_200._col0=RS_154._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                                                        Conds:RS_226._col0=RS_180._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
                                                       <-Map 12 [SIMPLE_EDGE] vectorized
-                                                        SHUFFLE [RS_154]
+                                                        SHUFFLE [RS_180]
                                                           PartitionCols:_col0
-                                                          Select Operator [SEL_151] (rows=18262 width=1119)
+                                                          Select Operator [SEL_177] (rows=18262 width=1119)
                                                             Output:["_col0"]
-                                                            Filter Operator [FIL_150] (rows=18262 width=1119)
+                                                            Filter Operator [FIL_176] (rows=18262 width=1119)
                                                               predicate:((d_moy = 12) and (d_year = 2000) and d_date_sk is not null)
                                                               TableScan [TS_3] (rows=73049 width=1119)
                                                                 default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
                                                       <-Map 26 [SIMPLE_EDGE] vectorized
-                                                        SHUFFLE [RS_200]
+                                                        SHUFFLE [RS_226]
                                                           PartitionCols:_col0
-                                                          Select Operator [SEL_199] (rows=21333171 width=88)
+                                                          Select Operator [SEL_225] (rows=21333171 width=88)
                                                             Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                            Filter Operator [FIL_198] (rows=21333171 width=88)
+                                                            Filter Operator [FIL_224] (rows=21333171 width=88)
                                                               predicate:((ss_net_paid > 0) and (ss_net_profit > 1) and (ss_quantity > 0) and ss_item_sk is not null and ss_sold_date_sk is not null and ss_ticket_number is not null)
                                                               TableScan [TS_71] (rows=575995635 width=88)
                                                                 default@store_sales,sts,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_ticket_number","ss_quantity","ss_net_paid","ss_net_profit"]
                   <-Reducer 8 [CONTAINS] vectorized
-                    Reduce Output Operator [RS_173]
+                    Reduce Output Operator [RS_199]
                       PartitionCols:_col0, _col1, _col2, _col3, _col4
-                      Group By Operator [GBY_172] (rows=11830988 width=101)
+                      Group By Operator [GBY_198] (rows=11830988 width=101)
                         Output:["_col0","_col1","_col2","_col3","_col4"],keys:_col0, _col3, _col4, _col1, _col2
-                        Select Operator [SEL_171] (rows=3226610 width=135)
+                        Select Operator [SEL_197] (rows=3226610 width=135)
                           Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Group By Operator [GBY_170] (rows=3226610 width=135)
+                          Group By Operator [GBY_196] (rows=3226610 width=135)
                             Output:["_col0","_col1","_col2","_col3","_col4"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4
                           <-Union 7 [SIMPLE_EDGE]
                             <-Reducer 17 [CONTAINS] vectorized
-                              Reduce Output Operator [RS_197]
+                              Reduce Output Operator [RS_223]
                                 PartitionCols:_col0, _col1, _col2, _col3, _col4
-                                Group By Operator [GBY_196] (rows=6453220 width=135)
+                                Group By Operator [GBY_222] (rows=6453220 width=135)
                                   Output:["_col0","_col1","_col2","_col3","_col4"],keys:_col0, _col3, _col4, _col1, _col2
-                                  Select Operator [SEL_195] (rows=4302070 width=135)
+                                  Select Operator [SEL_221] (rows=4302070 width=135)
                                     Output:["_col0","_col1","_col2","_col3","_col4"]
-                                    Filter Operator [FIL_194] (rows=4302070 width=135)
+                                    Filter Operator [FIL_220] (rows=4302070 width=135)
                                       predicate:((_col0 <= 10) or (rank_window_1 <= 10))
-                                      PTF Operator [PTF_193] (rows=6453105 width=135)
+                                      PTF Operator [PTF_219] (rows=6453105 width=135)
                                         Function definitions:[{},{"name:":"windowingtablefunction","order by:":"(CAST( _col4 AS decimal(15,4)) / CAST( _col5 AS decimal(15,4))) ASC NULLS FIRST","partition by:":"0"}]
-                                        Select Operator [SEL_192] (rows=6453105 width=135)
+                                        Select Operator [SEL_218] (rows=6453105 width=135)
                                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                                         <-Reducer 16 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_191]
+                                          SHUFFLE [RS_217]
                                             PartitionCols:0
-                                            Select Operator [SEL_190] (rows=6453105 width=135)
+                                            Select Operator [SEL_216] (rows=6453105 width=135)
                                               Output:["rank_window_0","_col0","_col1","_col2","_col3","_col4"]
-                                              PTF Operator [PTF_189] (rows=6453105 width=135)
+                                              PTF Operator [PTF_215] (rows=6453105 width=135)
                                                 Function definitions:[{},{"name:":"windowingtablefunction","order by:":"(CAST( _col1 AS decimal(15,4)) / CAST( _col2 AS decimal(15,4))) ASC NULLS FIRST","partition by:":"0"}]
-                                                Select Operator [SEL_188] (rows=6453105 width=135)
+                                                Select Operator [SEL_214] (rows=6453105 width=135)
                                                   Output:["_col0","_col1","_col2","_col3","_col4"]
                                                 <-Reducer 15 [SIMPLE_EDGE] vectorized
-                                                  SHUFFLE [RS_187]
+                                                  SHUFFLE [RS_213]
                                                     PartitionCols:0
-                                                    Group By Operator [GBY_186] (rows=6453105 width=135)
+                                                    Group By Operator [GBY_212] (rows=6453105 width=135)
                                                       Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)"],keys:KEY._col0
                                                     <-Reducer 14 [SIMPLE_EDGE]
                                                       SHUFFLE [RS_50]
@@ -402,13 +402,13 @@ Stage-0
                                                           Select Operator [SEL_47] (rows=12906211 width=135)
                                                             Output:["_col0","_col1","_col2","_col3","_col4"]
                                                             Merge Join Operator [MERGEJOIN_144] (rows=12906211 width=135)
-                                                              Conds:RS_44._col1, _col2=RS_185._col0, _col1(Inner),Output:["_col1","_col3","_col4","_col11","_col12"]
+                                                              Conds:RS_44._col1, _col2=RS_211._col0, _col1(Inner),Output:["_col1","_col3","_col4","_col11","_col12"]
                                                             <-Map 25 [SIMPLE_EDGE] vectorized
-                                                              SHUFFLE [RS_185]
+                                                              SHUFFLE [RS_211]
                                                                 PartitionCols:_col0, _col1
-                                                                Select Operator [SEL_184] (rows=9599627 width=106)
+                                                                Select Operator [SEL_210] (rows=9599627 width=106)
                                                                   Output:["_col0","_col1","_col2","_col3"]
-                                                                  Filter Operator [FIL_183] (rows=9599627 width=106)
+                                                                  Filter Operator [FIL_209] (rows=9599627 width=106)
                                                                     predicate:((cr_return_amount > 10000) and cr_item_sk is not null and cr_order_number is not null)
                                                                     TableScan [TS_38] (rows=28798881 width=106)
                                                                       default@catalog_returns,cr,Tbl:COMPLETE,Col:NONE,Output:["cr_item_sk","cr_order_number","cr_return_quantity","cr_return_amount"]
@@ -416,46 +416,46 @@ Stage-0
                                                               SHUFFLE [RS_44]
                                                                 PartitionCols:_col1, _col2
                                                                 Merge Join Operator [MERGEJOIN_143] (rows=11732919 width=135)
-                                                                  Conds:RS_182._col0=RS_153._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                                                                  Conds:RS_208._col0=RS_179._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
                                                                 <-Map 12 [SIMPLE_EDGE] vectorized
-                                                                  SHUFFLE [RS_153]
+                                                                  SHUFFLE [RS_179]
                                                                     PartitionCols:_col0
-                                                                     Please refer to the previous Select Operator [SEL_151]
+                                                                     Please refer to the previous Select Operator [SEL_177]
                                                                 <-Map 24 [SIMPLE_EDGE] vectorized
-                                                                  SHUFFLE [RS_182]
+                                                                  SHUFFLE [RS_208]
                                                                     PartitionCols:_col0
-                                                                    Select Operator [SEL_181] (rows=10666290 width=135)
+                                                                    Select Operator [SEL_207] (rows=10666290 width=135)
                                                                       Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                                      Filter Operator [FIL_180] (rows=10666290 width=135)
+                                                                      Filter Operator [FIL_206] (rows=10666290 width=135)
                                                                         predicate:((cs_net_paid > 0) and (cs_net_profit > 1) and (cs_quantity > 0) and cs_item_sk is not null and cs_order_number is not null and cs_sold_date_sk is not null)
                                                                         TableScan [TS_32] (rows=287989836 width=135)
                                                                           default@catalog_sales,cs,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_item_sk","cs_order_number","cs_quantity","cs_net_paid","cs_net_profit"]
                             <-Reducer 6 [CONTAINS] vectorized
-                              Reduce Output Operator [RS_169]
+                              Reduce Output Operator [RS_195]
                                 PartitionCols:_col0, _col1, _col2, _col3, _col4
-                                Group By Operator [GBY_168] (rows=6453220 width=135)
+                                Group By Operator [GBY_194] (rows=6453220 width=135)
                                   Output:["_col0","_col1","_col2","_col3","_col4"],keys:_col0, _col3, _col4, _col1, _col2
-                                  Select Operator [SEL_167] (rows=2151150 width=135)
+                                  Select Operator [SEL_193] (rows=2151150 width=135)
                                     Output:["_col0","_col1","_col2","_col3","_col4"]
-                                    Filter Operator [FIL_166] (rows=2151150 width=135)
+                                    Filter Operator [FIL_192] (rows=2151150 width=135)
                                       predicate:((_col0 <= 10) or (rank_window_1 <= 10))
-                                      PTF Operator [PTF_165] (rows=3226726 width=135)
+                                      PTF Operator [PTF_191] (rows=3226726 width=135)
                                         Function definitions:[{},{"name:":"windowingtablefunction","order by:":"(CAST( _col4 AS decimal(15,4)) / CAST( _col5 AS decimal(15,4))) ASC NULLS FIRST","partition by:":"0"}]
-                                        Select Operator [SEL_164] (rows=3226726 width=135)
+                                        Select Operator [SEL_190] (rows=3226726 width=135)
                                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                                         <-Reducer 5 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_163]
+                                          SHUFFLE [RS_189]
                                             PartitionCols:0
-                                            Select Operator [SEL_162] (rows=3226726 width=135)
+                                            Select Operator [SEL_188] (rows=3226726 width=135)
                                               Output:["rank_window_0","_col0","_col1","_col2","_col3","_col4"]
-                                              PTF Operator [PTF_161] (rows=3226726 width=135)
+                                              PTF Operator [PTF_187] (rows=3226726 width=135)
                                                 Function definitions:[{},{"name:":"windowingtablefunction","order by:":"(CAST( _col1 AS decimal(15,4)) / CAST( _col2 AS decimal(15,4))) ASC NULLS FIRST","partition by:":"0"}]
-                                                Select Operator [SEL_160] (rows=3226726 width=135)
+                                                Select Operator [SEL_186] (rows=3226726 width=135)
                                                   Output:["_col0","_col1","_col2","_col3","_col4"]
                                                 <-Reducer 4 [SIMPLE_EDGE] vectorized
-                                                  SHUFFLE [RS_159]
+                                                  SHUFFLE [RS_185]
                                                     PartitionCols:0
-                                                    Group By Operator [GBY_158] (rows=3226726 width=135)
+                                                    Group By Operator [GBY_184] (rows=3226726 width=135)
                                                       Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)"],keys:KEY._col0
                                                     <-Reducer 3 [SIMPLE_EDGE]
                                                       SHUFFLE [RS_18]
@@ -465,13 +465,13 @@ Stage-0
                                                           Select Operator [SEL_15] (rows=6453452 width=135)
                                                             Output:["_col0","_col1","_col2","_col3","_col4"]
                                                             Merge Join Operator [MERGEJOIN_142] (rows=6453452 width=135)
-                                                              Conds:RS_12._col1, _col2=RS_157._col0, _col1(Inner),Output:["_col1","_col3","_col4","_col11","_col12"]
+                                                              Conds:RS_12._col1, _col2=RS_183._col0, _col1(Inner),Output:["_col1","_col3","_col4","_col11","_col12"]
                                                             <-Map 23 [SIMPLE_EDGE] vectorized
-                                                              SHUFFLE [RS_157]
+                                                              SHUFFLE [RS_183]
                                                                 PartitionCols:_col0, _col1
-                                                                Select Operator [SEL_156] (rows=4799489 width=92)
+                                                                Select Operator [SEL_182] (rows=4799489 width=92)
                                                                   Output:["_col0","_col1","_col2","_col3"]
-                                                                  Filter Operator [FIL_155] (rows=4799489 width=92)
+                                                                  Filter Operator [FIL_181] (rows=4799489 width=92)
                                                                     predicate:((wr_return_amt > 10000) and wr_item_sk is not null and wr_order_number is not null)
                                                                     TableScan [TS_6] (rows=14398467 width=92)
                                                                       default@web_returns,wr,Tbl:COMPLETE,Col:NONE,Output:["wr_item_sk","wr_order_number","wr_return_quantity","wr_return_amt"]
@@ -479,17 +479,17 @@ Stage-0
                                                               SHUFFLE [RS_12]
                                                                 PartitionCols:_col1, _col2
                                                                 Merge Join Operator [MERGEJOIN_141] (rows=5866775 width=135)
-                                                                  Conds:RS_149._col0=RS_152._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                                                                  Conds:RS_175._col0=RS_178._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
                                                                 <-Map 12 [SIMPLE_EDGE] vectorized
-                                                                  SHUFFLE [RS_152]
+                                                                  SHUFFLE [RS_178]
                                                                     PartitionCols:_col0
-                                                                     Please refer to the previous Select Operator [SEL_151]
+                                                                     Please refer to the previous Select Operator [SEL_177]
                                                                 <-Map 1 [SIMPLE_EDGE] vectorized
-                                                                  SHUFFLE [RS_149]
+                                                                  SHUFFLE [RS_175]
                                                                     PartitionCols:_col0
-                                                                    Select Operator [SEL_148] (rows=5333432 width=135)
+                                                                    Select Operator [SEL_174] (rows=5333432 width=135)
                                                                       Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                                      Filter Operator [FIL_147] (rows=5333432 width=135)
+                                                                      Filter Operator [FIL_173] (rows=5333432 width=135)
                                                                         predicate:((ws_net_paid > 0) and (ws_net_profit > 1) and (ws_quantity > 0) and ws_item_sk is not null and ws_order_number is not null and ws_sold_date_sk is not null)
                                                                         TableScan [TS_0] (rows=144002668 width=135)
                                                                           default@web_sales,ws,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_order_number","ws_quantity","ws_net_paid","ws_net_profit"]

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query5.q.out b/ql/src/test/results/clientpositive/perf/tez/query5.q.out
index f13b767..f074ed1 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query5.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query5.q.out
@@ -278,26 +278,26 @@ Stage-0
     limit:100
     Stage-1
       Reducer 8 vectorized
-      File Output Operator [FS_158]
-        Limit [LIM_157] (rows=100 width=110)
+      File Output Operator [FS_202]
+        Limit [LIM_201] (rows=100 width=110)
           Number of rows:100
-          Select Operator [SEL_156] (rows=1136898901 width=110)
+          Select Operator [SEL_200] (rows=1136898901 width=110)
             Output:["_col0","_col1","_col2","_col3","_col4"]
           <-Reducer 7 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_155]
-              Select Operator [SEL_154] (rows=1136898901 width=110)
+            SHUFFLE [RS_199]
+              Select Operator [SEL_198] (rows=1136898901 width=110)
                 Output:["_col0","_col1","_col2","_col3","_col4"]
-                Group By Operator [GBY_153] (rows=1136898901 width=110)
+                Group By Operator [GBY_197] (rows=1136898901 width=110)
                   Output:["_col0","_col1","_col3","_col4","_col5"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2
                 <-Union 6 [SIMPLE_EDGE]
                   <-Reducer 13 [CONTAINS] vectorized
-                    Reduce Output Operator [RS_168]
+                    Reduce Output Operator [RS_212]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_167] (rows=2273797803 width=110)
+                      Group By Operator [GBY_211] (rows=2273797803 width=110)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Select Operator [SEL_166] (rows=191657181 width=132)
+                        Select Operator [SEL_210] (rows=191657181 width=132)
                           Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Group By Operator [GBY_165] (rows=191657181 width=132)
+                          Group By Operator [GBY_209] (rows=191657181 width=132)
                             Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)"],keys:KEY._col0
                           <-Reducer 12 [SIMPLE_EDGE]
                             SHUFFLE [RS_47]
@@ -305,13 +305,13 @@ Stage-0
                               Group By Operator [GBY_46] (rows=383314363 width=132)
                                 Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col2)","sum(_col4)","sum(_col3)","sum(_col5)"],keys:_col9
                                 Merge Join Operator [MERGEJOIN_135] (rows=383314363 width=132)
-                                  Conds:RS_42._col0=RS_164._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col9"]
+                                  Conds:RS_42._col0=RS_208._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col9"]
                                 <-Map 21 [SIMPLE_EDGE] vectorized
-                                  SHUFFLE [RS_164]
+                                  SHUFFLE [RS_208]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_163] (rows=46000 width=460)
+                                    Select Operator [SEL_207] (rows=46000 width=460)
                                       Output:["_col0","_col1"]
-                                      Filter Operator [FIL_162] (rows=46000 width=460)
+                                      Filter Operator [FIL_206] (rows=46000 width=460)
                                         predicate:cp_catalog_page_sk is not null
                                         TableScan [TS_36] (rows=46000 width=460)
                                           default@catalog_page,catalog_page,Tbl:COMPLETE,Col:NONE,Output:["cp_catalog_page_sk","cp_catalog_page_id"]
@@ -319,43 +319,43 @@ Stage-0
                                   SHUFFLE [RS_42]
                                     PartitionCols:_col0
                                     Merge Join Operator [MERGEJOIN_134] (rows=348467596 width=132)
-                                      Conds:Union 19._col1=RS_144._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5"]
+                                      Conds:Union 19._col1=RS_188._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5"]
                                     <-Map 10 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_144]
+                                      SHUFFLE [RS_188]
                                         PartitionCols:_col0
-                                        Select Operator [SEL_142] (rows=8116 width=1119)
+                                        Select Operator [SEL_186] (rows=8116 width=1119)
                                           Output:["_col0"]
-                                          Filter Operator [FIL_141] (rows=8116 width=1119)
+                                          Filter Operator [FIL_185] (rows=8116 width=1119)
                                             predicate:(CAST( d_date AS TIMESTAMP) BETWEEN TIMESTAMP'1998-08-04 00:00:00.0' AND TIMESTAMP'1998-08-18 00:00:00.0' and d_date_sk is not null)
                                             TableScan [TS_8] (rows=73049 width=1119)
                                               default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"]
                                     <-Union 19 [SIMPLE_EDGE]
                                       <-Map 18 [CONTAINS] vectorized
-                                        Reduce Output Operator [RS_178]
+                                        Reduce Output Operator [RS_222]
                                           PartitionCols:_col1
-                                          Select Operator [SEL_177] (rows=287989836 width=135)
+                                          Select Operator [SEL_221] (rows=287989836 width=135)
                                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                            Filter Operator [FIL_176] (rows=287989836 width=135)
+                                            Filter Operator [FIL_220] (rows=287989836 width=135)
                                               predicate:(cs_catalog_page_sk is not null and cs_sold_date_sk is not null)
-                                              TableScan [TS_25] (rows=287989836 width=135)
+                                              TableScan [TS_163] (rows=287989836 width=135)
                                                 Output:["cs_sold_date_sk","cs_catalog_page_sk","cs_ext_sales_price","cs_net_profit"]
                                       <-Map 20 [CONTAINS] vectorized
-                                        Reduce Output Operator [RS_181]
+                                        Reduce Output Operator [RS_225]
                                           PartitionCols:_col1
-                                          Select Operator [SEL_180] (rows=28798881 width=106)
+                                          Select Operator [SEL_224] (rows=28798881 width=106)
                                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                            Filter Operator [FIL_179] (rows=28798881 width=106)
+                                            Filter Operator [FIL_223] (rows=28798881 width=106)
                                               predicate:(cr_catalog_page_sk is not null and cr_returned_date_sk is not null)
-                                              TableScan [TS_28] (rows=28798881 width=106)
+                                              TableScan [TS_168] (rows=28798881 width=106)
                                                 Output:["cr_returned_date_sk","cr_catalog_page_sk","cr_return_amount","cr_net_loss"]
                   <-Reducer 16 [CONTAINS] vectorized
-                    Reduce Output Operator [RS_175]
+                    Reduce Output Operator [RS_219]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_174] (rows=2273797803 width=110)
+                      Group By Operator [GBY_218] (rows=2273797803 width=110)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Select Operator [SEL_173] (rows=182955399 width=135)
+                        Select Operator [SEL_217] (rows=182955399 width=135)
                           Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Group By Operator [GBY_172] (rows=182955399 width=135)
+                          Group By Operator [GBY_216] (rows=182955399 width=135)
                             Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)"],keys:KEY._col0
                           <-Reducer 15 [SIMPLE_EDGE]
                             SHUFFLE [RS_80]
@@ -363,13 +363,13 @@ Stage-0
                               Group By Operator [GBY_79] (rows=365910798 width=135)
                                 Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col2)","sum(_col4)","sum(_col3)","sum(_col5)"],keys:_col9
                                 Merge Join Operator [MERGEJOIN_137] (rows=365910798 width=135)
-                                  Conds:RS_75._col0=RS_171._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col9"]
+                                  Conds:RS_75._col0=RS_215._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col9"]
                                 <-Map 27 [SIMPLE_EDGE] vectorized
-                                  SHUFFLE [RS_171]
+                                  SHUFFLE [RS_215]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_170] (rows=84 width=1850)
+                                    Select Operator [SEL_214] (rows=84 width=1850)
                                       Output:["_col0","_col1"]
-                                      Filter Operator [FIL_169] (rows=84 width=1850)
+                                      Filter Operator [FIL_213] (rows=84 width=1850)
                                         predicate:web_site_sk is not null
                                         TableScan [TS_69] (rows=84 width=1850)
                                           default@web_site,web_site,Tbl:COMPLETE,Col:NONE,Output:["web_site_sk","web_site_id"]
@@ -377,54 +377,54 @@ Stage-0
                                   SHUFFLE [RS_75]
                                     PartitionCols:_col0
                                     Merge Join Operator [MERGEJOIN_136] (rows=332646173 width=135)
-                                      Conds:Union 23._col1=RS_145._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5"]
+                                      Conds:Union 23._col1=RS_189._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5"]
                                     <-Map 10 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_145]
+                                      SHUFFLE [RS_189]
                                         PartitionCols:_col0
-                                         Please refer to the previous Select Operator [SEL_142]
+                                         Please refer to the previous Select Operator [SEL_186]
                                     <-Union 23 [SIMPLE_EDGE]
                                       <-Map 22 [CONTAINS] vectorized
-                                        Reduce Output Operator [RS_184]
+                                        Reduce Output Operator [RS_228]
                                           PartitionCols:_col1
-                                          Select Operator [SEL_183] (rows=144002668 width=135)
+                                          Select Operator [SEL_227] (rows=144002668 width=135)
                                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                            Filter Operator [FIL_182] (rows=144002668 width=135)
+                                            Filter Operator [FIL_226] (rows=144002668 width=135)
                                               predicate:(ws_sold_date_sk is not null and ws_web_site_sk is not null)
-                                              TableScan [TS_51] (rows=144002668 width=135)
+                                              TableScan [TS_173] (rows=144002668 width=135)
                                                 Output:["ws_sold_date_sk","ws_web_site_sk","ws_ext_sales_price","ws_net_profit"]
                                       <-Reducer 25 [CONTAINS]
-                                        Reduce Output Operator [RS_72]
+                                        Reduce Output Operator [RS_181]
                                           PartitionCols:_col1
-                                          Select Operator [SEL_63] (rows=158402938 width=135)
+                                          Select Operator [SEL_179] (rows=158402938 width=135)
                                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                            Merge Join Operator [MERGEJOIN_131] (rows=158402938 width=135)
-                                              Conds:RS_187._col0, _col2=RS_190._col1, _col2(Inner),Output:["_col1","_col3","_col6","_col7"]
+                                            Merge Join Operator [MERGEJOIN_178] (rows=158402938 width=135)
+                                              Conds:RS_231._col0, _col2=RS_234._col1, _col2(Inner),Output:["_col1","_col3","_col6","_col7"]
                                             <-Map 24 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_187]
+                                              SHUFFLE [RS_231]
                                                 PartitionCols:_col0, _col2
-                                                Select Operator [SEL_186] (rows=144002668 width=135)
+                                                Select Operator [SEL_230] (rows=144002668 width=135)
                                                   Output:["_col0","_col1","_col2"]
-                                                  Filter Operator [FIL_185] (rows=144002668 width=135)
+                                                  Filter Operator [FIL_229] (rows=144002668 width=135)
                                                     predicate:(ws_item_sk is not null and ws_order_number is not null and ws_web_site_sk is not null)
                                                     TableScan [TS_54] (rows=144002668 width=135)
                                                       default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_item_sk","ws_web_site_sk","ws_order_number"]
                                             <-Map 26 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_190]
+                                              SHUFFLE [RS_234]
                                                 PartitionCols:_col1, _col2
-                                                Select Operator [SEL_189] (rows=14398467 width=92)
+                                                Select Operator [SEL_233] (rows=14398467 width=92)
                                                   Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                  Filter Operator [FIL_188] (rows=14398467 width=92)
+                                                  Filter Operator [FIL_232] (rows=14398467 width=92)
                                                     predicate:(wr_item_sk is not null and wr_order_number is not null and wr_returned_date_sk is not null)
                                                     TableScan [TS_57] (rows=14398467 width=92)
                                                       default@web_returns,web_returns,Tbl:COMPLETE,Col:NONE,Output:["wr_returned_date_sk","wr_item_sk","wr_order_number","wr_return_amt","wr_net_loss"]
                   <-Reducer 5 [CONTAINS] vectorized
-                    Reduce Output Operator [RS_152]
+                    Reduce Output Operator [RS_196]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_151] (rows=2273797803 width=110)
+                      Group By Operator [GBY_195] (rows=2273797803 width=110)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Select Operator [SEL_150] (rows=383320021 width=87)
+                        Select Operator [SEL_194] (rows=383320021 width=87)
                           Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Group By Operator [GBY_149] (rows=383320021 width=87)
+                          Group By Operator [GBY_193] (rows=383320021 width=87)
                             Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)"],keys:KEY._col0
                           <-Reducer 4 [SIMPLE_EDGE]
                             SHUFFLE [RS_22]
@@ -432,13 +432,13 @@ Stage-0
                               Group By Operator [GBY_21] (rows=766640042 width=87)
                                 Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col2)","sum(_col4)","sum(_col3)","sum(_col5)"],keys:_col9
                                 Merge Join Operator [MERGEJOIN_133] (rows=766640042 width=87)
-                                  Conds:RS_17._col0=RS_148._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col9"]
+                                  Conds:RS_17._col0=RS_192._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col9"]
                                 <-Map 17 [SIMPLE_EDGE] vectorized
-                                  SHUFFLE [RS_148]
+                                  SHUFFLE [RS_192]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_147] (rows=1704 width=1910)
+                                    Select Operator [SEL_191] (rows=1704 width=1910)
                                       Output:["_col0","_col1"]
-                                      Filter Operator [FIL_146] (rows=1704 width=1910)
+                                      Filter Operator [FIL_190] (rows=1704 width=1910)
                                         predicate:s_store_sk is not null
                                         TableScan [TS_11] (rows=1704 width=1910)
                                           default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_store_id"]
@@ -446,28 +446,28 @@ Stage-0
                                   SHUFFLE [RS_17]
                                     PartitionCols:_col0
                                     Merge Join Operator [MERGEJOIN_132] (rows=696945478 width=87)
-                                      Conds:Union 2._col1=RS_143._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5"]
+                                      Conds:Union 2._col1=RS_187._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5"]
                                     <-Map 10 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_143]
+                                      SHUFFLE [RS_187]
                                         PartitionCols:_col0
-                                         Please refer to the previous Select Operator [SEL_142]
+                                         Please refer to the previous Select Operator [SEL_186]
                                     <-Union 2 [SIMPLE_EDGE]
                                       <-Map 1 [CONTAINS] vectorized
-                                        Reduce Output Operator [RS_140]
+                                        Reduce Output Operator [RS_184]
                                           PartitionCols:_col1
-                                          Select Operator [SEL_139] (rows=575995635 width=88)
+                                          Select Operator [SEL_183] (rows=575995635 width=88)
                                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                            Filter Operator [FIL_138] (rows=575995635 width=88)
+                                            Filter Operator [FIL_182] (rows=575995635 width=88)
                                               predicate:(ss_sold_date_sk is not null and ss_store_sk is not null)
-                                              TableScan [TS_0] (rows=575995635 width=88)
+                                              TableScan [TS_138] (rows=575995635 width=88)
                                                 Output:["ss_sold_date_sk","ss_store_sk","ss_ext_sales_price","ss_net_profit"]
                                       <-Map 9 [CONTAINS] vectorized
-                                        Reduce Output Operator [RS_161]
+                                        Reduce Output Operator [RS_205]
                                           PartitionCols:_col1
-                                          Select Operator [SEL_160] (rows=57591150 width=77)
+                                          Select Operator [SEL_204] (rows=57591150 width=77)
                                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                            Filter Operator [FIL_159] (rows=57591150 width=77)
+                                            Filter Operator [FIL_203] (rows=57591150 width=77)
                                               predicate:(sr_returned_date_sk is not null and sr_store_sk is not null)
-                                              TableScan [TS_3] (rows=57591150 width=77)
+                                              TableScan [TS_148] (rows=57591150 width=77)
                                                 Output:["sr_returned_date_sk","sr_store_sk","sr_return_amt","sr_net_loss"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query54.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query54.q.out b/ql/src/test/results/clientpositive/perf/tez/query54.q.out
index 699adb8..386ea4b 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query54.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query54.q.out
@@ -143,25 +143,25 @@ Stage-0
     limit:100
     Stage-1
       Reducer 9 vectorized
-      File Output Operator [FS_249]
-        Limit [LIM_248] (rows=100 width=158)
+      File Output Operator [FS_259]
+        Limit [LIM_258] (rows=100 width=158)
           Number of rows:100
-          Select Operator [SEL_247] (rows=1614130953450400 width=158)
+          Select Operator [SEL_257] (rows=1614130953450400 width=158)
             Output:["_col0","_col1","_col2"]
           <-Reducer 8 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_246]
-              Select Operator [SEL_245] (rows=1614130953450400 width=158)
+            SHUFFLE [RS_256]
+              Select Operator [SEL_255] (rows=1614130953450400 width=158)
                 Output:["_col0","_col1","_col2"]
-                Group By Operator [GBY_244] (rows=1614130953450400 width=158)
+                Group By Operator [GBY_254] (rows=1614130953450400 width=158)
                   Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
                 <-Reducer 7 [SIMPLE_EDGE] vectorized
-                  SHUFFLE [RS_243]
+                  SHUFFLE [RS_253]
                     PartitionCols:_col0
-                    Group By Operator [GBY_242] (rows=3228261906900801 width=158)
+                    Group By Operator [GBY_252] (rows=3228261906900801 width=158)
                       Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
-                      Select Operator [SEL_241] (rows=3228261906900801 width=158)
+                      Select Operator [SEL_251] (rows=3228261906900801 width=158)
                         Output:["_col0"]
-                        Group By Operator [GBY_240] (rows=3228261906900801 width=158)
+                        Group By Operator [GBY_250] (rows=3228261906900801 width=158)
                           Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                         <-Reducer 6 [SIMPLE_EDGE]
                           SHUFFLE [RS_119]
@@ -181,42 +181,42 @@ Stage-0
                                         Merge Join Operator [MERGEJOIN_183] (rows=9131 width=1128)
                                           Conds:(Right Outer),Output:["_col0"]
                                         <-Reducer 28 [CUSTOM_SIMPLE_EDGE] vectorized
-                                          PARTITION_ONLY_SHUFFLE [RS_231]
-                                            Group By Operator [GBY_230] (rows=9131 width=1119)
+                                          PARTITION_ONLY_SHUFFLE [RS_241]
+                                            Group By Operator [GBY_240] (rows=9131 width=1119)
                                               Output:["_col0"],keys:KEY._col0
                                             <-Map 25 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_219]
+                                              SHUFFLE [RS_229]
                                                 PartitionCols:_col0
-                                                Group By Operator [GBY_216] (rows=18262 width=1119)
+                                                Group By Operator [GBY_226] (rows=18262 width=1119)
                                                   Output:["_col0"],keys:_col0
-                                                  Select Operator [SEL_213] (rows=18262 width=1119)
+                                                  Select Operator [SEL_223] (rows=18262 width=1119)
                                                     Output:["_col0"]
-                                                    Filter Operator [FIL_211] (rows=18262 width=1119)
+                                                    Filter Operator [FIL_221] (rows=18262 width=1119)
                                                       predicate:((d_moy = 3) and (d_year = 1999))
                                                       TableScan [TS_73] (rows=73049 width=1119)
                                                         default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_month_seq","d_year","d_moy"]
                                         <-Reducer 31 [CUSTOM_SIMPLE_EDGE] vectorized
-                                          PARTITION_ONLY_SHUFFLE [RS_239]
-                                            Select Operator [SEL_238] (rows=1 width=8)
-                                              Filter Operator [FIL_237] (rows=1 width=8)
+                                          PARTITION_ONLY_SHUFFLE [RS_249]
+                                            Select Operator [SEL_248] (rows=1 width=8)
+                                              Filter Operator [FIL_247] (rows=1 width=8)
                                                 predicate:(sq_count_check(_col0) <= 1)
-                                                Group By Operator [GBY_236] (rows=1 width=8)
+                                                Group By Operator [GBY_246] (rows=1 width=8)
                                                   Output:["_col0"],aggregations:["count(VALUE._col0)"]
                                                 <-Reducer 30 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                  PARTITION_ONLY_SHUFFLE [RS_235]
-                                                    Group By Operator [GBY_234] (rows=1 width=8)
+                                                  PARTITION_ONLY_SHUFFLE [RS_245]
+                                                    Group By Operator [GBY_244] (rows=1 width=8)
                                                       Output:["_col0"],aggregations:["count()"]
-                                                      Select Operator [SEL_233] (rows=9131 width=1119)
-                                                        Group By Operator [GBY_232] (rows=9131 width=1119)
+                                                      Select Operator [SEL_243] (rows=9131 width=1119)
+                                                        Group By Operator [GBY_242] (rows=9131 width=1119)
                                                           Output:["_col0"],keys:KEY._col0
                                                         <-Map 25 [SIMPLE_EDGE] vectorized
-                                                          SHUFFLE [RS_220]
+                                                          SHUFFLE [RS_230]
                                                             PartitionCols:_col0
-                                                            Group By Operator [GBY_217] (rows=18262 width=1119)
+                                                            Group By Operator [GBY_227] (rows=18262 width=1119)
                                                               Output:["_col0"],keys:_col0
-                                                              Select Operator [SEL_214] (rows=18262 width=1119)
+                                                              Select Operator [SEL_224] (rows=18262 width=1119)
                                                                 Output:["_col0"]
-                                                                 Please refer to the previous Filter Operator [FIL_211]
+                                                                 Please refer to the previous Filter Operator [FIL_221]
                                     <-Reducer 5 [CUSTOM_SIMPLE_EDGE]
                                       PARTITION_ONLY_SHUFFLE [RS_113]
                                         Select Operator [SEL_108] (rows=6363893803988 width=1217)
@@ -224,34 +224,34 @@ Stage-0
                                           Merge Join Operator [MERGEJOIN_185] (rows=6363893803988 width=1217)
                                             Conds:(Left Outer),Output:["_col2","_col4","_col10","_col13"]
                                           <-Reducer 26 [CUSTOM_SIMPLE_EDGE] vectorized
-                                            PARTITION_ONLY_SHUFFLE [RS_223]
-                                              Group By Operator [GBY_221] (rows=9131 width=1119)
+                                            PARTITION_ONLY_SHUFFLE [RS_233]
+                                              Group By Operator [GBY_231] (rows=9131 width=1119)
                                                 Output:["_col0"],keys:KEY._col0
                                               <-Map 25 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_218]
+                                                SHUFFLE [RS_228]
                                                   PartitionCols:_col0
-                                                  Group By Operator [GBY_215] (rows=18262 width=1119)
+                                                  Group By Operator [GBY_225] (rows=18262 width=1119)
                                                     Output:["_col0"],keys:_col0
-                                                    Select Operator [SEL_212] (rows=18262 width=1119)
+                                                    Select Operator [SEL_222] (rows=18262 width=1119)
                                                       Output:["_col0"]
-                                                       Please refer to the previous Filter Operator [FIL_211]
+                                                       Please refer to the previous Filter Operator [FIL_221]
                                           <-Reducer 4 [CUSTOM_SIMPLE_EDGE]
                                             PARTITION_ONLY_SHUFFLE [RS_105]
                                               Merge Join Operator [MERGEJOIN_184] (rows=696954748 width=97)
                                                 Conds:(Inner),Output:["_col2","_col4","_col10"]
                                               <-Reducer 27 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                PARTITION_ONLY_SHUFFLE [RS_229]
-                                                  Select Operator [SEL_228] (rows=1 width=8)
-                                                    Filter Operator [FIL_227] (rows=1 width=8)
+                                                PARTITION_ONLY_SHUFFLE [RS_239]
+                                                  Select Operator [SEL_238] (rows=1 width=8)
+                                                    Filter Operator [FIL_237] (rows=1 width=8)
                                                       predicate:(sq_count_check(_col0) <= 1)
-                                                      Group By Operator [GBY_226] (rows=1 width=8)
+                                                      Group By Operator [GBY_236] (rows=1 width=8)
                                                         Output:["_col0"],aggregations:["count(VALUE._col0)"]
                                                       <-Reducer 26 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                        PARTITION_ONLY_SHUFFLE [RS_225]
-                                                          Group By Operator [GBY_224] (rows=1 width=8)
+                                                        PARTITION_ONLY_SHUFFLE [RS_235]
+                                                          Group By Operator [GBY_234] (rows=1 width=8)
                                                             Output:["_col0"],aggregations:["count()"]
-                                                            Select Operator [SEL_222] (rows=9131 width=1119)
-                                                               Please refer to the previous Group By Operator [GBY_221]
+                                                            Select Operator [SEL_232] (rows=9131 width=1119)
+                                                               Please refer to the previous Group By Operator [GBY_231]
                                               <-Reducer 3 [CUSTOM_SIMPLE_EDGE]
                                                 PARTITION_ONLY_SHUFFLE [RS_102]
                                                   Merge Join Operator [MERGEJOIN_182] (rows=696954748 width=88)
@@ -260,36 +260,36 @@ Stage-0
                                                     SHUFFLE [RS_100]
                                                       PartitionCols:_col5
                                                       Merge Join Operator [MERGEJOIN_181] (rows=316240138 width=135)
-                                                        Conds:RS_69._col0=RS_210._col1(Inner),Output:["_col5"]
+                                                        Conds:RS_69._col0=RS_220._col1(Inner),Output:["_col5"]
                                                       <-Reducer 12 [SIMPLE_EDGE]
                                                         SHUFFLE [RS_69]
                                                           PartitionCols:_col0
                                                           Merge Join Operator [MERGEJOIN_177] (rows=44000000 width=1014)
-                                                            Conds:RS_195._col1, _col2=RS_198._col0, _col1(Inner),Output:["_col0"]
+                                                            Conds:RS_205._col1, _col2=RS_208._col0, _col1(Inner),Output:["_col0"]
                                                           <-Map 11 [SIMPLE_EDGE] vectorized
-                                                            SHUFFLE [RS_195]
+                                                            SHUFFLE [RS_205]
                                                               PartitionCols:_col1, _col2
-                                                              Select Operator [SEL_194] (rows=40000000 width=1014)
+                                                              Select Operator [SEL_204] (rows=40000000 width=1014)
                                                                 Output:["_col0","_col1","_col2"]
-                                                                Filter Operator [FIL_193] (rows=40000000 width=1014)
+                                                                Filter Operator [FIL_203] (rows=40000000 width=1014)
                                                                   predicate:(ca_address_sk is not null and ca_county is not null and ca_state is not null)
                                                                   TableScan [TS_29] (rows=40000000 width=1014)
                                                                     default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_county","ca_state"]
                                                           <-Map 14 [SIMPLE_EDGE] vectorized
-                                                            SHUFFLE [RS_198]
+                                                            SHUFFLE [RS_208]
                                                               PartitionCols:_col0, _col1
-                                                              Select Operator [SEL_197] (rows=1704 width=1910)
+                                                              Select Operator [SEL_207] (rows=1704 width=1910)
                                                                 Output:["_col0","_col1"]
-                                                                Filter Operator [FIL_196] (rows=1704 width=1910)
+                                                                Filter Operator [FIL_206] (rows=1704 width=1910)
                                                                   predicate:(s_county is not null and s_state is not null)
                                                                   TableScan [TS_32] (rows=1704 width=1910)
                                                                     default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_county","s_state"]
                                                       <-Reducer 20 [SIMPLE_EDGE] vectorized
-                                                        SHUFFLE [RS_210]
+                                                        SHUFFLE [RS_220]
                                                           PartitionCols:_col1
-                                                          Select Operator [SEL_209] (rows=287491029 width=135)
+                                                          Select Operator [SEL_219] (rows=287491029 width=135)
                                                             Output:["_col0","_col1"]
-                                                            Group By Operator [GBY_208] (rows=287491029 width=135)
+                                                            Group By Operator [GBY_218] (rows=287491029 width=135)
                                                               Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                                             <-Reducer 19 [SIMPLE_EDGE]
                                                               SHUFFLE [RS_63]
@@ -297,13 +297,13 @@ Stage-0
                                                                 Group By Operator [GBY_62] (rows=574982058 width=135)
                                                                   Output:["_col0","_col1"],keys:_col10, _col9
                                                                   Merge Join Operator [MERGEJOIN_180] (rows=574982058 width=135)
-                                                                    Conds:RS_58._col1=RS_207._col0(Inner),Output:["_col9","_col10"]
+                                                                    Conds:RS_58._col1=RS_217._col0(Inner),Output:["_col9","_col10"]
                                                                   <-Map 24 [SIMPLE_EDGE] vectorized
-                                                                    SHUFFLE [RS_207]
+                                                                    SHUFFLE [RS_217]
                                                                       PartitionCols:_col0
-                                                                      Select Operator [SEL_206] (rows=80000000 width=860)
+                                                                      Select Operator [SEL_216] (rows=80000000 width=860)
                                                                         Output:["_col0","_col1"]
-                                                                        Filter Operator [FIL_205] (rows=80000000 width=860)
+                                                                        Filter Operator [FIL_215] (rows=80000000 width=860)
                                                                           predicate:(c_current_addr_sk is not null and c_customer_sk is not null)
                                                                           TableScan [TS_49] (rows=80000000 width=860)
                                                                             default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_current_addr_sk"]
@@ -311,13 +311,13 @@ Stage-0
                                                                     SHUFFLE [RS_58]
                                                                       PartitionCols:_col1
                                                                       Merge Join Operator [MERGEJOIN_179] (rows=522710951 width=135)
-                                                                        Conds:RS_55._col2=RS_204._col0(Inner),Output:["_col1"]
+                                                                        Conds:RS_55._col2=RS_214._col0(Inner),Output:["_col1"]
                                                                       <-Map 23 [SIMPLE_EDGE] vectorized
-                                                                        SHUFFLE [RS_204]
+                                                                        SHUFFLE [RS_214]
                                                                           PartitionCols:_col0
-                                                                          Select Operator [SEL_203] (rows=115500 width=1436)
+                                                                          Select Operator [SEL_213] (rows=115500 width=1436)
                                                                             Output:["_col0"]
-                                                                            Filter Operator [FIL_202] (rows=115500 width=1436)
+                                                                            Filter Operator [FIL_212] (rows=115500 width=1436)
                                                                               predicate:((i_category = 'Jewelry') and (i_class = 'consignment') and i_item_sk is not null)
                                                                               TableScan [TS_46] (rows=462000 width=1436)
                                                                                 default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_class","i_category"]
@@ -325,55 +325,55 @@ Stage-0
                                                                         SHUFFLE [RS_55]
                                                                           PartitionCols:_col2
                                                                           Merge Join Operator [MERGEJOIN_178] (rows=475191764 width=135)
-                                                                            Conds:Union 16._col0=RS_201._col0(Inner),Output:["_col1","_col2"]
+                                                                            Conds:Union 16._col0=RS_211._col0(Inner),Output:["_col1","_col2"]
                                                                           <-Map 22 [SIMPLE_EDGE] vectorized
-                                                                            SHUFFLE [RS_201]
+                                                                            SHUFFLE [RS_211]
                                                                               PartitionCols:_col0
-                                                                              Select Operator [SEL_200] (rows=18262 width=1119)
+                                                                              Select Operator [SEL_210] (rows=18262 width=1119)
                                                                                 Output:["_col0"]
-                                                                                Filter Operator [FIL_199] (rows=18262 width=1119)
+                                                                                Filter Operator [FIL_209] (rows=18262 width=1119)
                                                                                   predicate:((d_moy = 3) and (d_year = 1999) and d_date_sk is not null)
                                                                                   TableScan [TS_43] (rows=73049 width=1119)
                                                                                     default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
                                                                           <-Union 16 [SIMPLE_EDGE]
                                                                             <-Map 15 [CONTAINS] vectorized
-                                                                              Reduce Output Operator [RS_252]
+                                                                              Reduce Output Operator [RS_262]
                                                                                 PartitionCols:_col0
-                                                                                Select Operator [SEL_251] (rows=287989836 width=135)
+                                                                                Select Operator [SEL_261] (rows=287989836 width=135)
                                                                                   Output:["_col0","_col1","_col2"]
-                                                                                  Filter Operator [FIL_250] (rows=287989836 width=135)
+                                                                                  Filter Operator [FIL_260] (rows=287989836 width=135)
                                                                                     predicate:(cs_bill_customer_sk is not null and cs_item_sk is not null and cs_sold_date_sk is not null)
-                                                                                    TableScan [TS_35] (rows=287989836 width=135)
+                                                                                    TableScan [TS_187] (rows=287989836 width=135)
                                                                                       Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk"]
                                                                             <-Map 21 [CONTAINS] vectorized
-                                                                              Reduce Output Operator [RS_255]
+                                                                              Reduce Output Operator [RS_265]
                                                                                 PartitionCols:_col0
-                                                                                Select Operator [SEL_254] (rows=144002668 width=135)
+                                                                                Select Operator [SEL_264] (rows=144002668 width=135)
                                                                                   Output:["_col0","_col1","_col2"]
-                                                                                  Filter Operator [FIL_253] (rows=144002668 width=135)
+                                                                                  Filter Operator [FIL_263] (rows=144002668 width=135)
                                                                                     predicate:(ws_bill_customer_sk is not null and ws_item_sk is not null and ws_sold_date_sk is not null)
-                                                                                    TableScan [TS_38] (rows=144002668 width=135)
+                                                                                    TableScan [TS_192] (rows=144002668 width=135)
                                                                                       Output:["ws_sold_date_sk","ws_item_sk","ws_bill_customer_sk"]
                                                   <-Reducer 2 [SIMPLE_EDGE]
                                                     SHUFFLE [RS_99]
                                                       PartitionCols:_col1
                                                       Merge Join Operator [MERGEJOIN_176] (rows=633595212 width=88)
-                                                        Conds:RS_189._col0=RS_192._col0(Inner),Output:["_col1","_col2","_col4"]
+                                                        Conds:RS_199._col0=RS_202._col0(Inner),Output:["_col1","_col2","_col4"]
                                                       <-Map 1 [SIMPLE_EDGE] vectorized
-                                                        SHUFFLE [RS_189]
+                                                        SHUFFLE [RS_199]
                                                           PartitionCols:_col0
-                                                          Select Operator [SEL_188] (rows=575995635 width=88)
+                                                          Select Operator [SEL_198] (rows=575995635 width=88)
                                                             Output:["_col0","_col1","_col2"]
-                                                            Filter Operator [FIL_187] (rows=575995635 width=88)
+                                                            Filter Operator [FIL_197] (rows=575995635 width=88)
                                                               predicate:(ss_customer_sk is not null and ss_sold_date_sk is not null)
                                                               TableScan [TS_23] (rows=575995635 width=88)
                                                                 default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_customer_sk","ss_ext_sales_price"]
                                                       <-Map 10 [SIMPLE_EDGE] vectorized
-                                                        SHUFFLE [RS_192]
+                                                        SHUFFLE [RS_202]
                                                           PartitionCols:_col0
-                                                          Select Operator [SEL_191] (rows=73049 width=1119)
+                                                          Select Operator [SEL_201] (rows=73049 width=1119)
                                                             Output:["_col0","_col1"]
-                                                            Filter Operator [FIL_190] (rows=73049 width=1119)
+                                                            Filter Operator [FIL_200] (rows=73049 width=1119)
                                                               predicate:d_date_sk is not null
                                                               TableScan [TS_26] (rows=73049 width=1119)
                                                                 default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_month_seq"]


[03/14] hive git commit: HIVE-19237: Only use an operatorId once in a plan (Zoltan Haindrich reviewed by Ashutosh Chauhan)

Posted by kg...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query75.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query75.q.out b/ql/src/test/results/clientpositive/perf/tez/query75.q.out
index 2611dce..ffb2a9d 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query75.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query75.q.out
@@ -169,12 +169,12 @@ Stage-0
     limit:-1
     Stage-1
       Reducer 10 vectorized
-      File Output Operator [FS_325]
-        Select Operator [SEL_324] (rows=100 width=111)
+      File Output Operator [FS_363]
+        Select Operator [SEL_362] (rows=100 width=111)
           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
-          Limit [LIM_323] (rows=100 width=111)
+          Limit [LIM_361] (rows=100 width=111)
             Number of rows:100
-            Select Operator [SEL_322] (rows=70276244 width=111)
+            Select Operator [SEL_360] (rows=70276244 width=111)
               Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
             <-Reducer 9 [SIMPLE_EDGE]
               SHUFFLE [RS_175]
@@ -183,38 +183,38 @@ Stage-0
                   Filter Operator [FIL_173] (rows=70276244 width=111)
                     predicate:((CAST( _col10 AS decimal(17,2)) / CAST( _col4 AS decimal(17,2))) < 0.9)
                     Merge Join Operator [MERGEJOIN_282] (rows=210828734 width=111)
-                      Conds:RS_318._col0, _col1, _col2, _col3=RS_321._col0, _col1, _col2, _col3(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col10","_col11"]
+                      Conds:RS_356._col0, _col1, _col2, _col3=RS_359._col0, _col1, _col2, _col3(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col10","_col11"]
                     <-Reducer 17 [SIMPLE_EDGE] vectorized
-                      SHUFFLE [RS_321]
+                      SHUFFLE [RS_359]
                         PartitionCols:_col0, _col1, _col2, _col3
-                        Group By Operator [GBY_320] (rows=191662482 width=111)
+                        Group By Operator [GBY_358] (rows=191662482 width=111)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col4)","sum(_col5)"],keys:_col0, _col1, _col2, _col3
-                          Group By Operator [GBY_319] (rows=383324964 width=111)
+                          Group By Operator [GBY_357] (rows=383324964 width=111)
                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
                           <-Union 16 [SIMPLE_EDGE]
                             <-Reducer 15 [CONTAINS] vectorized
-                              Reduce Output Operator [RS_328]
+                              Reduce Output Operator [RS_366]
                                 PartitionCols:_col0, _col1, _col2, _col3
-                                Group By Operator [GBY_327] (rows=766649929 width=111)
+                                Group By Operator [GBY_365] (rows=766649929 width=111)
                                   Output:["_col0","_col1","_col2","_col3","_col4","_col5"],keys:_col0, _col1, _col2, _col3, _col4, _col5
-                                  Group By Operator [GBY_326] (rows=574982367 width=103)
+                                  Group By Operator [GBY_364] (rows=574982367 width=103)
                                     Output:["_col0","_col1","_col2","_col3","_col4","_col5"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
                                   <-Union 14 [SIMPLE_EDGE]
                                     <-Reducer 13 [CONTAINS]
-                                      Reduce Output Operator [RS_133]
+                                      Reduce Output Operator [RS_296]
                                         PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5
-                                        Group By Operator [GBY_132] (rows=1149964734 width=103)
+                                        Group By Operator [GBY_295] (rows=1149964734 width=103)
                                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"],keys:_col0, _col1, _col2, _col3, _col4, _col5
-                                          Select Operator [SEL_106] (rows=383314495 width=135)
+                                          Select Operator [SEL_293] (rows=383314495 width=135)
                                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                            Merge Join Operator [MERGEJOIN_275] (rows=383314495 width=135)
-                                              Conds:RS_103._col1, _col2=RS_312._col0, _col1(Left Outer),Output:["_col3","_col4","_col8","_col9","_col10","_col12","_col15","_col16"]
+                                            Merge Join Operator [MERGEJOIN_292] (rows=383314495 width=135)
+                                              Conds:RS_103._col1, _col2=RS_350._col0, _col1(Left Outer),Output:["_col3","_col4","_col8","_col9","_col10","_col12","_col15","_col16"]
                                             <-Map 32 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_312]
+                                              SHUFFLE [RS_350]
                                                 PartitionCols:_col0, _col1
-                                                Select Operator [SEL_310] (rows=28798881 width=106)
+                                                Select Operator [SEL_348] (rows=28798881 width=106)
                                                   Output:["_col0","_col1","_col2","_col3"]
-                                                  Filter Operator [FIL_309] (rows=28798881 width=106)
+                                                  Filter Operator [FIL_347] (rows=28798881 width=106)
                                                     predicate:cr_item_sk is not null
                                                     TableScan [TS_9] (rows=28798881 width=106)
                                                       default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:NONE,Output:["cr_item_sk","cr_order_number","cr_return_quantity","cr_return_amount"]
@@ -222,13 +222,13 @@ Stage-0
                                               SHUFFLE [RS_103]
                                                 PartitionCols:_col1, _col2
                                                 Merge Join Operator [MERGEJOIN_274] (rows=348467716 width=135)
-                                                  Conds:RS_100._col1=RS_306._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col8","_col9","_col10","_col12"]
+                                                  Conds:RS_100._col1=RS_344._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col8","_col9","_col10","_col12"]
                                                 <-Map 31 [SIMPLE_EDGE] vectorized
-                                                  SHUFFLE [RS_306]
+                                                  SHUFFLE [RS_344]
                                                     PartitionCols:_col0
-                                                    Select Operator [SEL_302] (rows=231000 width=1436)
+                                                    Select Operator [SEL_340] (rows=231000 width=1436)
                                                       Output:["_col0","_col1","_col2","_col3","_col5"]
-                                                      Filter Operator [FIL_301] (rows=231000 width=1436)
+                                                      Filter Operator [FIL_339] (rows=231000 width=1436)
                                                         predicate:((i_category = 'Sports') and i_brand_id is not null and i_category_id is not null and i_class_id is not null and i_item_sk is not null and i_manufact_id is not null)
                                                         TableScan [TS_6] (rows=462000 width=1436)
                                                           default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
@@ -236,40 +236,40 @@ Stage-0
                                                   SHUFFLE [RS_100]
                                                     PartitionCols:_col1
                                                     Merge Join Operator [MERGEJOIN_273] (rows=316788826 width=135)
-                                                      Conds:RS_286._col0=RS_298._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                                                      Conds:RS_324._col0=RS_336._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
                                                     <-Map 18 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_298]
+                                                      SHUFFLE [RS_336]
                                                         PartitionCols:_col0
-                                                        Select Operator [SEL_292] (rows=36524 width=1119)
+                                                        Select Operator [SEL_330] (rows=36524 width=1119)
                                                           Output:["_col0"]
-                                                          Filter Operator [FIL_288] (rows=36524 width=1119)
+                                                          Filter Operator [FIL_326] (rows=36524 width=1119)
                                                             predicate:((d_year = 2002) and d_date_sk is not null)
                                                             TableScan [TS_3] (rows=73049 width=1119)
                                                               default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
                                                     <-Map 1 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_286]
+                                                      SHUFFLE [RS_324]
                                                         PartitionCols:_col0
-                                                        Select Operator [SEL_284] (rows=287989836 width=135)
+                                                        Select Operator [SEL_322] (rows=287989836 width=135)
                                                           Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                          Filter Operator [FIL_283] (rows=287989836 width=135)
+                                                          Filter Operator [FIL_321] (rows=287989836 width=135)
                                                             predicate:(cs_item_sk is not null and cs_sold_date_sk is not null)
                                                             TableScan [TS_0] (rows=287989836 width=135)
                                                               default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_item_sk","cs_order_number","cs_quantity","cs_ext_sales_price"]
                                     <-Reducer 27 [CONTAINS]
-                                      Reduce Output Operator [RS_133]
+                                      Reduce Output Operator [RS_315]
                                         PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5
-                                        Group By Operator [GBY_132] (rows=1149964734 width=103)
+                                        Group By Operator [GBY_314] (rows=1149964734 width=103)
                                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"],keys:_col0, _col1, _col2, _col3, _col4, _col5
-                                          Select Operator [SEL_128] (rows=766650239 width=88)
+                                          Select Operator [SEL_312] (rows=766650239 width=88)
                                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                            Merge Join Operator [MERGEJOIN_278] (rows=766650239 width=88)
-                                              Conds:RS_125._col1, _col2=RS_336._col0, _col1(Left Outer),Output:["_col3","_col4","_col8","_col9","_col10","_col12","_col15","_col16"]
+                                            Merge Join Operator [MERGEJOIN_311] (rows=766650239 width=88)
+                                              Conds:RS_125._col1, _col2=RS_374._col0, _col1(Left Outer),Output:["_col3","_col4","_col8","_col9","_col10","_col12","_col15","_col16"]
                                             <-Map 34 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_336]
+                                              SHUFFLE [RS_374]
                                                 PartitionCols:_col0, _col1
-                                                Select Operator [SEL_334] (rows=57591150 width=77)
+                                                Select Operator [SEL_372] (rows=57591150 width=77)
                                                   Output:["_col0","_col1","_col2","_col3"]
-                                                  Filter Operator [FIL_333] (rows=57591150 width=77)
+                                                  Filter Operator [FIL_371] (rows=57591150 width=77)
                                                     predicate:sr_item_sk is not null
                                                     TableScan [TS_31] (rows=57591150 width=77)
                                                       default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_item_sk","sr_ticket_number","sr_return_quantity","sr_return_amt"]
@@ -277,48 +277,48 @@ Stage-0
                                               SHUFFLE [RS_125]
                                                 PartitionCols:_col1, _col2
                                                 Merge Join Operator [MERGEJOIN_277] (rows=696954748 width=88)
-                                                  Conds:RS_122._col1=RS_307._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col8","_col9","_col10","_col12"]
+                                                  Conds:RS_122._col1=RS_345._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col8","_col9","_col10","_col12"]
                                                 <-Map 31 [SIMPLE_EDGE] vectorized
-                                                  SHUFFLE [RS_307]
+                                                  SHUFFLE [RS_345]
                                                     PartitionCols:_col0
-                                                     Please refer to the previous Select Operator [SEL_302]
+                                                     Please refer to the previous Select Operator [SEL_340]
                                                 <-Reducer 25 [SIMPLE_EDGE]
                                                   SHUFFLE [RS_122]
                                                     PartitionCols:_col1
                                                     Merge Join Operator [MERGEJOIN_276] (rows=633595212 width=88)
-                                                      Conds:RS_332._col0=RS_299._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                                                      Conds:RS_370._col0=RS_337._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
                                                     <-Map 18 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_299]
+                                                      SHUFFLE [RS_337]
                                                         PartitionCols:_col0
-                                                        Select Operator [SEL_293] (rows=36524 width=1119)
+                                                        Select Operator [SEL_331] (rows=36524 width=1119)
                                                           Output:["_col0"]
-                                                          Filter Operator [FIL_289] (rows=36524 width=1119)
+                                                          Filter Operator [FIL_327] (rows=36524 width=1119)
                                                             predicate:((d_year = 2002) and d_date_sk is not null)
                                                              Please refer to the previous TableScan [TS_3]
                                                     <-Map 33 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_332]
+                                                      SHUFFLE [RS_370]
                                                         PartitionCols:_col0
-                                                        Select Operator [SEL_330] (rows=575995635 width=88)
+                                                        Select Operator [SEL_368] (rows=575995635 width=88)
                                                           Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                          Filter Operator [FIL_329] (rows=575995635 width=88)
+                                                          Filter Operator [FIL_367] (rows=575995635 width=88)
                                                             predicate:(ss_item_sk is not null and ss_sold_date_sk is not null)
                                                             TableScan [TS_22] (rows=575995635 width=88)
                                                               default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_ticket_number","ss_quantity","ss_ext_sales_price"]
                             <-Reducer 30 [CONTAINS]
-                              Reduce Output Operator [RS_162]
+                              Reduce Output Operator [RS_320]
                                 PartitionCols:_col0, _col1, _col2, _col3
-                                Group By Operator [GBY_161] (rows=766649929 width=111)
+                                Group By Operator [GBY_319] (rows=766649929 width=111)
                                   Output:["_col0","_col1","_col2","_col3","_col4","_col5"],keys:_col0, _col1, _col2, _col3, _col4, _col5
-                                  Select Operator [SEL_157] (rows=191667562 width=135)
+                                  Select Operator [SEL_317] (rows=191667562 width=135)
                                     Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                    Merge Join Operator [MERGEJOIN_281] (rows=191667562 width=135)
-                                      Conds:RS_154._col1, _col2=RS_344._col0, _col1(Left Outer),Output:["_col3","_col4","_col8","_col9","_col10","_col12","_col15","_col16"]
+                                    Merge Join Operator [MERGEJOIN_316] (rows=191667562 width=135)
+                                      Conds:RS_154._col1, _col2=RS_382._col0, _col1(Left Outer),Output:["_col3","_col4","_col8","_col9","_col10","_col12","_col15","_col16"]
                                     <-Map 36 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_344]
+                                      SHUFFLE [RS_382]
                                         PartitionCols:_col0, _col1
-                                        Select Operator [SEL_342] (rows=14398467 width=92)
+                                        Select Operator [SEL_380] (rows=14398467 width=92)
                                           Output:["_col0","_col1","_col2","_col3"]
-                                          Filter Operator [FIL_341] (rows=14398467 width=92)
+                                          Filter Operator [FIL_379] (rows=14398467 width=92)
                                             predicate:wr_item_sk is not null
                                             TableScan [TS_60] (rows=14398467 width=92)
                                               default@web_returns,web_returns,Tbl:COMPLETE,Col:NONE,Output:["wr_item_sk","wr_order_number","wr_return_quantity","wr_return_amt"]
@@ -326,156 +326,156 @@ Stage-0
                                       SHUFFLE [RS_154]
                                         PartitionCols:_col1, _col2
                                         Merge Join Operator [MERGEJOIN_280] (rows=174243235 width=135)
-                                          Conds:RS_151._col1=RS_308._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col8","_col9","_col10","_col12"]
+                                          Conds:RS_151._col1=RS_346._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col8","_col9","_col10","_col12"]
                                         <-Map 31 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_308]
+                                          SHUFFLE [RS_346]
                                             PartitionCols:_col0
-                                             Please refer to the previous Select Operator [SEL_302]
+                                             Please refer to the previous Select Operator [SEL_340]
                                         <-Reducer 28 [SIMPLE_EDGE]
                                           SHUFFLE [RS_151]
                                             PartitionCols:_col1
                                             Merge Join Operator [MERGEJOIN_279] (rows=158402938 width=135)
-                                              Conds:RS_340._col0=RS_300._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                                              Conds:RS_378._col0=RS_338._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
                                             <-Map 18 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_300]
+                                              SHUFFLE [RS_338]
                                                 PartitionCols:_col0
-                                                Select Operator [SEL_294] (rows=36524 width=1119)
+                                                Select Operator [SEL_332] (rows=36524 width=1119)
                                                   Output:["_col0"]
-                                                  Filter Operator [FIL_290] (rows=36524 width=1119)
+                                                  Filter Operator [FIL_328] (rows=36524 width=1119)
                                                     predicate:((d_year = 2002) and d_date_sk is not null)
                                                      Please refer to the previous TableScan [TS_3]
                                             <-Map 35 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_340]
+                                              SHUFFLE [RS_378]
                                                 PartitionCols:_col0
-                                                Select Operator [SEL_338] (rows=144002668 width=135)
+                                                Select Operator [SEL_376] (rows=144002668 width=135)
                                                   Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                  Filter Operator [FIL_337] (rows=144002668 width=135)
+                                                  Filter Operator [FIL_375] (rows=144002668 width=135)
                                                     predicate:(ws_item_sk is not null and ws_sold_date_sk is not null)
                                                     TableScan [TS_51] (rows=144002668 width=135)
                                                       default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_order_number","ws_quantity","ws_ext_sales_price"]
                     <-Reducer 8 [SIMPLE_EDGE] vectorized
-                      SHUFFLE [RS_318]
+                      SHUFFLE [RS_356]
                         PartitionCols:_col0, _col1, _col2, _col3
-                        Group By Operator [GBY_317] (rows=191662482 width=111)
+                        Group By Operator [GBY_355] (rows=191662482 width=111)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col4)","sum(_col5)"],keys:_col0, _col1, _col2, _col3
-                          Group By Operator [GBY_316] (rows=383324964 width=111)
+                          Group By Operator [GBY_354] (rows=383324964 width=111)
                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
                           <-Union 7 [SIMPLE_EDGE]
                             <-Reducer 24 [CONTAINS]
-                              Reduce Output Operator [RS_77]
+                              Reduce Output Operator [RS_310]
                                 PartitionCols:_col0, _col1, _col2, _col3
-                                Group By Operator [GBY_76] (rows=766649929 width=111)
+                                Group By Operator [GBY_309] (rows=766649929 width=111)
                                   Output:["_col0","_col1","_col2","_col3","_col4","_col5"],keys:_col0, _col1, _col2, _col3, _col4, _col5
-                                  Select Operator [SEL_72] (rows=191667562 width=135)
+                                  Select Operator [SEL_307] (rows=191667562 width=135)
                                     Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                    Merge Join Operator [MERGEJOIN_272] (rows=191667562 width=135)
-                                      Conds:RS_69._col1, _col2=RS_343._col0, _col1(Left Outer),Output:["_col3","_col4","_col8","_col9","_col10","_col12","_col15","_col16"]
+                                    Merge Join Operator [MERGEJOIN_306] (rows=191667562 width=135)
+                                      Conds:RS_69._col1, _col2=RS_381._col0, _col1(Left Outer),Output:["_col3","_col4","_col8","_col9","_col10","_col12","_col15","_col16"]
                                     <-Map 36 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_343]
+                                      SHUFFLE [RS_381]
                                         PartitionCols:_col0, _col1
-                                         Please refer to the previous Select Operator [SEL_342]
+                                         Please refer to the previous Select Operator [SEL_380]
                                     <-Reducer 23 [SIMPLE_EDGE]
                                       SHUFFLE [RS_69]
                                         PartitionCols:_col1, _col2
                                         Merge Join Operator [MERGEJOIN_271] (rows=174243235 width=135)
-                                          Conds:RS_66._col1=RS_305._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col8","_col9","_col10","_col12"]
+                                          Conds:RS_66._col1=RS_343._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col8","_col9","_col10","_col12"]
                                         <-Map 31 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_305]
+                                          SHUFFLE [RS_343]
                                             PartitionCols:_col0
-                                             Please refer to the previous Select Operator [SEL_302]
+                                             Please refer to the previous Select Operator [SEL_340]
                                         <-Reducer 22 [SIMPLE_EDGE]
                                           SHUFFLE [RS_66]
                                             PartitionCols:_col1
                                             Merge Join Operator [MERGEJOIN_270] (rows=158402938 width=135)
-                                              Conds:RS_339._col0=RS_297._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                                              Conds:RS_377._col0=RS_335._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
                                             <-Map 18 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_297]
+                                              SHUFFLE [RS_335]
                                                 PartitionCols:_col0
-                                                Select Operator [SEL_291] (rows=36524 width=1119)
+                                                Select Operator [SEL_329] (rows=36524 width=1119)
                                                   Output:["_col0"]
-                                                  Filter Operator [FIL_287] (rows=36524 width=1119)
+                                                  Filter Operator [FIL_325] (rows=36524 width=1119)
                                                     predicate:((d_year = 2001) and d_date_sk is not null)
                                                      Please refer to the previous TableScan [TS_3]
                                             <-Map 35 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_339]
+                                              SHUFFLE [RS_377]
                                                 PartitionCols:_col0
-                                                 Please refer to the previous Select Operator [SEL_338]
+                                                 Please refer to the previous Select Operator [SEL_376]
                             <-Reducer 6 [CONTAINS] vectorized
-                              Reduce Output Operator [RS_315]
+                              Reduce Output Operator [RS_353]
                                 PartitionCols:_col0, _col1, _col2, _col3
-                                Group By Operator [GBY_314] (rows=766649929 width=111)
+                                Group By Operator [GBY_352] (rows=766649929 width=111)
                                   Output:["_col0","_col1","_col2","_col3","_col4","_col5"],keys:_col0, _col1, _col2, _col3, _col4, _col5
-                                  Group By Operator [GBY_313] (rows=574982367 width=103)
+                                  Group By Operator [GBY_351] (rows=574982367 width=103)
                                     Output:["_col0","_col1","_col2","_col3","_col4","_col5"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
                                   <-Union 5 [SIMPLE_EDGE]
                                     <-Reducer 21 [CONTAINS]
-                                      Reduce Output Operator [RS_48]
+                                      Reduce Output Operator [RS_305]
                                         PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5
-                                        Group By Operator [GBY_47] (rows=1149964734 width=103)
+                                        Group By Operator [GBY_304] (rows=1149964734 width=103)
                                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"],keys:_col0, _col1, _col2, _col3, _col4, _col5
-                                          Select Operator [SEL_43] (rows=766650239 width=88)
+                                          Select Operator [SEL_302] (rows=766650239 width=88)
                                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                            Merge Join Operator [MERGEJOIN_269] (rows=766650239 width=88)
-                                              Conds:RS_40._col1, _col2=RS_335._col0, _col1(Left Outer),Output:["_col3","_col4","_col8","_col9","_col10","_col12","_col15","_col16"]
+                                            Merge Join Operator [MERGEJOIN_301] (rows=766650239 width=88)
+                                              Conds:RS_40._col1, _col2=RS_373._col0, _col1(Left Outer),Output:["_col3","_col4","_col8","_col9","_col10","_col12","_col15","_col16"]
                                             <-Map 34 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_335]
+                                              SHUFFLE [RS_373]
                                                 PartitionCols:_col0, _col1
-                                                 Please refer to the previous Select Operator [SEL_334]
+                                                 Please refer to the previous Select Operator [SEL_372]
                                             <-Reducer 20 [SIMPLE_EDGE]
                                               SHUFFLE [RS_40]
                                                 PartitionCols:_col1, _col2
                                                 Merge Join Operator [MERGEJOIN_268] (rows=696954748 width=88)
-                                                  Conds:RS_37._col1=RS_304._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col8","_col9","_col10","_col12"]
+                                                  Conds:RS_37._col1=RS_342._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col8","_col9","_col10","_col12"]
                                                 <-Map 31 [SIMPLE_EDGE] vectorized
-                                                  SHUFFLE [RS_304]
+                                                  SHUFFLE [RS_342]
                                                     PartitionCols:_col0
-                                                     Please refer to the previous Select Operator [SEL_302]
+                                                     Please refer to the previous Select Operator [SEL_340]
                                                 <-Reducer 19 [SIMPLE_EDGE]
                                                   SHUFFLE [RS_37]
                                                     PartitionCols:_col1
                                                     Merge Join Operator [MERGEJOIN_267] (rows=633595212 width=88)
-                                                      Conds:RS_331._col0=RS_296._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                                                      Conds:RS_369._col0=RS_334._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
                                                     <-Map 18 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_296]
+                                                      SHUFFLE [RS_334]
                                                         PartitionCols:_col0
-                                                         Please refer to the previous Select Operator [SEL_291]
+                                                         Please refer to the previous Select Operator [SEL_329]
                                                     <-Map 33 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_331]
+                                                      SHUFFLE [RS_369]
                                                         PartitionCols:_col0
-                                                         Please refer to the previous Select Operator [SEL_330]
+                                                         Please refer to the previous Select Operator [SEL_368]
                                     <-Reducer 4 [CONTAINS]
-                                      Reduce Output Operator [RS_48]
+                                      Reduce Output Operator [RS_287]
                                         PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5
-                                        Group By Operator [GBY_47] (rows=1149964734 width=103)
+                                        Group By Operator [GBY_286] (rows=1149964734 width=103)
                                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"],keys:_col0, _col1, _col2, _col3, _col4, _col5
-                                          Select Operator [SEL_21] (rows=383314495 width=135)
+                                          Select Operator [SEL_284] (rows=383314495 width=135)
                                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                            Merge Join Operator [MERGEJOIN_266] (rows=383314495 width=135)
-                                              Conds:RS_18._col1, _col2=RS_311._col0, _col1(Left Outer),Output:["_col3","_col4","_col8","_col9","_col10","_col12","_col15","_col16"]
+                                            Merge Join Operator [MERGEJOIN_283] (rows=383314495 width=135)
+                                              Conds:RS_18._col1, _col2=RS_349._col0, _col1(Left Outer),Output:["_col3","_col4","_col8","_col9","_col10","_col12","_col15","_col16"]
                                             <-Map 32 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_311]
+                                              SHUFFLE [RS_349]
                                                 PartitionCols:_col0, _col1
-                                                 Please refer to the previous Select Operator [SEL_310]
+                                                 Please refer to the previous Select Operator [SEL_348]
                                             <-Reducer 3 [SIMPLE_EDGE]
                                               SHUFFLE [RS_18]
                                                 PartitionCols:_col1, _col2
                                                 Merge Join Operator [MERGEJOIN_265] (rows=348467716 width=135)
-                                                  Conds:RS_15._col1=RS_303._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col8","_col9","_col10","_col12"]
+                                                  Conds:RS_15._col1=RS_341._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col8","_col9","_col10","_col12"]
                                                 <-Map 31 [SIMPLE_EDGE] vectorized
-                                                  SHUFFLE [RS_303]
+                                                  SHUFFLE [RS_341]
                                                     PartitionCols:_col0
-                                                     Please refer to the previous Select Operator [SEL_302]
+                                                     Please refer to the previous Select Operator [SEL_340]
                                                 <-Reducer 2 [SIMPLE_EDGE]
                                                   SHUFFLE [RS_15]
                                                     PartitionCols:_col1
                                                     Merge Join Operator [MERGEJOIN_264] (rows=316788826 width=135)
-                                                      Conds:RS_285._col0=RS_295._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                                                      Conds:RS_323._col0=RS_333._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
                                                     <-Map 18 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_295]
+                                                      SHUFFLE [RS_333]
                                                         PartitionCols:_col0
-                                                         Please refer to the previous Select Operator [SEL_291]
+                                                         Please refer to the previous Select Operator [SEL_329]
                                                     <-Map 1 [SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_285]
+                                                      SHUFFLE [RS_323]
                                                         PartitionCols:_col0
-                                                         Please refer to the previous Select Operator [SEL_284]
+                                                         Please refer to the previous Select Operator [SEL_322]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query76.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query76.q.out b/ql/src/test/results/clientpositive/perf/tez/query76.q.out
index 2f89ba5..fca3bd7 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query76.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query76.q.out
@@ -61,31 +61,31 @@ Stage-0
     limit:100
     Stage-1
       Reducer 6 vectorized
-      File Output Operator [FS_104]
-        Limit [LIM_103] (rows=100 width=108)
+      File Output Operator [FS_119]
+        Limit [LIM_118] (rows=100 width=108)
           Number of rows:100
-          Select Operator [SEL_102] (rows=304916424 width=108)
+          Select Operator [SEL_117] (rows=304916424 width=108)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
           <-Reducer 5 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_101]
-              Group By Operator [GBY_100] (rows=304916424 width=108)
+            SHUFFLE [RS_116]
+              Group By Operator [GBY_115] (rows=304916424 width=108)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["count(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4
               <-Union 4 [SIMPLE_EDGE]
                 <-Reducer 10 [CONTAINS]
-                  Reduce Output Operator [RS_52]
+                  Reduce Output Operator [RS_103]
                     PartitionCols:_col0, _col1, _col2, _col3, _col4
-                    Group By Operator [GBY_51] (rows=609832848 width=108)
+                    Group By Operator [GBY_102] (rows=609832848 width=108)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["count()","sum(_col5)"],keys:_col0, _col1, _col2, _col3, _col4
-                      Select Operator [SEL_48] (rows=174233858 width=135)
+                      Select Operator [SEL_100] (rows=174233858 width=135)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                        Merge Join Operator [MERGEJOIN_88] (rows=174233858 width=135)
-                          Conds:RS_45._col0=RS_116._col0(Inner),Output:["_col3","_col5","_col7","_col8"]
+                        Merge Join Operator [MERGEJOIN_99] (rows=174233858 width=135)
+                          Conds:RS_45._col0=RS_131._col0(Inner),Output:["_col3","_col5","_col7","_col8"]
                         <-Map 16 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_116]
+                          SHUFFLE [RS_131]
                             PartitionCols:_col0
-                            Select Operator [SEL_115] (rows=73049 width=1119)
+                            Select Operator [SEL_130] (rows=73049 width=1119)
                               Output:["_col0","_col1","_col2"]
-                              Filter Operator [FIL_114] (rows=73049 width=1119)
+                              Filter Operator [FIL_129] (rows=73049 width=1119)
                                 predicate:d_date_sk is not null
                                 TableScan [TS_39] (rows=73049 width=1119)
                                   default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"]
@@ -93,40 +93,40 @@ Stage-0
                           SHUFFLE [RS_45]
                             PartitionCols:_col0
                             Merge Join Operator [MERGEJOIN_87] (rows=158394413 width=135)
-                              Conds:RS_113._col2=RS_93._col0(Inner),Output:["_col0","_col3","_col5"]
+                              Conds:RS_128._col2=RS_108._col0(Inner),Output:["_col0","_col3","_col5"]
                             <-Map 1 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_93]
+                              SHUFFLE [RS_108]
                                 PartitionCols:_col0
-                                Select Operator [SEL_90] (rows=462000 width=1436)
+                                Select Operator [SEL_105] (rows=462000 width=1436)
                                   Output:["_col0","_col1"]
-                                  Filter Operator [FIL_89] (rows=462000 width=1436)
+                                  Filter Operator [FIL_104] (rows=462000 width=1436)
                                     predicate:i_item_sk is not null
                                     TableScan [TS_0] (rows=462000 width=1436)
                                       default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_category"]
                             <-Map 15 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_113]
+                              SHUFFLE [RS_128]
                                 PartitionCols:_col2
-                                Select Operator [SEL_112] (rows=143994918 width=135)
+                                Select Operator [SEL_127] (rows=143994918 width=135)
                                   Output:["_col0","_col2","_col3"]
-                                  Filter Operator [FIL_111] (rows=143994918 width=135)
+                                  Filter Operator [FIL_126] (rows=143994918 width=135)
                                     predicate:(cs_item_sk is not null and cs_sold_date_sk is not null and cs_warehouse_sk is null)
                                     TableScan [TS_33] (rows=287989836 width=135)
                                       default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_warehouse_sk","cs_item_sk","cs_ext_sales_price"]
                 <-Reducer 3 [CONTAINS]
-                  Reduce Output Operator [RS_52]
+                  Reduce Output Operator [RS_93]
                     PartitionCols:_col0, _col1, _col2, _col3, _col4
-                    Group By Operator [GBY_51] (rows=609832848 width=108)
+                    Group By Operator [GBY_92] (rows=609832848 width=108)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["count()","sum(_col5)"],keys:_col0, _col1, _col2, _col3, _col4
-                      Select Operator [SEL_15] (rows=348477373 width=88)
+                      Select Operator [SEL_90] (rows=348477373 width=88)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                        Merge Join Operator [MERGEJOIN_84] (rows=348477373 width=88)
-                          Conds:RS_12._col2=RS_99._col0(Inner),Output:["_col1","_col5","_col7","_col8"]
+                        Merge Join Operator [MERGEJOIN_89] (rows=348477373 width=88)
+                          Conds:RS_12._col2=RS_114._col0(Inner),Output:["_col1","_col5","_col7","_col8"]
                         <-Map 12 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_99]
+                          SHUFFLE [RS_114]
                             PartitionCols:_col0
-                            Select Operator [SEL_98] (rows=73049 width=1119)
+                            Select Operator [SEL_113] (rows=73049 width=1119)
                               Output:["_col0","_col1","_col2"]
-                              Filter Operator [FIL_97] (rows=73049 width=1119)
+                              Filter Operator [FIL_112] (rows=73049 width=1119)
                                 predicate:d_date_sk is not null
                                 TableScan [TS_6] (rows=73049 width=1119)
                                   default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"]
@@ -134,35 +134,35 @@ Stage-0
                           SHUFFLE [RS_12]
                             PartitionCols:_col2
                             Merge Join Operator [MERGEJOIN_83] (rows=316797605 width=88)
-                              Conds:RS_91._col0=RS_96._col1(Inner),Output:["_col1","_col2","_col5"]
+                              Conds:RS_106._col0=RS_111._col1(Inner),Output:["_col1","_col2","_col5"]
                             <-Map 1 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_91]
+                              SHUFFLE [RS_106]
                                 PartitionCols:_col0
-                                 Please refer to the previous Select Operator [SEL_90]
+                                 Please refer to the previous Select Operator [SEL_105]
                             <-Map 11 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_96]
+                              SHUFFLE [RS_111]
                                 PartitionCols:_col1
-                                Select Operator [SEL_95] (rows=287997817 width=88)
+                                Select Operator [SEL_110] (rows=287997817 width=88)
                                   Output:["_col0","_col1","_col3"]
-                                  Filter Operator [FIL_94] (rows=287997817 width=88)
+                                  Filter Operator [FIL_109] (rows=287997817 width=88)
                                     predicate:(ss_addr_sk is null and ss_item_sk is not null and ss_sold_date_sk is not null)
                                     TableScan [TS_3] (rows=575995635 width=88)
                                       default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_addr_sk","ss_ext_sales_price"]
                 <-Reducer 8 [CONTAINS]
-                  Reduce Output Operator [RS_52]
+                  Reduce Output Operator [RS_98]
                     PartitionCols:_col0, _col1, _col2, _col3, _col4
-                    Group By Operator [GBY_51] (rows=609832848 width=108)
+                    Group By Operator [GBY_97] (rows=609832848 width=108)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["count()","sum(_col5)"],keys:_col0, _col1, _col2, _col3, _col4
-                      Select Operator [SEL_31] (rows=87121617 width=135)
+                      Select Operator [SEL_95] (rows=87121617 width=135)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                        Merge Join Operator [MERGEJOIN_86] (rows=87121617 width=135)
-                          Conds:RS_28._col0=RS_110._col0(Inner),Output:["_col3","_col5","_col7","_col8"]
+                        Merge Join Operator [MERGEJOIN_94] (rows=87121617 width=135)
+                          Conds:RS_28._col0=RS_125._col0(Inner),Output:["_col3","_col5","_col7","_col8"]
                         <-Map 14 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_110]
+                          SHUFFLE [RS_125]
                             PartitionCols:_col0
-                            Select Operator [SEL_109] (rows=73049 width=1119)
+                            Select Operator [SEL_124] (rows=73049 width=1119)
                               Output:["_col0","_col1","_col2"]
-                              Filter Operator [FIL_108] (rows=73049 width=1119)
+                              Filter Operator [FIL_123] (rows=73049 width=1119)
                                 predicate:d_date_sk is not null
                                 TableScan [TS_22] (rows=73049 width=1119)
                                   default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"]
@@ -170,17 +170,17 @@ Stage-0
                           SHUFFLE [RS_28]
                             PartitionCols:_col0
                             Merge Join Operator [MERGEJOIN_85] (rows=79201469 width=135)
-                              Conds:RS_107._col1=RS_92._col0(Inner),Output:["_col0","_col3","_col5"]
+                              Conds:RS_122._col1=RS_107._col0(Inner),Output:["_col0","_col3","_col5"]
                             <-Map 1 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_92]
+                              SHUFFLE [RS_107]
                                 PartitionCols:_col0
-                                 Please refer to the previous Select Operator [SEL_90]
+                                 Please refer to the previous Select Operator [SEL_105]
                             <-Map 13 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_107]
+                              SHUFFLE [RS_122]
                                 PartitionCols:_col1
-                                Select Operator [SEL_106] (rows=72001334 width=135)
+                                Select Operator [SEL_121] (rows=72001334 width=135)
                                   Output:["_col0","_col1","_col3"]
-                                  Filter Operator [FIL_105] (rows=72001334 width=135)
+                                  Filter Operator [FIL_120] (rows=72001334 width=135)
                                     predicate:(ws_item_sk is not null and ws_sold_date_sk is not null and ws_web_page_sk is null)
                                     TableScan [TS_16] (rows=144002668 width=135)
                                       default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_web_page_sk","ws_ext_sales_price"]

http://git-wip-us.apache.org/repos/asf/hive/blob/2842f88e/ql/src/test/results/clientpositive/perf/tez/query77.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query77.q.out b/ql/src/test/results/clientpositive/perf/tez/query77.q.out
index d0017c2..66f3d08 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query77.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query77.q.out
@@ -1,4 +1,4 @@
-Warning: Shuffle Join MERGEJOIN[188][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 15' is a cross product
+Warning: Shuffle Join MERGEJOIN[195][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 15' is a cross product
 PREHOOK: query: explain
 with ss as
  (select s_store_sk,
@@ -241,30 +241,30 @@ Stage-0
     limit:100
     Stage-1
       Reducer 8 vectorized
-      File Output Operator [FS_217]
-        Limit [LIM_216] (rows=100 width=163)
+      File Output Operator [FS_232]
+        Limit [LIM_231] (rows=100 width=163)
           Number of rows:100
-          Select Operator [SEL_215] (rows=956329968 width=163)
+          Select Operator [SEL_230] (rows=956329968 width=163)
             Output:["_col0","_col1","_col2","_col3","_col4"]
           <-Reducer 7 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_214]
-              Select Operator [SEL_213] (rows=956329968 width=163)
+            SHUFFLE [RS_229]
+              Select Operator [SEL_228] (rows=956329968 width=163)
                 Output:["_col0","_col1","_col2","_col3","_col4"]
-                Group By Operator [GBY_212] (rows=956329968 width=163)
+                Group By Operator [GBY_227] (rows=956329968 width=163)
                   Output:["_col0","_col1","_col3","_col4","_col5"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2
                 <-Union 6 [SIMPLE_EDGE]
                   <-Reducer 15 [CONTAINS]
-                    Reduce Output Operator [RS_124]
+                    Reduce Output Operator [RS_199]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_123] (rows=1912659936 width=163)
+                      Group By Operator [GBY_198] (rows=1912659936 width=163)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Select Operator [SEL_75] (rows=158394413 width=360)
+                        Select Operator [SEL_196] (rows=158394413 width=360)
                           Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Merge Join Operator [MERGEJOIN_188] (rows=158394413 width=360)
+                          Merge Join Operator [MERGEJOIN_195] (rows=158394413 width=360)
                             Conds:(Inner),Output:["_col0","_col1","_col2","_col3","_col4"]
                           <-Reducer 14 [CUSTOM_SIMPLE_EDGE] vectorized
-                            PARTITION_ONLY_SHUFFLE [RS_222]
-                              Group By Operator [GBY_221] (rows=158394413 width=135)
+                            PARTITION_ONLY_SHUFFLE [RS_237]
+                              Group By Operator [GBY_236] (rows=158394413 width=135)
                                 Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
                               <-Reducer 13 [SIMPLE_EDGE]
                                 SHUFFLE [RS_55]
@@ -272,61 +272,61 @@ Stage-0
                                   Group By Operator [GBY_54] (rows=316788826 width=135)
                                     Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","sum(_col3)"],keys:_col1
                                     Merge Join Operator [MERGEJOIN_181] (rows=316788826 width=135)
-                                      Conds:RS_220._col0=RS_197._col0(Inner),Output:["_col1","_col2","_col3"]
+                                      Conds:RS_235._col0=RS_212._col0(Inner),Output:["_col1","_col2","_col3"]
                                     <-Map 9 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_197]
+                                      SHUFFLE [RS_212]
                                         PartitionCols:_col0
-                                        Select Operator [SEL_194] (rows=8116 width=1119)
+                                        Select Operator [SEL_209] (rows=8116 width=1119)
                                           Output:["_col0"]
-                                          Filter Operator [FIL_193] (rows=8116 width=1119)
+                                          Filter Operator [FIL_208] (rows=8116 width=1119)
                                             predicate:(CAST( d_date AS TIMESTAMP) BETWEEN TIMESTAMP'1998-08-04 00:00:00.0' AND TIMESTAMP'1998-09-03 00:00:00.0' and d_date_sk is not null)
                                             TableScan [TS_3] (rows=73049 width=1119)
                                               default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"]
                                     <-Map 27 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_220]
+                                      SHUFFLE [RS_235]
                                         PartitionCols:_col0
-                                        Select Operator [SEL_219] (rows=287989836 width=135)
+                                        Select Operator [SEL_234] (rows=287989836 width=135)
                                           Output:["_col0","_col1","_col2","_col3"]
-                                          Filter Operator [FIL_218] (rows=287989836 width=135)
+                                          Filter Operator [FIL_233] (rows=287989836 width=135)
                                             predicate:cs_sold_date_sk is not null
                                             TableScan [TS_44] (rows=287989836 width=135)
                                               default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_call_center_sk","cs_ext_sales_price","cs_net_profit"]
                           <-Reducer 17 [CUSTOM_SIMPLE_EDGE] vectorized
-                            PARTITION_ONLY_SHUFFLE [RS_227]
-                              Group By Operator [GBY_226] (rows=1 width=224)
+                            PARTITION_ONLY_SHUFFLE [RS_242]
+                              Group By Operator [GBY_241] (rows=1 width=224)
                                 Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
                               <-Reducer 16 [CUSTOM_SIMPLE_EDGE]
                                 PARTITION_ONLY_SHUFFLE [RS_69]
                                   Group By Operator [GBY_68] (rows=1 width=224)
                                     Output:["_col0","_col1"],aggregations:["sum(_col1)","sum(_col2)"]
                                     Merge Join Operator [MERGEJOIN_182] (rows=31678769 width=106)
-                                      Conds:RS_225._col0=RS_198._col0(Inner),Output:["_col1","_col2"]
+                                      Conds:RS_240._col0=RS_213._col0(Inner),Output:["_col1","_col2"]
                                     <-Map 9 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_198]
+                                      SHUFFLE [RS_213]
                                         PartitionCols:_col0
-                                         Please refer to the previous Select Operator [SEL_194]
+                                         Please refer to the previous Select Operator [SEL_209]
                                     <-Map 28 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_225]
+                                      SHUFFLE [RS_240]
                                         PartitionCols:_col0
-                                        Select Operator [SEL_224] (rows=28798881 width=106)
+                                        Select Operator [SEL_239] (rows=28798881 width=106)
                                           Output:["_col0","_col1","_col2"]
-                                          Filter Operator [FIL_223] (rows=28798881 width=106)
+                                          Filter Operator [FIL_238] (rows=28798881 width=106)
                                             predicate:cr_returned_date_sk is not null
                                             TableScan [TS_58] (rows=28798881 width=106)
                                               default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:NONE,Output:["cr_returned_date_sk","cr_return_amount","cr_net_loss"]
                   <-Reducer 21 [CONTAINS]
-                    Reduce Output Operator [RS_124]
+                    Reduce Output Operator [RS_204]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_123] (rows=1912659936 width=163)
+                      Group By Operator [GBY_203] (rows=1912659936 width=163)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Select Operator [SEL_120] (rows=95833780 width=135)
+                        Select Operator [SEL_201] (rows=95833780 width=135)
                           Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Merge Join Operator [MERGEJOIN_189] (rows=95833780 width=135)
-                            Conds:RS_236._col0=RS_241._col0(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5"]
+                          Merge Join Operator [MERGEJOIN_200] (rows=95833780 width=135)
+                            Conds:RS_251._col0=RS_256._col0(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5"]
                           <-Reducer 20 [ONE_TO_ONE_EDGE] vectorized
-                            FORWARD [RS_236]
+                            FORWARD [RS_251]
                               PartitionCols:_col0
-                              Group By Operator [GBY_235] (rows=87121617 width=135)
+                              Group By Operator [GBY_250] (rows=87121617 width=135)
                                 Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
                               <-Reducer 19 [SIMPLE_EDGE]
                                 SHUFFLE [RS_94]
@@ -334,13 +334,13 @@ Stage-0
                                   Group By Operator [GBY_93] (rows=174243235 width=135)
                                     Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","sum(_col3)"],keys:_col6
                                     Merge Join Operator [MERGEJOIN_184] (rows=174243235 width=135)
-                                      Conds:RS_89._col1=RS_233._col0(Inner),Output:["_col2","_col3","_col6"]
+                                      Conds:RS_89._col1=RS_248._col0(Inner),Output:["_col2","_col3","_col6"]
                                     <-Map 30 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_233]
+                                      SHUFFLE [RS_248]
                                         PartitionCols:_col0
-                                        Select Operator [SEL_232] (rows=4602 width=585)
+                                        Select Operator [SEL_247] (rows=4602 width=585)
                                           Output:["_col0"]
-                                          Filter Operator [FIL_231] (rows=4602 width=585)
+                                          Filter Operator [FIL_246] (rows=4602 width=585)
                                             predicate:wp_web_page_sk is not null
                                             TableScan [TS_83] (rows=4602 width=585)
                                               default@web_page,web_page,Tbl:COMPLETE,Col:NONE,Output:["wp_web_page_sk"]
@@ -348,24 +348,24 @@ Stage-0
                                       SHUFFLE [RS_89]
                                         PartitionCols:_col1
                                         Merge Join Operator [MERGEJOIN_183] (rows=158402938 width=135)
-                                          Conds:RS_230._col0=RS_199._col0(Inner),Output:["_col1","_col2","_col3"]
+                                          Conds:RS_245._col0=RS_214._col0(Inner),Output:["_col1","_col2","_col3"]
                                         <-Map 9 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_199]
+                                          SHUFFLE [RS_214]
                                             PartitionCols:_col0
-                                             Please refer to the previous Select Operator [SEL_194]
+                                             Please refer to the previous Select Operator [SEL_209]
                                         <-Map 29 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_230]
+                                          SHUFFLE [RS_245]
                                             PartitionCols:_col0
-                                            Select Operator [SEL_229] (rows=144002668 width=135)
+                                            Select Operator [SEL_244] (rows=144002668 width=135)
                                               Output:["_col0","_col1","_col2","_col3"]
-                                              Filter Operator [FIL_228] (rows=144002668 width=135)
+                                              Filter Operator [FIL_243] (rows=144002668 width=135)
                                                 predicate:(ws_sold_date_sk is not null and ws_web_page_sk is not null)
                                                 TableScan [TS_77] (rows=144002668 width=135)
                                                   default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_web_page_sk","ws_ext_sales_price","ws_net_profit"]
                           <-Reducer 24 [ONE_TO_ONE_EDGE] vectorized
-                            FORWARD [RS_241]
+                            FORWARD [RS_256]
                               PartitionCols:_col0
-                              Group By Operator [GBY_240] (rows=8711072 width=92)
+                              Group By Operator [GBY_255] (rows=8711072 width=92)
                                 Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
                               <-Reducer 23 [SIMPLE_EDGE]
                                 SHUFFLE [RS_114]
@@ -373,42 +373,42 @@ Stage-0
                                   Group By Operator [GBY_113] (rows=17422145 width=92)
                                     Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","sum(_col3)"],keys:_col6
                                     Merge Join Operator [MERGEJOIN_186] (rows=17422145 width=92)
-                                      Conds:RS_109._col1=RS_234._col0(Inner),Output:["_col2","_col3","_col6"]
+                                      Conds:RS_109._col1=RS_249._col0(Inner),Output:["_col2","_col3","_col6"]
                                     <-Map 30 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_234]
+                                      SHUFFLE [RS_249]
                                         PartitionCols:_col0
-                                         Please refer to the previous Select Operator [SEL_232]
+                                         Please refer to the previous Select Operator [SEL_247]
                                     <-Reducer 22 [SIMPLE_EDGE]
                                       SHUFFLE [RS_109]
                                         PartitionCols:_col1
                                         Merge Join Operator [MERGEJOIN_185] (rows=15838314 width=92)
-                                          Conds:RS_239._col0=RS_200._col0(Inner),Output:["_col1","_col2","_col3"]
+                                          Conds:RS_254._col0=RS_215._col0(Inner),Output:["_col1","_col2","_col3"]
                                         <-Map 9 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_200]
+                                          SHUFFLE [RS_215]
                                             PartitionCols:_col0
-                                             Please refer to the previous Select Operator [SEL_194]
+                                             Please refer to the previous Select Operator [SEL_209]
                                         <-Map 31 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_239]
+                                          SHUFFLE [RS_254]
                                             PartitionCols:_col0
-                                            Select Operator [SEL_238] (rows=14398467 width=92)
+                                            Select Operator [SEL_253] (rows=14398467 width=92)
                                               Output:["_col0","_col1","_col2","_col3"]
-                                              Filter Operator [FIL_237] (rows=14398467 width=92)
+                                              Filter Operator [FIL_252] (rows=14398467 width=92)
                                                 predicate:(wr_returned_date_sk is not null and wr_web_page_sk is not null)
                                                 TableScan [TS_97] (rows=14398467 width=92)
                                                   default@web_returns,web_returns,Tbl:COMPLETE,Col:NONE,Output:["wr_returned_date_sk","wr_web_page_sk","wr_return_amt","wr_net_loss"]
                   <-Reducer 5 [CONTAINS]
-                    Reduce Output Operator [RS_124]
+                    Reduce Output Operator [RS_194]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_123] (rows=1912659936 width=163)
+                      Group By Operator [GBY_193] (rows=1912659936 width=163)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Select Operator [SEL_43] (rows=383325119 width=88)
+                        Select Operator [SEL_191] (rows=383325119 width=88)
                           Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Merge Join Operator [MERGEJOIN_187] (rows=383325119 width=88)
-                            Conds:RS_206._col0=RS_211._col0(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5"]
+                          Merge Join Operator [MERGEJOIN_190] (rows=383325119 width=88)
+                            Conds:RS_221._col0=RS_226._col0(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5"]
                           <-Reducer 12 [ONE_TO_ONE_EDGE] vectorized
-                            FORWARD [RS_211]
+                            FORWARD [RS_226]
                               PartitionCols:_col0
-                              Group By Operator [GBY_210] (rows=34842647 width=77)
+                              Group By Operator [GBY_225] (rows=34842647 width=77)
                                 Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
                               <-Reducer 11 [SIMPLE_EDGE]
                                 SHUFFLE [RS_37]
@@ -416,13 +416,13 @@ Stage-0
                                   Group By Operator [GBY_36] (rows=69685294 width=77)
                                     Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","sum(_col3)"],keys:_col6
                                     Merge Join Operator [MERGEJOIN_180] (rows=69685294 width=77)
-                                      Conds:RS_32._col1=RS_204._col0(Inner),Output:["_col2","_col3","_col6"]
+                                      Conds:RS_32._col1=RS_219._col0(Inner),Output:["_col2","_col3","_col6"]
                                     <-Map 25 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_204]
+                                      SHUFFLE [RS_219]
                                         PartitionCols:_col0
-                                        Select Operator [SEL_202] (rows=1704 width=1910)
+                                        Select Operator [SEL_217] (rows=1704 width=1910)
                                           Output:["_col0"]
-                                          Filter Operator [FIL_201] (rows=1704 width=1910)
+                                          Filter Operator [FIL_216] (rows=1704 width=1910)
                                             predicate:s_store_sk is not null
                                             TableScan [TS_6] (rows=1704 width=1910)
                                               default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk"]
@@ -430,24 +430,24 @@ Stage-0
                                       SHUFFLE [RS_32]
                                         PartitionCols:_col1
                                         Merge Join Operator [MERGEJOIN_179] (rows=63350266 width=77)
-                                          Conds:RS_209._col0=RS_196._col0(Inner),Output:["_col1","_col2","_col3"]
+                                          Conds:RS_224._col0=RS_211._col0(Inner),Output:["_col1","_col2","_col3"]
                                         <-Map 9 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_196]
+                                          SHUFFLE [RS_211]
                                             PartitionCols:_col0
-                                             Please refer to the previous Select Operator [SEL_194]
+                                             Please refer to the previous Select Operator [SEL_209]
                                         <-Map 26 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_209]
+                                          SHUFFLE [RS_224]
                                             PartitionCols:_col0
-                                            Select Operator [SEL_208] (rows=57591150 width=77)
+                                            Select Operator [SEL_223] (rows=57591150 width=77)
                                               Output:["_col0","_col1","_col2","_col3"]
-                                              Filter Operator [FIL_207] (rows=57591150 width=77)
+                                              Filter Operator [FIL_222] (rows=57591150 width=77)
                                                 predicate:(sr_returned_date_sk is not null and sr_store_sk is not null)
                                                 TableScan [TS_20] (rows=57591150 width=77)
                                                   default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_returned_date_sk","sr_store_sk","sr_return_amt","sr_net_loss"]
                           <-Reducer 4 [ONE_TO_ONE_EDGE] vectorized
-                            FORWARD [RS_206]
+                            FORWARD [RS_221]
                               PartitionCols:_col0
-                              Group By Operator [GBY_205] (rows=348477374 width=88)
+                              Group By Operator [GBY_220] (rows=348477374 width=88)
                                 Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
                               <-Reducer 3 [SIMPLE_EDGE]
                                 SHUFFLE [RS_17]
@@ -455,26 +455,26 @@ Stage-0
                                   Group By Operator [GBY_16] (rows=696954748 width=88)
                                     Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","sum(_col3)"],keys:_col6
                                     Merge Join Operator [MERGEJOIN_178] (rows=696954748 width=88)
-                                      Conds:RS_12._col1=RS_203._col0(Inner),Output:["_col2","_col3","_col6"]
+                                      Conds:RS_12._col1=RS_218._col0(Inner),Output:["_col2","_col3","_col6"]
                                     <-Map 25 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_203]
+                                      SHUFFLE [RS_218]
                                         PartitionCols:_col0
-                                         Please refer to the previous Select Operator [SEL_202]
+                                         Please refer to the previous Select Operator [SEL_217]
                                     <-Reducer 2 [SIMPLE_EDGE]
                                       SHUFFLE [RS_12]
                                         PartitionCols:_col1
                                         Merge Join Operator [MERGEJOIN_177] (rows=633595212 width=88)
-                                          Conds:RS_192._col0=RS_195._col0(Inner),Output:["_col1","_col2","_col3"]
+                                          Conds:RS_207._col0=RS_210._col0(Inner),Output:["_col1","_col2","_col3"]
                                         <-Map 9 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_195]
+                                          SHUFFLE [RS_210]
                                             PartitionCols:_col0
-                                             Please refer to the previous Select Operator [SEL_194]
+                                             Please refer to the previous Select Operator [SEL_209]
                                         <-Map 1 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_192]
+                                          SHUFFLE [RS_207]
                                             PartitionCols:_col0
-                                            Select Operator [SEL_191] (rows=575995635 width=88)
+                                            Select Operator [SEL_206] (rows=575995635 width=88)
                                               Output:["_col0","_col1","_col2","_col3"]
-                                              Filter Operator [FIL_190] (rows=575995635 width=88)
+                                              Filter Operator [FIL_205] (rows=575995635 width=88)
                                                 predicate:(ss_sold_date_sk is not null and ss_store_sk is not null)
                                                 TableScan [TS_0] (rows=575995635 width=88)
                                                   default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_store_sk","ss_ext_sales_price","ss_net_profit"]