http://git-wip-us.apache.org/repos/asf/hive/blob/6f44fc81/ql/src/test/results/clientpositive/perf/query21.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query21.q.out 
b/ql/src/test/results/clientpositive/perf/query21.q.out
index f4d9575..2634d3d 100644
--- a/ql/src/test/results/clientpositive/perf/query21.q.out
+++ b/ql/src/test/results/clientpositive/perf/query21.q.out
@@ -66,52 +66,52 @@ Stage-0
       limit:100
       Stage-1
          Reducer 6
-         File Output Operator [FS_37]
+         File Output Operator [FS_31]
             compressed:false
             Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE 
Column stats: NONE
             table:{"input 
format:":"org.apache.hadoop.mapred.TextInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
-            Limit [LIM_36]
+            Limit [LIM_30]
                Number of rows:100
                Statistics:Num rows: 100 Data size: 143600 Basic stats: 
COMPLETE Column stats: NONE
-               Select Operator [SEL_35]
+               Select Operator [SEL_29]
                |  outputColumnNames:["_col0","_col1","_col2","_col3"]
                |  Statistics:Num rows: 69877 Data size: 100362804 Basic stats: 
COMPLETE Column stats: NONE
                |<-Reducer 5 [SIMPLE_EDGE]
-                  Reduce Output Operator [RS_34]
+                  Reduce Output Operator [RS_28]
                      key expressions:_col0 (type: string), _col1 (type: string)
                      sort order:++
                      Statistics:Num rows: 69877 Data size: 100362804 Basic 
stats: COMPLETE Column stats: NONE
                      value expressions:_col2 (type: bigint), _col3 (type: 
bigint)
-                     Filter Operator [FIL_47]
+                     Filter Operator [FIL_26]
                         predicate:CASE WHEN ((_col2 > 0)) THEN 
((UDFToDouble(_col3) / UDFToDouble(_col2))) ELSE (null) END BETWEEN 
0.6666666666666666 AND 1.5 (type: boolean)
                         Statistics:Num rows: 69877 Data size: 100362804 Basic 
stats: COMPLETE Column stats: NONE
-                        Group By Operator [GBY_31]
+                        Group By Operator [GBY_25]
                         |  aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
                         |  keys:KEY._col0 (type: string), KEY._col1 (type: 
string)
                         |  outputColumnNames:["_col0","_col1","_col2","_col3"]
                         |  Statistics:Num rows: 139755 Data size: 200727046 
Basic stats: COMPLETE Column stats: NONE
                         |<-Reducer 4 [SIMPLE_EDGE]
-                           Reduce Output Operator [RS_30]
+                           Reduce Output Operator [RS_24]
                               key expressions:_col0 (type: string), _col1 
(type: string)
                               Map-reduce partition columns:_col0 (type: 
string), _col1 (type: string)
                               sort order:++
                               Statistics:Num rows: 279510 Data size: 401454092 
Basic stats: COMPLETE Column stats: NONE
                               value expressions:_col2 (type: bigint), _col3 
(type: bigint)
-                              Group By Operator [GBY_29]
+                              Group By Operator [GBY_23]
                                  aggregations:["sum(_col2)","sum(_col3)"]
                                  keys:_col0 (type: string), _col1 (type: 
string)
                                  
outputColumnNames:["_col0","_col1","_col2","_col3"]
                                  Statistics:Num rows: 279510 Data size: 
401454092 Basic stats: COMPLETE Column stats: NONE
-                                 Select Operator [SEL_27]
+                                 Select Operator [SEL_21]
                                     
outputColumnNames:["_col0","_col1","_col2","_col3"]
                                     Statistics:Num rows: 279510 Data size: 
401454092 Basic stats: COMPLETE Column stats: NONE
-                                    Merge Join Operator [MERGEJOIN_54]
+                                    Merge Join Operator [MERGEJOIN_47]
                                     |  condition map:[{"":"Inner Join 0 to 1"}]
                                     |  keys:{"0":"_col0 (type: 
int)","1":"_col0 (type: int)"}
                                     |  
outputColumnNames:["_col3","_col5","_col7","_col10"]
                                     |  Statistics:Num rows: 279510 Data size: 
401454092 Basic stats: COMPLETE Column stats: NONE
                                     |<-Map 9 [SIMPLE_EDGE]
-                                    |  Reduce Output Operator [RS_25]
+                                    |  Reduce Output Operator [RS_19]
                                     |     key expressions:_col0 (type: int)
                                     |     Map-reduce partition columns:_col0 
(type: int)
                                     |     sort order:+
@@ -120,26 +120,26 @@ Stage-0
                                     |     Select Operator [SEL_11]
                                     |        
outputColumnNames:["_col0","_col1"]
                                     |        Statistics:Num rows: 36524 Data 
size: 40870356 Basic stats: COMPLETE Column stats: NONE
-                                    |        Filter Operator [FIL_51]
+                                    |        Filter Operator [FIL_44]
                                     |           predicate:(d_date BETWEEN 
'1998-03-09' AND '1998-05-07' and d_date_sk is not null) (type: boolean)
                                     |           Statistics:Num rows: 36524 
Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
                                     |           TableScan [TS_9]
                                     |              alias:date_dim
                                     |              Statistics:Num rows: 73049 
Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
                                     |<-Reducer 3 [SIMPLE_EDGE]
-                                       Reduce Output Operator [RS_23]
+                                       Reduce Output Operator [RS_18]
                                           key expressions:_col0 (type: int)
                                           Map-reduce partition columns:_col0 
(type: int)
                                           sort order:+
                                           Statistics:Num rows: 254100 Data 
size: 364958258 Basic stats: COMPLETE Column stats: NONE
                                           value expressions:_col3 (type: int), 
_col5 (type: string), _col7 (type: string)
-                                          Merge Join Operator [MERGEJOIN_53]
+                                          Merge Join Operator [MERGEJOIN_46]
                                           |  condition map:[{"":"Inner Join 0 
to 1"}]
                                           |  keys:{"0":"_col1 (type: 
int)","1":"_col0 (type: int)"}
                                           |  
outputColumnNames:["_col0","_col3","_col5","_col7"]
                                           |  Statistics:Num rows: 254100 Data 
size: 364958258 Basic stats: COMPLETE Column stats: NONE
                                           |<-Map 8 [SIMPLE_EDGE]
-                                          |  Reduce Output Operator [RS_20]
+                                          |  Reduce Output Operator [RS_16]
                                           |     key expressions:_col0 (type: 
int)
                                           |     Map-reduce partition 
columns:_col0 (type: int)
                                           |     sort order:+
@@ -148,26 +148,26 @@ Stage-0
                                           |     Select Operator [SEL_8]
                                           |        
outputColumnNames:["_col0","_col1"]
                                           |        Statistics:Num rows: 231000 
Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
-                                          |        Filter Operator [FIL_50]
+                                          |        Filter Operator [FIL_43]
                                           |           
predicate:(i_current_price BETWEEN 0.99 AND 1.49 and i_item_sk is not null) 
(type: boolean)
                                           |           Statistics:Num rows: 
231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
                                           |           TableScan [TS_6]
                                           |              alias:item
                                           |              Statistics:Num rows: 
462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
                                           |<-Reducer 2 [SIMPLE_EDGE]
-                                             Reduce Output Operator [RS_18]
+                                             Reduce Output Operator [RS_15]
                                                 key expressions:_col1 (type: 
int)
                                                 Map-reduce partition 
columns:_col1 (type: int)
                                                 sort order:+
                                                 Statistics:Num rows: 29 Data 
size: 30582 Basic stats: COMPLETE Column stats: NONE
                                                 value expressions:_col0 (type: 
int), _col3 (type: int), _col5 (type: string)
-                                                Merge Join Operator 
[MERGEJOIN_52]
+                                                Merge Join Operator 
[MERGEJOIN_45]
                                                 |  condition map:[{"":"Inner 
Join 0 to 1"}]
                                                 |  keys:{"0":"_col2 (type: 
int)","1":"_col0 (type: int)"}
                                                 |  
outputColumnNames:["_col0","_col1","_col3","_col5"]
                                                 |  Statistics:Num rows: 29 
Data size: 30582 Basic stats: COMPLETE Column stats: NONE
                                                 |<-Map 1 [SIMPLE_EDGE]
-                                                |  Reduce Output Operator 
[RS_13]
+                                                |  Reduce Output Operator 
[RS_12]
                                                 |     key expressions:_col2 
(type: int)
                                                 |     Map-reduce partition 
columns:_col2 (type: int)
                                                 |     sort order:+
@@ -176,14 +176,14 @@ Stage-0
                                                 |     Select Operator [SEL_2]
                                                 |        
outputColumnNames:["_col0","_col1","_col2","_col3"]
                                                 |        Statistics:Num rows: 
1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                |        Filter Operator 
[FIL_48]
+                                                |        Filter Operator 
[FIL_41]
                                                 |           
predicate:((inv_warehouse_sk is not null and inv_item_sk is not null) and 
inv_date_sk is not null) (type: boolean)
                                                 |           Statistics:Num 
rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                 |           TableScan [TS_0]
                                                 |              alias:inventory
                                                 |              Statistics:Num 
rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                 |<-Map 7 [SIMPLE_EDGE]
-                                                   Reduce Output Operator 
[RS_15]
+                                                   Reduce Output Operator 
[RS_13]
                                                       key expressions:_col0 
(type: int)
                                                       Map-reduce partition 
columns:_col0 (type: int)
                                                       sort order:+
@@ -192,7 +192,7 @@ Stage-0
                                                       Select Operator [SEL_5]
                                                          
outputColumnNames:["_col0","_col1"]
                                                          Statistics:Num rows: 
27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
-                                                         Filter Operator 
[FIL_49]
+                                                         Filter Operator 
[FIL_42]
                                                             
predicate:w_warehouse_sk is not null (type: boolean)
                                                             Statistics:Num 
rows: 27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
                                                             TableScan [TS_3]

http://git-wip-us.apache.org/repos/asf/hive/blob/6f44fc81/ql/src/test/results/clientpositive/perf/query22.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query22.q.out 
b/ql/src/test/results/clientpositive/perf/query22.q.out
index 9df8b68..72935ed 100644
--- a/ql/src/test/results/clientpositive/perf/query22.q.out
+++ b/ql/src/test/results/clientpositive/perf/query22.q.out
@@ -16,51 +16,51 @@ Stage-0
       limit:100
       Stage-1
          Reducer 6
-         File Output Operator [FS_36]
+         File Output Operator [FS_30]
             compressed:false
             Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE 
Column stats: NONE
             table:{"input 
format:":"org.apache.hadoop.mapred.TextInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
-            Limit [LIM_35]
+            Limit [LIM_29]
                Number of rows:100
                Statistics:Num rows: 100 Data size: 143600 Basic stats: 
COMPLETE Column stats: NONE
-               Select Operator [SEL_34]
+               Select Operator [SEL_28]
                |  outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
                |  Statistics:Num rows: 1397550 Data size: 2007270467 Basic 
stats: COMPLETE Column stats: NONE
                |<-Reducer 5 [SIMPLE_EDGE]
-                  Reduce Output Operator [RS_33]
+                  Reduce Output Operator [RS_27]
                      key expressions:_col4 (type: double), _col0 (type: 
string), _col1 (type: string), _col2 (type: string), _col3 (type: string)
                      sort order:+++++
                      Statistics:Num rows: 1397550 Data size: 2007270467 Basic 
stats: COMPLETE Column stats: NONE
-                     Select Operator [SEL_31]
+                     Select Operator [SEL_25]
                         
outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
                         Statistics:Num rows: 1397550 Data size: 2007270467 
Basic stats: COMPLETE Column stats: NONE
-                        Group By Operator [GBY_30]
+                        Group By Operator [GBY_24]
                         |  aggregations:["avg(VALUE._col0)"]
                         |  keys:KEY._col0 (type: string), KEY._col1 (type: 
string), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: 
string)
                         |  
outputColumnNames:["_col0","_col1","_col2","_col3","_col5"]
                         |  Statistics:Num rows: 1397550 Data size: 2007270467 
Basic stats: COMPLETE Column stats: NONE
                         |<-Reducer 4 [SIMPLE_EDGE]
-                           Reduce Output Operator [RS_29]
+                           Reduce Output Operator [RS_23]
                               key expressions:_col0 (type: string), _col1 
(type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
                               Map-reduce partition columns:_col0 (type: 
string), _col1 (type: string), _col2 (type: string), _col3 (type: string), 
_col4 (type: string)
                               sort order:+++++
                               Statistics:Num rows: 2795100 Data size: 
4014540935 Basic stats: COMPLETE Column stats: NONE
                               value expressions:_col5 (type: 
struct<count:bigint,sum:double,input:int>)
-                              Group By Operator [GBY_28]
+                              Group By Operator [GBY_22]
                                  aggregations:["avg(_col3)"]
                                  keys:_col7 (type: string), _col8 (type: 
string), _col9 (type: string), _col10 (type: string), '0' (type: string)
                                  
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
                                  Statistics:Num rows: 2795100 Data size: 
4014540935 Basic stats: COMPLETE Column stats: NONE
-                                 Select Operator [SEL_27]
+                                 Select Operator [SEL_21]
                                     
outputColumnNames:["_col7","_col8","_col9","_col10","_col3"]
                                     Statistics:Num rows: 559020 Data size: 
802908187 Basic stats: COMPLETE Column stats: NONE
-                                    Merge Join Operator [MERGEJOIN_52]
+                                    Merge Join Operator [MERGEJOIN_46]
                                     |  condition map:[{"":"Inner Join 0 to 1"}]
                                     |  keys:{"0":"_col2 (type: 
int)","1":"_col0 (type: int)"}
                                     |  
outputColumnNames:["_col3","_col7","_col8","_col9","_col10"]
                                     |  Statistics:Num rows: 559020 Data size: 
802908187 Basic stats: COMPLETE Column stats: NONE
                                     |<-Map 9 [SIMPLE_EDGE]
-                                    |  Reduce Output Operator [RS_25]
+                                    |  Reduce Output Operator [RS_19]
                                     |     key expressions:_col0 (type: int)
                                     |     Map-reduce partition columns:_col0 
(type: int)
                                     |     sort order:+
@@ -68,26 +68,26 @@ Stage-0
                                     |     Select Operator [SEL_11]
                                     |        outputColumnNames:["_col0"]
                                     |        Statistics:Num rows: 27 Data 
size: 27802 Basic stats: COMPLETE Column stats: NONE
-                                    |        Filter Operator [FIL_49]
+                                    |        Filter Operator [FIL_43]
                                     |           predicate:w_warehouse_sk is 
not null (type: boolean)
                                     |           Statistics:Num rows: 27 Data 
size: 27802 Basic stats: COMPLETE Column stats: NONE
                                     |           TableScan [TS_9]
                                     |              alias:warehouse
                                     |              Statistics:Num rows: 27 
Data size: 27802 Basic stats: COMPLETE Column stats: NONE
                                     |<-Reducer 3 [SIMPLE_EDGE]
-                                       Reduce Output Operator [RS_23]
+                                       Reduce Output Operator [RS_18]
                                           key expressions:_col2 (type: int)
                                           Map-reduce partition columns:_col2 
(type: int)
                                           sort order:+
                                           Statistics:Num rows: 508200 Data 
size: 729916518 Basic stats: COMPLETE Column stats: NONE
                                           value expressions:_col3 (type: int), 
_col7 (type: string), _col8 (type: string), _col9 (type: string), _col10 (type: 
string)
-                                          Merge Join Operator [MERGEJOIN_51]
+                                          Merge Join Operator [MERGEJOIN_45]
                                           |  condition map:[{"":"Inner Join 0 
to 1"}]
                                           |  keys:{"0":"_col1 (type: 
int)","1":"_col0 (type: int)"}
                                           |  
outputColumnNames:["_col2","_col3","_col7","_col8","_col9","_col10"]
                                           |  Statistics:Num rows: 508200 Data 
size: 729916518 Basic stats: COMPLETE Column stats: NONE
                                           |<-Map 8 [SIMPLE_EDGE]
-                                          |  Reduce Output Operator [RS_20]
+                                          |  Reduce Output Operator [RS_16]
                                           |     key expressions:_col0 (type: 
int)
                                           |     Map-reduce partition 
columns:_col0 (type: int)
                                           |     sort order:+
@@ -96,26 +96,26 @@ Stage-0
                                           |     Select Operator [SEL_8]
                                           |        
outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
                                           |        Statistics:Num rows: 462000 
Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
-                                          |        Filter Operator [FIL_48]
+                                          |        Filter Operator [FIL_42]
                                           |           predicate:i_item_sk is 
not null (type: boolean)
                                           |           Statistics:Num rows: 
462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
                                           |           TableScan [TS_6]
                                           |              alias:item
                                           |              Statistics:Num rows: 
462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
                                           |<-Reducer 2 [SIMPLE_EDGE]
-                                             Reduce Output Operator [RS_18]
+                                             Reduce Output Operator [RS_15]
                                                 key expressions:_col1 (type: 
int)
                                                 Map-reduce partition 
columns:_col1 (type: int)
                                                 sort order:+
                                                 Statistics:Num rows: 40176 
Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
                                                 value expressions:_col2 (type: 
int), _col3 (type: int)
-                                                Merge Join Operator 
[MERGEJOIN_50]
+                                                Merge Join Operator 
[MERGEJOIN_44]
                                                 |  condition map:[{"":"Inner 
Join 0 to 1"}]
                                                 |  keys:{"0":"_col0 (type: 
int)","1":"_col0 (type: int)"}
                                                 |  
outputColumnNames:["_col1","_col2","_col3"]
                                                 |  Statistics:Num rows: 40176 
Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
                                                 |<-Map 1 [SIMPLE_EDGE]
-                                                |  Reduce Output Operator 
[RS_13]
+                                                |  Reduce Output Operator 
[RS_12]
                                                 |     key expressions:_col0 
(type: int)
                                                 |     Map-reduce partition 
columns:_col0 (type: int)
                                                 |     sort order:+
@@ -124,14 +124,14 @@ Stage-0
                                                 |     Select Operator [SEL_2]
                                                 |        
outputColumnNames:["_col0","_col1","_col2","_col3"]
                                                 |        Statistics:Num rows: 
1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                |        Filter Operator 
[FIL_46]
+                                                |        Filter Operator 
[FIL_40]
                                                 |           
predicate:((inv_date_sk is not null and inv_item_sk is not null) and 
inv_warehouse_sk is not null) (type: boolean)
                                                 |           Statistics:Num 
rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                 |           TableScan [TS_0]
                                                 |              alias:inventory
                                                 |              Statistics:Num 
rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                 |<-Map 7 [SIMPLE_EDGE]
-                                                   Reduce Output Operator 
[RS_15]
+                                                   Reduce Output Operator 
[RS_13]
                                                       key expressions:_col0 
(type: int)
                                                       Map-reduce partition 
columns:_col0 (type: int)
                                                       sort order:+
@@ -139,7 +139,7 @@ Stage-0
                                                       Select Operator [SEL_5]
                                                          
outputColumnNames:["_col0"]
                                                          Statistics:Num rows: 
36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
-                                                         Filter Operator 
[FIL_47]
+                                                         Filter Operator 
[FIL_41]
                                                             
predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) (type: 
boolean)
                                                             Statistics:Num 
rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
                                                             TableScan [TS_3]

http://git-wip-us.apache.org/repos/asf/hive/blob/6f44fc81/ql/src/test/results/clientpositive/perf/query25.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query25.q.out 
b/ql/src/test/results/clientpositive/perf/query25.q.out
index 4705659..dabc1c5 100644
--- a/ql/src/test/results/clientpositive/perf/query25.q.out
+++ b/ql/src/test/results/clientpositive/perf/query25.q.out
@@ -20,52 +20,52 @@ Stage-0
       limit:100
       Stage-1
          Reducer 10
-         File Output Operator [FS_67]
+         File Output Operator [FS_53]
             compressed:false
             Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE 
Column stats: NONE
             table:{"input 
format:":"org.apache.hadoop.mapred.TextInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
-            Limit [LIM_66]
+            Limit [LIM_52]
                Number of rows:100
                Statistics:Num rows: 100 Data size: 143600 Basic stats: 
COMPLETE Column stats: NONE
-               Select Operator [SEL_65]
+               Select Operator [SEL_51]
                |  
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                |  Statistics:Num rows: 254100 Data size: 364958259 Basic 
stats: COMPLETE Column stats: NONE
                |<-Reducer 9 [SIMPLE_EDGE]
-                  Reduce Output Operator [RS_64]
+                  Reduce Output Operator [RS_50]
                      key expressions:_col0 (type: string), _col1 (type: 
string), _col2 (type: string), _col3 (type: string)
                      sort order:++++
                      Statistics:Num rows: 254100 Data size: 364958259 Basic 
stats: COMPLETE Column stats: NONE
                      value expressions:_col4 (type: decimal(17,2)), _col5 
(type: decimal(17,2)), _col6 (type: decimal(17,2))
-                     Select Operator [SEL_63]
+                     Select Operator [SEL_49]
                         
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                         Statistics:Num rows: 254100 Data size: 364958259 Basic 
stats: COMPLETE Column stats: NONE
-                        Group By Operator [GBY_62]
+                        Group By Operator [GBY_48]
                         |  
aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"]
                         |  keys:KEY._col0 (type: string), KEY._col1 (type: 
string), KEY._col2 (type: string), KEY._col3 (type: string)
                         |  
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                         |  Statistics:Num rows: 254100 Data size: 364958259 
Basic stats: COMPLETE Column stats: NONE
                         |<-Reducer 8 [SIMPLE_EDGE]
-                           Reduce Output Operator [RS_61]
+                           Reduce Output Operator [RS_47]
                               key expressions:_col0 (type: string), _col1 
(type: string), _col2 (type: string), _col3 (type: string)
                               Map-reduce partition columns:_col0 (type: 
string), _col1 (type: string), _col2 (type: string), _col3 (type: string)
                               sort order:++++
                               Statistics:Num rows: 508200 Data size: 729916518 
Basic stats: COMPLETE Column stats: NONE
                               value expressions:_col4 (type: decimal(17,2)), 
_col5 (type: decimal(17,2)), _col6 (type: decimal(17,2))
-                              Group By Operator [GBY_60]
+                              Group By Operator [GBY_46]
                                  
aggregations:["sum(_col5)","sum(_col10)","sum(_col14)"]
                                  keys:_col25 (type: string), _col26 (type: 
string), _col28 (type: string), _col29 (type: string)
                                  
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                                  Statistics:Num rows: 508200 Data size: 
729916518 Basic stats: COMPLETE Column stats: NONE
-                                 Select Operator [SEL_59]
+                                 Select Operator [SEL_45]
                                     
outputColumnNames:["_col25","_col26","_col28","_col29","_col5","_col10","_col14"]
                                     Statistics:Num rows: 508200 Data size: 
729916518 Basic stats: COMPLETE Column stats: NONE
-                                    Merge Join Operator [MERGEJOIN_117]
+                                    Merge Join Operator [MERGEJOIN_103]
                                     |  condition map:[{"":"Inner Join 0 to 1"}]
                                     |  keys:{"0":"_col1 (type: 
int)","1":"_col0 (type: int)"}
                                     |  
outputColumnNames:["_col5","_col10","_col14","_col25","_col26","_col28","_col29"]
                                     |  Statistics:Num rows: 508200 Data size: 
729916518 Basic stats: COMPLETE Column stats: NONE
                                     |<-Map 17 [SIMPLE_EDGE]
-                                    |  Reduce Output Operator [RS_57]
+                                    |  Reduce Output Operator [RS_43]
                                     |     key expressions:_col0 (type: int)
                                     |     Map-reduce partition columns:_col0 
(type: int)
                                     |     sort order:+
@@ -74,26 +74,26 @@ Stage-0
                                     |     Select Operator [SEL_23]
                                     |        
outputColumnNames:["_col0","_col1","_col2"]
                                     |        Statistics:Num rows: 462000 Data 
size: 663560457 Basic stats: COMPLETE Column stats: NONE
-                                    |        Filter Operator [FIL_110]
+                                    |        Filter Operator [FIL_96]
                                     |           predicate:i_item_sk is not 
null (type: boolean)
                                     |           Statistics:Num rows: 462000 
Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
                                     |           TableScan [TS_21]
                                     |              alias:item
                                     |              Statistics:Num rows: 462000 
Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
                                     |<-Reducer 7 [SIMPLE_EDGE]
-                                       Reduce Output Operator [RS_55]
+                                       Reduce Output Operator [RS_42]
                                           key expressions:_col1 (type: int)
                                           Map-reduce partition columns:_col1 
(type: int)
                                           sort order:+
                                           Statistics:Num rows: 26735 Data 
size: 29919145 Basic stats: COMPLETE Column stats: NONE
                                           value expressions:_col5 (type: 
decimal(7,2)), _col10 (type: decimal(7,2)), _col14 (type: decimal(7,2)), _col25 
(type: string), _col26 (type: string)
-                                          Merge Join Operator [MERGEJOIN_116]
+                                          Merge Join Operator [MERGEJOIN_102]
                                           |  condition map:[{"":"Inner Join 0 
to 1"}]
                                           |  keys:{"0":"_col3 (type: 
int)","1":"_col0 (type: int)"}
                                           |  
outputColumnNames:["_col1","_col5","_col10","_col14","_col25","_col26"]
                                           |  Statistics:Num rows: 26735 Data 
size: 29919145 Basic stats: COMPLETE Column stats: NONE
                                           |<-Map 16 [SIMPLE_EDGE]
-                                          |  Reduce Output Operator [RS_52]
+                                          |  Reduce Output Operator [RS_40]
                                           |     key expressions:_col0 (type: 
int)
                                           |     Map-reduce partition 
columns:_col0 (type: int)
                                           |     sort order:+
@@ -102,26 +102,26 @@ Stage-0
                                           |     Select Operator [SEL_20]
                                           |        
outputColumnNames:["_col0","_col1","_col2"]
                                           |        Statistics:Num rows: 1704 
Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
-                                          |        Filter Operator [FIL_109]
+                                          |        Filter Operator [FIL_95]
                                           |           predicate:s_store_sk is 
not null (type: boolean)
                                           |           Statistics:Num rows: 
1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
                                           |           TableScan [TS_18]
                                           |              alias:store
                                           |              Statistics:Num rows: 
1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
                                           |<-Reducer 6 [SIMPLE_EDGE]
-                                             Reduce Output Operator [RS_50]
+                                             Reduce Output Operator [RS_39]
                                                 key expressions:_col3 (type: 
int)
                                                 Map-reduce partition 
columns:_col3 (type: int)
                                                 sort order:+
                                                 Statistics:Num rows: 24305 
Data size: 27199223 Basic stats: COMPLETE Column stats: NONE
                                                 value expressions:_col1 (type: 
int), _col5 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col14 (type: 
decimal(7,2))
-                                                Merge Join Operator 
[MERGEJOIN_115]
+                                                Merge Join Operator 
[MERGEJOIN_101]
                                                 |  condition map:[{"":"Inner 
Join 0 to 1"}]
                                                 |  keys:{"0":"_col11 (type: 
int)","1":"_col0 (type: int)"}
                                                 |  
outputColumnNames:["_col1","_col3","_col5","_col10","_col14"]
                                                 |  Statistics:Num rows: 24305 
Data size: 27199223 Basic stats: COMPLETE Column stats: NONE
                                                 |<-Map 15 [SIMPLE_EDGE]
-                                                |  Reduce Output Operator 
[RS_47]
+                                                |  Reduce Output Operator 
[RS_37]
                                                 |     key expressions:_col0 
(type: int)
                                                 |     Map-reduce partition 
columns:_col0 (type: int)
                                                 |     sort order:+
@@ -129,26 +129,26 @@ Stage-0
                                                 |     Select Operator [SEL_17]
                                                 |        
outputColumnNames:["_col0"]
                                                 |        Statistics:Num rows: 
18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
-                                                |        Filter Operator 
[FIL_108]
+                                                |        Filter Operator 
[FIL_94]
                                                 |           
predicate:(((d_year = 1998) and d_moy BETWEEN 4 AND 10) and d_date_sk is not 
null) (type: boolean)
                                                 |           Statistics:Num 
rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
                                                 |           TableScan [TS_15]
                                                 |              alias:d1
                                                 |              Statistics:Num 
rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
                                                 |<-Reducer 5 [SIMPLE_EDGE]
-                                                   Reduce Output Operator 
[RS_45]
+                                                   Reduce Output Operator 
[RS_36]
                                                       key expressions:_col11 
(type: int)
                                                       Map-reduce partition 
columns:_col11 (type: int)
                                                       sort order:+
                                                       Statistics:Num rows: 
22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
                                                       value expressions:_col1 
(type: int), _col3 (type: int), _col5 (type: decimal(7,2)), _col10 (type: 
decimal(7,2)), _col14 (type: decimal(7,2))
-                                                      Merge Join Operator 
[MERGEJOIN_114]
+                                                      Merge Join Operator 
[MERGEJOIN_100]
                                                       |  condition 
map:[{"":"Inner Join 0 to 1"}]
                                                       |  keys:{"0":"_col6 
(type: int)","1":"_col0 (type: int)"}
                                                       |  
outputColumnNames:["_col1","_col3","_col5","_col10","_col11","_col14"]
                                                       |  Statistics:Num rows: 
22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
                                                       |<-Map 14 [SIMPLE_EDGE]
-                                                      |  Reduce Output 
Operator [RS_42]
+                                                      |  Reduce Output 
Operator [RS_34]
                                                       |     key 
expressions:_col0 (type: int)
                                                       |     Map-reduce 
partition columns:_col0 (type: int)
                                                       |     sort order:+
@@ -156,26 +156,26 @@ Stage-0
                                                       |     Select Operator 
[SEL_14]
                                                       |        
outputColumnNames:["_col0"]
                                                       |        Statistics:Num 
rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
-                                                      |        Filter Operator 
[FIL_107]
+                                                      |        Filter Operator 
[FIL_93]
                                                       |           
predicate:(((d_year = 1998) and d_moy BETWEEN 4 AND 10) and d_date_sk is not 
null) (type: boolean)
                                                       |           
Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column 
stats: NONE
                                                       |           TableScan 
[TS_12]
                                                       |              alias:d1
                                                       |              
Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column 
stats: NONE
                                                       |<-Reducer 4 
[SIMPLE_EDGE]
-                                                         Reduce Output 
Operator [RS_40]
+                                                         Reduce Output 
Operator [RS_33]
                                                             key 
expressions:_col6 (type: int)
                                                             Map-reduce 
partition columns:_col6 (type: int)
                                                             sort order:+
                                                             Statistics:Num 
rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
                                                             value 
expressions:_col1 (type: int), _col3 (type: int), _col5 (type: decimal(7,2)), 
_col10 (type: decimal(7,2)), _col11 (type: int), _col14 (type: decimal(7,2))
-                                                            Merge Join 
Operator [MERGEJOIN_113]
+                                                            Merge Join 
Operator [MERGEJOIN_99]
                                                             |  condition 
map:[{"":"Inner Join 0 to 1"}]
                                                             |  
keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
                                                             |  
outputColumnNames:["_col1","_col3","_col5","_col6","_col10","_col11","_col14"]
                                                             |  Statistics:Num 
rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
                                                             |<-Map 13 
[SIMPLE_EDGE]
-                                                            |  Reduce Output 
Operator [RS_37]
+                                                            |  Reduce Output 
Operator [RS_31]
                                                             |     key 
expressions:_col0 (type: int)
                                                             |     Map-reduce 
partition columns:_col0 (type: int)
                                                             |     sort order:+
@@ -183,26 +183,26 @@ Stage-0
                                                             |     Select 
Operator [SEL_11]
                                                             |        
outputColumnNames:["_col0"]
                                                             |        
Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column 
stats: NONE
-                                                            |        Filter 
Operator [FIL_106]
+                                                            |        Filter 
Operator [FIL_92]
                                                             |           
predicate:(((d_year = 1998) and (d_moy = 4)) and d_date_sk is not null) (type: 
boolean)
                                                             |           
Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column 
stats: NONE
                                                             |           
TableScan [TS_9]
                                                             |              
alias:d1
                                                             |              
Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column 
stats: NONE
                                                             |<-Reducer 3 
[SIMPLE_EDGE]
-                                                               Reduce Output 
Operator [RS_35]
+                                                               Reduce Output 
Operator [RS_30]
                                                                   key 
expressions:_col0 (type: int)
                                                                   Map-reduce 
partition columns:_col0 (type: int)
                                                                   sort order:+
                                                                   
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                                   value 
expressions:_col1 (type: int), _col3 (type: int), _col5 (type: decimal(7,2)), 
_col6 (type: int), _col10 (type: decimal(7,2)), _col11 (type: int), _col14 
(type: decimal(7,2))
-                                                                  Merge Join 
Operator [MERGEJOIN_112]
+                                                                  Merge Join 
Operator [MERGEJOIN_98]
                                                                   |  condition 
map:[{"":"Inner Join 0 to 1"}]
                                                                   |  
keys:{"0":"_col8 (type: int), _col7 (type: int)","1":"_col1 (type: int), _col2 
(type: int)"}
                                                                   |  
outputColumnNames:["_col0","_col1","_col3","_col5","_col6","_col10","_col11","_col14"]
                                                                   |  
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                                   |<-Map 12 
[SIMPLE_EDGE]
-                                                                  |  Reduce 
Output Operator [RS_32]
+                                                                  |  Reduce 
Output Operator [RS_28]
                                                                   |     key 
expressions:_col1 (type: int), _col2 (type: int)
                                                                   |     
Map-reduce partition columns:_col1 (type: int), _col2 (type: int)
                                                                   |     sort 
order:++
@@ -211,26 +211,26 @@ Stage-0
                                                                   |     Select 
Operator [SEL_8]
                                                                   |        
outputColumnNames:["_col0","_col1","_col2","_col3"]
                                                                   |        
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                                  |        
Filter Operator [FIL_105]
+                                                                  |        
Filter Operator [FIL_91]
                                                                   |           
predicate:((cs_item_sk is not null and cs_bill_customer_sk is not null) and 
cs_sold_date_sk is not null) (type: boolean)
                                                                   |           
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                                   |           
TableScan [TS_6]
                                                                   |            
  alias:catalog_sales
                                                                   |            
  Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                                   |<-Reducer 2 
[SIMPLE_EDGE]
-                                                                     Reduce 
Output Operator [RS_30]
+                                                                     Reduce 
Output Operator [RS_27]
                                                                         key 
expressions:_col8 (type: int), _col7 (type: int)
                                                                         
Map-reduce partition columns:_col8 (type: int), _col7 (type: int)
                                                                         sort 
order:++
                                                                         
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                                         value 
expressions:_col0 (type: int), _col1 (type: int), _col3 (type: int), _col5 
(type: decimal(7,2)), _col6 (type: int), _col10 (type: decimal(7,2))
-                                                                        Merge 
Join Operator [MERGEJOIN_111]
+                                                                        Merge 
Join Operator [MERGEJOIN_97]
                                                                         |  
condition map:[{"":"Inner Join 0 to 1"}]
                                                                         |  
keys:{"0":"_col2 (type: int), _col1 (type: int), _col4 (type: int)","1":"_col2 
(type: int), _col1 (type: int), _col3 (type: int)"}
                                                                         |  
outputColumnNames:["_col0","_col1","_col3","_col5","_col6","_col7","_col8","_col10"]
                                                                         |  
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                                         |<-Map 
1 [SIMPLE_EDGE]
-                                                                        |  
Reduce Output Operator [RS_25]
+                                                                        |  
Reduce Output Operator [RS_24]
                                                                         |     
key expressions:_col2 (type: int), _col1 (type: int), _col4 (type: int)
                                                                         |     
Map-reduce partition columns:_col2 (type: int), _col1 (type: int), _col4 (type: 
int)
                                                                         |     
sort order:+++
@@ -239,14 +239,14 @@ Stage-0
                                                                         |     
Select Operator [SEL_2]
                                                                         |      
  outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
                                                                         |      
  Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                                        |      
  Filter Operator [FIL_103]
+                                                                        |      
  Filter Operator [FIL_89]
                                                                         |      
     predicate:((((ss_ticket_number is not null and ss_customer_sk is not null) 
and ss_item_sk is not null) and ss_sold_date_sk is not null) and ss_store_sk is 
not null) (type: boolean)
                                                                         |      
     Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                                         |      
     TableScan [TS_0]
                                                                         |      
        alias:store_sales
                                                                         |      
        Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: 
NONE
                                                                         |<-Map 
11 [SIMPLE_EDGE]
-                                                                           
Reduce Output Operator [RS_27]
+                                                                           
Reduce Output Operator [RS_25]
                                                                               
key expressions:_col2 (type: int), _col1 (type: int), _col3 (type: int)
                                                                               
Map-reduce partition columns:_col2 (type: int), _col1 (type: int), _col3 (type: 
int)
                                                                               
sort order:+++
@@ -255,7 +255,7 @@ Stage-0
                                                                               
Select Operator [SEL_5]
                                                                                
  outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
                                                                                
  Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                                               
  Filter Operator [FIL_104]
+                                                                               
  Filter Operator [FIL_90]
                                                                                
     predicate:(((sr_ticket_number is not null and sr_customer_sk is not null) 
and sr_item_sk is not null) and sr_returned_date_sk is not null) (type: boolean)
                                                                                
     Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                                                
     TableScan [TS_3]

http://git-wip-us.apache.org/repos/asf/hive/blob/6f44fc81/ql/src/test/results/clientpositive/perf/query26.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query26.q.out 
b/ql/src/test/results/clientpositive/perf/query26.q.out
index d364aec..84cc238 100644
--- a/ql/src/test/results/clientpositive/perf/query26.q.out
+++ b/ql/src/test/results/clientpositive/perf/query26.q.out
@@ -17,49 +17,49 @@ Stage-0
       limit:100
       Stage-1
          Reducer 7
-         File Output Operator [FS_43]
+         File Output Operator [FS_35]
             compressed:false
             Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE 
Column stats: NONE
             table:{"input 
format:":"org.apache.hadoop.mapred.TextInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
-            Limit [LIM_42]
+            Limit [LIM_34]
                Number of rows:100
                Statistics:Num rows: 100 Data size: 143600 Basic stats: 
COMPLETE Column stats: NONE
-               Select Operator [SEL_41]
+               Select Operator [SEL_33]
                |  outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
                |  Statistics:Num rows: 279510 Data size: 401454093 Basic 
stats: COMPLETE Column stats: NONE
                |<-Reducer 6 [SIMPLE_EDGE]
-                  Reduce Output Operator [RS_40]
+                  Reduce Output Operator [RS_32]
                      key expressions:_col0 (type: string)
                      sort order:+
                      Statistics:Num rows: 279510 Data size: 401454093 Basic 
stats: COMPLETE Column stats: NONE
                      value expressions:_col1 (type: double), _col2 (type: 
decimal(11,6)), _col3 (type: decimal(11,6)), _col4 (type: decimal(11,6))
-                     Group By Operator [GBY_38]
+                     Group By Operator [GBY_30]
                      |  
aggregations:["avg(VALUE._col0)","avg(VALUE._col1)","avg(VALUE._col2)","avg(VALUE._col3)"]
                      |  keys:KEY._col0 (type: string)
                      |  
outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
                      |  Statistics:Num rows: 279510 Data size: 401454093 Basic 
stats: COMPLETE Column stats: NONE
                      |<-Reducer 5 [SIMPLE_EDGE]
-                        Reduce Output Operator [RS_37]
+                        Reduce Output Operator [RS_29]
                            key expressions:_col0 (type: string)
                            Map-reduce partition columns:_col0 (type: string)
                            sort order:+
                            Statistics:Num rows: 559020 Data size: 802908187 
Basic stats: COMPLETE Column stats: NONE
                            value expressions:_col1 (type: 
struct<count:bigint,sum:double,input:int>), _col2 (type: 
struct<count:bigint,sum:decimal(17,2),input:decimal(7,2)>), _col3 (type: 
struct<count:bigint,sum:decimal(17,2),input:decimal(7,2)>), _col4 (type: 
struct<count:bigint,sum:decimal(17,2),input:decimal(7,2)>)
-                           Group By Operator [GBY_36]
+                           Group By Operator [GBY_28]
                               
aggregations:["avg(_col4)","avg(_col5)","avg(_col7)","avg(_col6)"]
                               keys:_col15 (type: string)
                               
outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
                               Statistics:Num rows: 559020 Data size: 802908187 
Basic stats: COMPLETE Column stats: NONE
-                              Select Operator [SEL_35]
+                              Select Operator [SEL_27]
                                  
outputColumnNames:["_col15","_col4","_col5","_col7","_col6"]
                                  Statistics:Num rows: 559020 Data size: 
802908187 Basic stats: COMPLETE Column stats: NONE
-                                 Merge Join Operator [MERGEJOIN_66]
+                                 Merge Join Operator [MERGEJOIN_58]
                                  |  condition map:[{"":"Inner Join 0 to 1"}]
                                  |  keys:{"0":"_col3 (type: int)","1":"_col0 
(type: int)"}
                                  |  
outputColumnNames:["_col4","_col5","_col6","_col7","_col15"]
                                  |  Statistics:Num rows: 559020 Data size: 
802908187 Basic stats: COMPLETE Column stats: NONE
                                  |<-Map 11 [SIMPLE_EDGE]
-                                 |  Reduce Output Operator [RS_33]
+                                 |  Reduce Output Operator [RS_25]
                                  |     key expressions:_col0 (type: int)
                                  |     Map-reduce partition columns:_col0 
(type: int)
                                  |     sort order:+
@@ -67,26 +67,26 @@ Stage-0
                                  |     Select Operator [SEL_14]
                                  |        outputColumnNames:["_col0"]
                                  |        Statistics:Num rows: 2300 Data size: 
2713420 Basic stats: COMPLETE Column stats: NONE
-                                 |        Filter Operator [FIL_62]
+                                 |        Filter Operator [FIL_54]
                                  |           predicate:(((p_channel_email = 
'N') or (p_channel_event = 'N')) and p_promo_sk is not null) (type: boolean)
                                  |           Statistics:Num rows: 2300 Data 
size: 2713420 Basic stats: COMPLETE Column stats: NONE
                                  |           TableScan [TS_12]
                                  |              alias:promotion
                                  |              Statistics:Num rows: 2300 Data 
size: 2713420 Basic stats: COMPLETE Column stats: NONE
                                  |<-Reducer 4 [SIMPLE_EDGE]
-                                    Reduce Output Operator [RS_31]
+                                    Reduce Output Operator [RS_24]
                                        key expressions:_col3 (type: int)
                                        Map-reduce partition columns:_col3 
(type: int)
                                        sort order:+
                                        Statistics:Num rows: 508200 Data size: 
729916518 Basic stats: COMPLETE Column stats: NONE
                                        value expressions:_col4 (type: int), 
_col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: 
decimal(7,2)), _col15 (type: string)
-                                       Merge Join Operator [MERGEJOIN_65]
+                                       Merge Join Operator [MERGEJOIN_57]
                                        |  condition map:[{"":"Inner Join 0 to 
1"}]
                                        |  keys:{"0":"_col2 (type: 
int)","1":"_col0 (type: int)"}
                                        |  
outputColumnNames:["_col3","_col4","_col5","_col6","_col7","_col15"]
                                        |  Statistics:Num rows: 508200 Data 
size: 729916518 Basic stats: COMPLETE Column stats: NONE
                                        |<-Map 10 [SIMPLE_EDGE]
-                                       |  Reduce Output Operator [RS_28]
+                                       |  Reduce Output Operator [RS_22]
                                        |     key expressions:_col0 (type: int)
                                        |     Map-reduce partition 
columns:_col0 (type: int)
                                        |     sort order:+
@@ -95,26 +95,26 @@ Stage-0
                                        |     Select Operator [SEL_11]
                                        |        
outputColumnNames:["_col0","_col1"]
                                        |        Statistics:Num rows: 462000 
Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
-                                       |        Filter Operator [FIL_61]
+                                       |        Filter Operator [FIL_53]
                                        |           predicate:i_item_sk is not 
null (type: boolean)
                                        |           Statistics:Num rows: 462000 
Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
                                        |           TableScan [TS_9]
                                        |              alias:item
                                        |              Statistics:Num rows: 
462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
                                        |<-Reducer 3 [SIMPLE_EDGE]
-                                          Reduce Output Operator [RS_26]
+                                          Reduce Output Operator [RS_21]
                                              key expressions:_col2 (type: int)
                                              Map-reduce partition 
columns:_col2 (type: int)
                                              sort order:+
                                              Statistics:Num rows: 40176 Data 
size: 44957392 Basic stats: COMPLETE Column stats: NONE
                                              value expressions:_col3 (type: 
int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: 
decimal(7,2)), _col7 (type: decimal(7,2))
-                                             Merge Join Operator [MERGEJOIN_64]
+                                             Merge Join Operator [MERGEJOIN_56]
                                              |  condition map:[{"":"Inner Join 
0 to 1"}]
                                              |  keys:{"0":"_col0 (type: 
int)","1":"_col0 (type: int)"}
                                              |  
outputColumnNames:["_col2","_col3","_col4","_col5","_col6","_col7"]
                                              |  Statistics:Num rows: 40176 
Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
                                              |<-Map 9 [SIMPLE_EDGE]
-                                             |  Reduce Output Operator [RS_23]
+                                             |  Reduce Output Operator [RS_19]
                                              |     key expressions:_col0 
(type: int)
                                              |     Map-reduce partition 
columns:_col0 (type: int)
                                              |     sort order:+
@@ -122,26 +122,26 @@ Stage-0
                                              |     Select Operator [SEL_8]
                                              |        
outputColumnNames:["_col0"]
                                              |        Statistics:Num rows: 
36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
-                                             |        Filter Operator [FIL_60]
+                                             |        Filter Operator [FIL_52]
                                              |           predicate:((d_year = 
1998) and d_date_sk is not null) (type: boolean)
                                              |           Statistics:Num rows: 
36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
                                              |           TableScan [TS_6]
                                              |              alias:date_dim
                                              |              Statistics:Num 
rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
                                              |<-Reducer 2 [SIMPLE_EDGE]
-                                                Reduce Output Operator [RS_21]
+                                                Reduce Output Operator [RS_18]
                                                    key expressions:_col0 
(type: int)
                                                    Map-reduce partition 
columns:_col0 (type: int)
                                                    sort order:+
                                                    Statistics:Num rows: 2722 
Data size: 986020 Basic stats: COMPLETE Column stats: NONE
                                                    value expressions:_col2 
(type: int), _col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), 
_col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
-                                                   Merge Join Operator 
[MERGEJOIN_63]
+                                                   Merge Join Operator 
[MERGEJOIN_55]
                                                    |  condition 
map:[{"":"Inner Join 0 to 1"}]
                                                    |  keys:{"0":"_col1 (type: 
int)","1":"_col0 (type: int)"}
                                                    |  
outputColumnNames:["_col0","_col2","_col3","_col4","_col5","_col6","_col7"]
                                                    |  Statistics:Num rows: 
2722 Data size: 986020 Basic stats: COMPLETE Column stats: NONE
                                                    |<-Map 1 [SIMPLE_EDGE]
-                                                   |  Reduce Output Operator 
[RS_16]
+                                                   |  Reduce Output Operator 
[RS_15]
                                                    |     key expressions:_col1 
(type: int)
                                                    |     Map-reduce partition 
columns:_col1 (type: int)
                                                    |     sort order:+
@@ -150,14 +150,14 @@ Stage-0
                                                    |     Select Operator 
[SEL_2]
                                                    |        
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                                                    |        Statistics:Num 
rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                   |        Filter Operator 
[FIL_58]
+                                                   |        Filter Operator 
[FIL_50]
                                                    |           
predicate:(((cs_bill_cdemo_sk is not null and cs_sold_date_sk is not null) and 
cs_item_sk is not null) and cs_promo_sk is not null) (type: boolean)
                                                    |           Statistics:Num 
rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                    |           TableScan [TS_0]
                                                    |              
alias:catalog_sales
                                                    |              
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                    |<-Map 8 [SIMPLE_EDGE]
-                                                      Reduce Output Operator 
[RS_18]
+                                                      Reduce Output Operator 
[RS_16]
                                                          key expressions:_col0 
(type: int)
                                                          Map-reduce partition 
columns:_col0 (type: int)
                                                          sort order:+
@@ -165,7 +165,7 @@ Stage-0
                                                          Select Operator 
[SEL_5]
                                                             
outputColumnNames:["_col0"]
                                                             Statistics:Num 
rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE
-                                                            Filter Operator 
[FIL_59]
+                                                            Filter Operator 
[FIL_51]
                                                                
predicate:((((cd_gender = 'F') and (cd_marital_status = 'W')) and 
(cd_education_status = 'Primary')) and cd_demo_sk is not null) (type: boolean)
                                                                Statistics:Num 
rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE
                                                                TableScan [TS_3]

http://git-wip-us.apache.org/repos/asf/hive/blob/6f44fc81/ql/src/test/results/clientpositive/perf/query27.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query27.q.out 
b/ql/src/test/results/clientpositive/perf/query27.q.out
index bf5d56e..ac38683 100644
--- a/ql/src/test/results/clientpositive/perf/query27.q.out
+++ b/ql/src/test/results/clientpositive/perf/query27.q.out
@@ -17,52 +17,52 @@ Stage-0
       limit:100
       Stage-1
          Reducer 7
-         File Output Operator [FS_43]
+         File Output Operator [FS_35]
             compressed:false
             Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE 
Column stats: NONE
             table:{"input 
format:":"org.apache.hadoop.mapred.TextInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
-            Limit [LIM_42]
+            Limit [LIM_34]
                Number of rows:100
                Statistics:Num rows: 100 Data size: 143600 Basic stats: 
COMPLETE Column stats: NONE
-               Select Operator [SEL_41]
+               Select Operator [SEL_33]
                |  
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
                |  Statistics:Num rows: 254100 Data size: 364958259 Basic 
stats: COMPLETE Column stats: NONE
                |<-Reducer 6 [SIMPLE_EDGE]
-                  Reduce Output Operator [RS_40]
+                  Reduce Output Operator [RS_32]
                      key expressions:_col0 (type: string), _col1 (type: string)
                      sort order:++
                      Statistics:Num rows: 254100 Data size: 364958259 Basic 
stats: COMPLETE Column stats: NONE
                      value expressions:_col2 (type: double), _col3 (type: 
decimal(11,6)), _col4 (type: decimal(11,6)), _col5 (type: decimal(11,6))
-                     Select Operator [SEL_39]
+                     Select Operator [SEL_31]
                         
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
                         Statistics:Num rows: 254100 Data size: 364958259 Basic 
stats: COMPLETE Column stats: NONE
-                        Group By Operator [GBY_38]
+                        Group By Operator [GBY_30]
                         |  
aggregations:["avg(VALUE._col0)","avg(VALUE._col1)","avg(VALUE._col2)","avg(VALUE._col3)"]
                         |  keys:KEY._col0 (type: string), KEY._col1 (type: 
string)
                         |  
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
                         |  Statistics:Num rows: 254100 Data size: 364958259 
Basic stats: COMPLETE Column stats: NONE
                         |<-Reducer 5 [SIMPLE_EDGE]
-                           Reduce Output Operator [RS_37]
+                           Reduce Output Operator [RS_29]
                               key expressions:_col0 (type: string), _col1 
(type: string)
                               Map-reduce partition columns:_col0 (type: 
string), _col1 (type: string)
                               sort order:++
                               Statistics:Num rows: 508200 Data size: 729916518 
Basic stats: COMPLETE Column stats: NONE
                               value expressions:_col2 (type: 
struct<count:bigint,sum:double,input:int>), _col3 (type: 
struct<count:bigint,sum:decimal(17,2),input:decimal(7,2)>), _col4 (type: 
struct<count:bigint,sum:decimal(17,2),input:decimal(7,2)>), _col5 (type: 
struct<count:bigint,sum:decimal(17,2),input:decimal(7,2)>)
-                              Group By Operator [GBY_36]
+                              Group By Operator [GBY_28]
                                  
aggregations:["avg(_col4)","avg(_col5)","avg(_col7)","avg(_col6)"]
                                  keys:_col15 (type: string), _col17 (type: 
string)
                                  
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
                                  Statistics:Num rows: 508200 Data size: 
729916518 Basic stats: COMPLETE Column stats: NONE
-                                 Select Operator [SEL_35]
+                                 Select Operator [SEL_27]
                                     
outputColumnNames:["_col15","_col17","_col4","_col5","_col7","_col6"]
                                     Statistics:Num rows: 508200 Data size: 
729916518 Basic stats: COMPLETE Column stats: NONE
-                                    Merge Join Operator [MERGEJOIN_66]
+                                    Merge Join Operator [MERGEJOIN_58]
                                     |  condition map:[{"":"Inner Join 0 to 1"}]
                                     |  keys:{"0":"_col1 (type: 
int)","1":"_col0 (type: int)"}
                                     |  
outputColumnNames:["_col4","_col5","_col6","_col7","_col15","_col17"]
                                     |  Statistics:Num rows: 508200 Data size: 
729916518 Basic stats: COMPLETE Column stats: NONE
                                     |<-Map 11 [SIMPLE_EDGE]
-                                    |  Reduce Output Operator [RS_33]
+                                    |  Reduce Output Operator [RS_25]
                                     |     key expressions:_col0 (type: int)
                                     |     Map-reduce partition columns:_col0 
(type: int)
                                     |     sort order:+
@@ -71,26 +71,26 @@ Stage-0
                                     |     Select Operator [SEL_14]
                                     |        
outputColumnNames:["_col0","_col1"]
                                     |        Statistics:Num rows: 462000 Data 
size: 663560457 Basic stats: COMPLETE Column stats: NONE
-                                    |        Filter Operator [FIL_62]
+                                    |        Filter Operator [FIL_54]
                                     |           predicate:i_item_sk is not 
null (type: boolean)
                                     |           Statistics:Num rows: 462000 
Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
                                     |           TableScan [TS_12]
                                     |              alias:item
                                     |              Statistics:Num rows: 462000 
Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
                                     |<-Reducer 4 [SIMPLE_EDGE]
-                                       Reduce Output Operator [RS_31]
+                                       Reduce Output Operator [RS_24]
                                           key expressions:_col1 (type: int)
                                           Map-reduce partition columns:_col1 
(type: int)
                                           sort order:+
                                           Statistics:Num rows: 44193 Data 
size: 49453132 Basic stats: COMPLETE Column stats: NONE
                                           value expressions:_col4 (type: int), 
_col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: 
decimal(7,2)), _col15 (type: string)
-                                          Merge Join Operator [MERGEJOIN_65]
+                                          Merge Join Operator [MERGEJOIN_57]
                                           |  condition map:[{"":"Inner Join 0 
to 1"}]
                                           |  keys:{"0":"_col3 (type: 
int)","1":"_col0 (type: int)"}
                                           |  
outputColumnNames:["_col1","_col4","_col5","_col6","_col7","_col15"]
                                           |  Statistics:Num rows: 44193 Data 
size: 49453132 Basic stats: COMPLETE Column stats: NONE
                                           |<-Map 10 [SIMPLE_EDGE]
-                                          |  Reduce Output Operator [RS_28]
+                                          |  Reduce Output Operator [RS_22]
                                           |     key expressions:_col0 (type: 
int)
                                           |     Map-reduce partition 
columns:_col0 (type: int)
                                           |     sort order:+
@@ -99,26 +99,26 @@ Stage-0
                                           |     Select Operator [SEL_11]
                                           |        
outputColumnNames:["_col0","_col1"]
                                           |        Statistics:Num rows: 852 
Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
-                                          |        Filter Operator [FIL_61]
+                                          |        Filter Operator [FIL_53]
                                           |           predicate:((s_state) IN 
('KS', 'AL', 'MN', 'AL', 'SC', 'VT') and s_store_sk is not null) (type: boolean)
                                           |           Statistics:Num rows: 852 
Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
                                           |           TableScan [TS_9]
                                           |              alias:store
                                           |              Statistics:Num rows: 
1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
                                           |<-Reducer 3 [SIMPLE_EDGE]
-                                             Reduce Output Operator [RS_26]
+                                             Reduce Output Operator [RS_21]
                                                 key expressions:_col3 (type: 
int)
                                                 Map-reduce partition 
columns:_col3 (type: int)
                                                 sort order:+
                                                 Statistics:Num rows: 40176 
Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
                                                 value expressions:_col1 (type: 
int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: 
decimal(7,2)), _col7 (type: decimal(7,2))
-                                                Merge Join Operator 
[MERGEJOIN_64]
+                                                Merge Join Operator 
[MERGEJOIN_56]
                                                 |  condition map:[{"":"Inner 
Join 0 to 1"}]
                                                 |  keys:{"0":"_col0 (type: 
int)","1":"_col0 (type: int)"}
                                                 |  
outputColumnNames:["_col1","_col3","_col4","_col5","_col6","_col7"]
                                                 |  Statistics:Num rows: 40176 
Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
                                                 |<-Map 9 [SIMPLE_EDGE]
-                                                |  Reduce Output Operator 
[RS_23]
+                                                |  Reduce Output Operator 
[RS_19]
                                                 |     key expressions:_col0 
(type: int)
                                                 |     Map-reduce partition 
columns:_col0 (type: int)
                                                 |     sort order:+
@@ -126,26 +126,26 @@ Stage-0
                                                 |     Select Operator [SEL_8]
                                                 |        
outputColumnNames:["_col0"]
                                                 |        Statistics:Num rows: 
36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
-                                                |        Filter Operator 
[FIL_60]
+                                                |        Filter Operator 
[FIL_52]
                                                 |           predicate:((d_year 
= 1998) and d_date_sk is not null) (type: boolean)
                                                 |           Statistics:Num 
rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
                                                 |           TableScan [TS_6]
                                                 |              alias:date_dim
                                                 |              Statistics:Num 
rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
                                                 |<-Reducer 2 [SIMPLE_EDGE]
-                                                   Reduce Output Operator 
[RS_21]
+                                                   Reduce Output Operator 
[RS_18]
                                                       key expressions:_col0 
(type: int)
                                                       Map-reduce partition 
columns:_col0 (type: int)
                                                       sort order:+
                                                       Statistics:Num rows: 
2722 Data size: 986020 Basic stats: COMPLETE Column stats: NONE
                                                       value expressions:_col1 
(type: int), _col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), 
_col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
-                                                      Merge Join Operator 
[MERGEJOIN_63]
+                                                      Merge Join Operator 
[MERGEJOIN_55]
                                                       |  condition 
map:[{"":"Inner Join 0 to 1"}]
                                                       |  keys:{"0":"_col2 
(type: int)","1":"_col0 (type: int)"}
                                                       |  
outputColumnNames:["_col0","_col1","_col3","_col4","_col5","_col6","_col7"]
                                                       |  Statistics:Num rows: 
2722 Data size: 986020 Basic stats: COMPLETE Column stats: NONE
                                                       |<-Map 1 [SIMPLE_EDGE]
-                                                      |  Reduce Output 
Operator [RS_16]
+                                                      |  Reduce Output 
Operator [RS_15]
                                                       |     key 
expressions:_col2 (type: int)
                                                       |     Map-reduce 
partition columns:_col2 (type: int)
                                                       |     sort order:+
@@ -154,14 +154,14 @@ Stage-0
                                                       |     Select Operator 
[SEL_2]
                                                       |        
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                                                       |        Statistics:Num 
rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                      |        Filter Operator 
[FIL_58]
+                                                      |        Filter Operator 
[FIL_50]
                                                       |           
predicate:(((ss_cdemo_sk is not null and ss_sold_date_sk is not null) and 
ss_store_sk is not null) and ss_item_sk is not null) (type: boolean)
                                                       |           
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                       |           TableScan 
[TS_0]
                                                       |              
alias:store_sales
                                                       |              
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                       |<-Map 8 [SIMPLE_EDGE]
-                                                         Reduce Output 
Operator [RS_18]
+                                                         Reduce Output 
Operator [RS_16]
                                                             key 
expressions:_col0 (type: int)
                                                             Map-reduce 
partition columns:_col0 (type: int)
                                                             sort order:+
@@ -169,7 +169,7 @@ Stage-0
                                                             Select Operator 
[SEL_5]
                                                                
outputColumnNames:["_col0"]
                                                                Statistics:Num 
rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE
-                                                               Filter Operator 
[FIL_59]
+                                                               Filter Operator 
[FIL_51]
                                                                   
predicate:((((cd_gender = 'F') and (cd_marital_status = 'D')) and 
(cd_education_status = 'Unknown')) and cd_demo_sk is not null) (type: boolean)
                                                                   
Statistics:Num rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: 
NONE
                                                                   TableScan 
[TS_3]

Reply via email to