http://git-wip-us.apache.org/repos/asf/hive/blob/6f44fc81/ql/src/test/results/clientpositive/perf/query89.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query89.q.out 
b/ql/src/test/results/clientpositive/perf/query89.q.out
index 4cab575..ee9eabc 100644
--- a/ql/src/test/results/clientpositive/perf/query89.q.out
+++ b/ql/src/test/results/clientpositive/perf/query89.q.out
@@ -67,74 +67,74 @@ Stage-0
       limit:100
       Stage-1
          Reducer 7
-         File Output Operator [FS_42]
+         File Output Operator [FS_36]
             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_41]
+            Limit [LIM_35]
                Number of rows:100
                Statistics:Num rows: 100 Data size: 143600 Basic stats: 
COMPLETE Column stats: NONE
-               Select Operator [SEL_40]
+               Select Operator [SEL_34]
                |  
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                |  Statistics:Num rows: 51243 Data size: 73599199 Basic stats: 
COMPLETE Column stats: NONE
                |<-Reducer 6 [SIMPLE_EDGE]
-                  Reduce Output Operator [RS_39]
+                  Reduce Output Operator [RS_33]
                      key expressions:(_col6 - _col7) (type: decimal(22,6)), 
_col3 (type: string)
                      sort order:++
                      Statistics:Num rows: 51243 Data size: 73599199 Basic 
stats: COMPLETE Column stats: NONE
                      value expressions:_col0 (type: string), _col1 (type: 
string), _col2 (type: string), _col4 (type: string), _col5 (type: int), _col6 
(type: decimal(17,2)), _col7 (type: decimal(21,6))
-                     Select Operator [SEL_36]
+                     Select Operator [SEL_30]
                         
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                         Statistics:Num rows: 51243 Data size: 73599199 Basic 
stats: COMPLETE Column stats: NONE
-                        Filter Operator [FIL_52]
+                        Filter Operator [FIL_46]
                            predicate:(CASE WHEN ((avg_window_0 <> 0)) THEN 
((abs((_col6 - avg_window_0)) / avg_window_0)) ELSE (null) END > 0.1) (type: 
boolean)
                            Statistics:Num rows: 51243 Data size: 73599199 
Basic stats: COMPLETE Column stats: NONE
-                           Select Operator [SEL_35]
+                           Select Operator [SEL_29]
                               
outputColumnNames:["avg_window_0","_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                               Statistics:Num rows: 153730 Data size: 220799036 
Basic stats: COMPLETE Column stats: NONE
-                              PTF Operator [PTF_34]
+                              PTF Operator [PTF_28]
                                  Function definitions:[{"Input 
definition":{"type:":"WINDOWING"}},{"name:":"windowingtablefunction","order 
by:":"_col0, _col2, _col3, _col4","partition by:":"_col0, _col2, _col3, _col4"}]
                                  Statistics:Num rows: 153730 Data size: 
220799036 Basic stats: COMPLETE Column stats: NONE
-                                 Select Operator [SEL_33]
+                                 Select Operator [SEL_27]
                                  |  
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                                  |  Statistics:Num rows: 153730 Data size: 
220799036 Basic stats: COMPLETE Column stats: NONE
                                  |<-Reducer 5 [SIMPLE_EDGE]
-                                    Reduce Output Operator [RS_32]
+                                    Reduce Output Operator [RS_26]
                                        key expressions:_col0 (type: string), 
_col2 (type: string), _col3 (type: string), _col4 (type: string)
                                        Map-reduce partition columns:_col0 
(type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
                                        sort order:++++
                                        Statistics:Num rows: 153730 Data size: 
220799036 Basic stats: COMPLETE Column stats: NONE
                                        value expressions:_col1 (type: string), 
_col5 (type: int), _col6 (type: decimal(17,2))
-                                       Select Operator [SEL_31]
+                                       Select Operator [SEL_25]
                                           
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                                           Statistics:Num rows: 153730 Data 
size: 220799036 Basic stats: COMPLETE Column stats: NONE
-                                          Group By Operator [GBY_30]
+                                          Group By Operator [GBY_24]
                                           |  aggregations:["sum(VALUE._col0)"]
                                           |  keys:KEY._col0 (type: string), 
KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: int), 
KEY._col4 (type: string), KEY._col5 (type: string)
                                           |  
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                                           |  Statistics:Num rows: 153730 Data 
size: 220799036 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: int), _col4 
(type: string), _col5 (type: string)
                                                 Map-reduce partition 
columns:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 
(type: int), _col4 (type: string), _col5 (type: string)
                                                 sort order:++++++
                                                 Statistics:Num rows: 307461 
Data size: 441599510 Basic stats: COMPLETE Column stats: NONE
                                                 value expressions:_col6 (type: 
decimal(17,2))
-                                                Group By Operator [GBY_28]
+                                                Group By Operator [GBY_22]
                                                    aggregations:["sum(_col7)"]
                                                    keys:_col1 (type: string), 
_col2 (type: string), _col3 (type: string), _col10 (type: int), _col12 (type: 
string), _col13 (type: string)
                                                    
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                                                    Statistics:Num rows: 307461 
Data size: 441599510 Basic stats: COMPLETE Column stats: NONE
-                                                   Select Operator [SEL_27]
+                                                   Select Operator [SEL_21]
                                                       
outputColumnNames:["_col1","_col2","_col3","_col10","_col12","_col13","_col7"]
                                                       Statistics:Num rows: 
307461 Data size: 441599510 Basic stats: COMPLETE Column stats: NONE
-                                                      Merge Join Operator 
[MERGEJOIN_59]
+                                                      Merge Join Operator 
[MERGEJOIN_53]
                                                       |  condition 
map:[{"":"Inner Join 0 to 1"}]
                                                       |  keys:{"0":"_col6 
(type: int)","1":"_col0 (type: int)"}
                                                       |  
outputColumnNames:["_col1","_col2","_col3","_col7","_col10","_col12","_col13"]
                                                       |  Statistics:Num rows: 
307461 Data size: 441599510 Basic stats: COMPLETE Column stats: NONE
                                                       |<-Map 10 [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:+
@@ -143,26 +143,26 @@ Stage-0
                                                       |     Select Operator 
[SEL_11]
                                                       |        
outputColumnNames:["_col0","_col1","_col2"]
                                                       |        Statistics:Num 
rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
-                                                      |        Filter Operator 
[FIL_56]
+                                                      |        Filter Operator 
[FIL_50]
                                                       |           
predicate:s_store_sk is not null (type: boolean)
                                                       |           
Statistics:Num rows: 1704 Data size: 3256276 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_23]
+                                                         Reduce Output 
Operator [RS_18]
                                                             key 
expressions:_col6 (type: int)
                                                             Map-reduce 
partition columns:_col6 (type: int)
                                                             sort order:+
                                                             Statistics:Num 
rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
                                                             value 
expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), 
_col7 (type: decimal(7,2)), _col10 (type: int)
-                                                            Merge Join 
Operator [MERGEJOIN_58]
+                                                            Merge Join 
Operator [MERGEJOIN_52]
                                                             |  condition 
map:[{"":"Inner Join 0 to 1"}]
                                                             |  
keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
                                                             |  
outputColumnNames:["_col1","_col2","_col3","_col6","_col7","_col10"]
                                                             |  Statistics:Num 
rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
                                                             |<-Map 9 
[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:+
@@ -171,26 +171,26 @@ Stage-0
                                                             |     Select 
Operator [SEL_8]
                                                             |        
outputColumnNames:["_col0","_col2"]
                                                             |        
Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column 
stats: NONE
-                                                            |        Filter 
Operator [FIL_55]
+                                                            |        Filter 
Operator [FIL_49]
                                                             |           
predicate:((d_year) IN (2000) 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_18]
+                                                               Reduce Output 
Operator [RS_15]
                                                                   key 
expressions:_col4 (type: int)
                                                                   Map-reduce 
partition columns:_col4 (type: int)
                                                                   sort order:+
                                                                   
Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column 
stats: NONE
                                                                   value 
expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), 
_col6 (type: int), _col7 (type: decimal(7,2))
-                                                                  Merge Join 
Operator [MERGEJOIN_57]
+                                                                  Merge Join 
Operator [MERGEJOIN_51]
                                                                   |  condition 
map:[{"":"Inner Join 0 to 1"}]
                                                                   |  
keys:{"0":"_col0 (type: int)","1":"_col1 (type: int)"}
                                                                   |  
outputColumnNames:["_col1","_col2","_col3","_col4","_col6","_col7"]
                                                                   |  
Statistics:Num rows: 254100 Data size: 364958258 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:+
@@ -199,14 +199,14 @@ Stage-0
                                                                   |     Select 
Operator [SEL_2]
                                                                   |        
outputColumnNames:["_col0","_col1","_col2","_col3"]
                                                                   |        
Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column 
stats: NONE
-                                                                  |        
Filter Operator [FIL_53]
+                                                                  |        
Filter Operator [FIL_47]
                                                                   |           
predicate:((((((i_category) IN ('Home', 'Books', 'Electronics') and (i_class) 
IN ('wallpaper', 'parenting', 'musical')) or ((i_category) IN ('Shoes', 
'Jewelry', 'Men') and (i_class) IN ('womens', 'birdal', 'pants'))) and 
((i_category) IN ('Home', 'Books', 'Electronics') or (i_category) IN ('Shoes', 
'Jewelry', 'Men'))) and ((i_class) IN ('wallpaper', 'parenting', 'musical') or 
(i_class) IN ('womens', 'birdal', 'pants'))) and i_item_sk is not null) (type: 
boolean)
                                                                   |           
Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column 
stats: NONE
                                                                   |           
TableScan [TS_0]
                                                                   |            
  alias:item
                                                                   |            
  Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column 
stats: NONE
                                                                   |<-Map 8 
[SIMPLE_EDGE]
-                                                                     Reduce 
Output Operator [RS_15]
+                                                                     Reduce 
Output Operator [RS_13]
                                                                         key 
expressions:_col1 (type: int)
                                                                         
Map-reduce partition columns:_col1 (type: int)
                                                                         sort 
order:+
@@ -215,7 +215,7 @@ Stage-0
                                                                         Select 
Operator [SEL_5]
                                                                            
outputColumnNames:["_col0","_col1","_col2","_col3"]
                                                                            
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                                           
Filter Operator [FIL_54]
+                                                                           
Filter Operator [FIL_48]
                                                                               
predicate:((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_3]

http://git-wip-us.apache.org/repos/asf/hive/blob/6f44fc81/ql/src/test/results/clientpositive/perf/query90.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query90.q.out 
b/ql/src/test/results/clientpositive/perf/query90.q.out
index 2c0f592..d34aaf4 100644
--- a/ql/src/test/results/clientpositive/perf/query90.q.out
+++ b/ql/src/test/results/clientpositive/perf/query90.q.out
@@ -1,4 +1,4 @@
-Warning: Shuffle Join MERGEJOIN[106][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Reducer 6' is a cross product
+Warning: Shuffle Join MERGEJOIN[93][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Reducer 6' is a cross product
 PREHOOK: query: explain select cast(amc as decimal(15,4))/cast(pmc as 
decimal(15,4)) am_pm_ratio from ( select count(*) amc from web_sales, 
household_demographics , time_dim, web_page where ws_sold_time_sk = 
time_dim.t_time_sk and ws_ship_hdemo_sk = household_demographics.hd_demo_sk and 
ws_web_page_sk = web_page.wp_web_page_sk and time_dim.t_hour between 6 and 6+1 
and household_demographics.hd_dep_count = 8 and web_page.wp_char_count between 
5000 and 5200) at, ( select count(*) pmc from web_sales, household_demographics 
, time_dim, web_page where ws_sold_time_sk = time_dim.t_time_sk and 
ws_ship_hdemo_sk = household_demographics.hd_demo_sk and ws_web_page_sk = 
web_page.wp_web_page_sk and time_dim.t_hour between 14 and 14+1 and 
household_demographics.hd_dep_count = 8 and web_page.wp_char_count between 5000 
and 5200) pt order by am_pm_ratio limit 100
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select cast(amc as decimal(15,4))/cast(pmc as 
decimal(15,4)) am_pm_ratio from ( select count(*) amc from web_sales, 
household_demographics , time_dim, web_page where ws_sold_time_sk = 
time_dim.t_time_sk and ws_ship_hdemo_sk = household_demographics.hd_demo_sk and 
ws_web_page_sk = web_page.wp_web_page_sk and time_dim.t_hour between 6 and 6+1 
and household_demographics.hd_dep_count = 8 and web_page.wp_char_count between 
5000 and 5200) at, ( select count(*) pmc from web_sales, household_demographics 
, time_dim, web_page where ws_sold_time_sk = time_dim.t_time_sk and 
ws_ship_hdemo_sk = household_demographics.hd_demo_sk and ws_web_page_sk = 
web_page.wp_web_page_sk and time_dim.t_hour between 14 and 14+1 and 
household_demographics.hd_dep_count = 8 and web_page.wp_char_count between 5000 
and 5200) pt order by am_pm_ratio limit 100
@@ -22,159 +22,159 @@ Stage-0
       limit:100
       Stage-1
          Reducer 7
-         File Output Operator [FS_72]
+         File Output Operator [FS_60]
             compressed:false
             Statistics:Num rows: 1 Data size: 8 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_71]
+            Limit [LIM_59]
                Number of rows:100
                Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE 
Column stats: NONE
-               Select Operator [SEL_70]
+               Select Operator [SEL_58]
                |  outputColumnNames:["_col0"]
                |  Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE 
Column stats: NONE
                |<-Reducer 6 [SIMPLE_EDGE]
-                  Reduce Output Operator [RS_69]
+                  Reduce Output Operator [RS_57]
                      key expressions:_col0 (type: decimal(35,20))
                      sort order:+
                      Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE 
Column stats: NONE
-                     Select Operator [SEL_68]
+                     Select Operator [SEL_56]
                         outputColumnNames:["_col0"]
                         Statistics:Num rows: 1 Data size: 8 Basic stats: 
COMPLETE Column stats: NONE
-                        Merge Join Operator [MERGEJOIN_106]
+                        Merge Join Operator [MERGEJOIN_93]
                         |  condition map:[{"":"Inner Join 0 to 1"}]
                         |  keys:{}
                         |  outputColumnNames:["_col0","_col1"]
                         |  Statistics:Num rows: 1 Data size: 8 Basic stats: 
COMPLETE Column stats: NONE
                         |<-Reducer 15 [SIMPLE_EDGE]
-                        |  Reduce Output Operator [RS_66]
+                        |  Reduce Output Operator [RS_54]
                         |     sort order:
                         |     Statistics:Num rows: 1 Data size: 8 Basic stats: 
COMPLETE Column stats: NONE
                         |     value expressions:_col0 (type: bigint)
-                        |     Group By Operator [GBY_62]
+                        |     Group By Operator [GBY_50]
                         |     |  aggregations:["count(VALUE._col0)"]
                         |     |  outputColumnNames:["_col0"]
                         |     |  Statistics:Num rows: 1 Data size: 8 Basic 
stats: COMPLETE Column stats: NONE
                         |     |<-Reducer 14 [SIMPLE_EDGE]
-                        |        Reduce Output Operator [RS_61]
+                        |        Reduce Output Operator [RS_49]
                         |           sort order:
                         |           Statistics:Num rows: 1 Data size: 8 Basic 
stats: COMPLETE Column stats: NONE
                         |           value expressions:_col0 (type: bigint)
-                        |           Group By Operator [GBY_60]
+                        |           Group By Operator [GBY_48]
                         |              aggregations:["count()"]
                         |              outputColumnNames:["_col0"]
                         |              Statistics:Num rows: 1 Data size: 8 
Basic stats: COMPLETE Column stats: NONE
-                        |              Merge Join Operator [MERGEJOIN_105]
+                        |              Merge Join Operator [MERGEJOIN_92]
                         |              |  condition map:[{"":"Inner Join 0 to 
1"}]
                         |              |  keys:{"0":"_col2 (type: 
int)","1":"_col0 (type: int)"}
                         |              |  Statistics:Num rows: 52272 Data 
size: 24620112 Basic stats: COMPLETE Column stats: NONE
                         |              |<-Map 18 [SIMPLE_EDGE]
-                        |              |  Reduce Output Operator [RS_57]
+                        |              |  Reduce Output Operator [RS_45]
                         |              |     key expressions:_col0 (type: int)
                         |              |     Map-reduce partition 
columns:_col0 (type: int)
                         |              |     sort order:+
                         |              |     Statistics:Num rows: 2301 Data 
size: 1348089 Basic stats: COMPLETE Column stats: NONE
-                        |              |     Select Operator [SEL_43]
+                        |              |     Select Operator [SEL_37]
                         |              |        outputColumnNames:["_col0"]
                         |              |        Statistics:Num rows: 2301 Data 
size: 1348089 Basic stats: COMPLETE Column stats: NONE
-                        |              |        Filter Operator [FIL_99]
+                        |              |        Filter Operator [FIL_86]
                         |              |           predicate:(wp_char_count 
BETWEEN 5000 AND 5200 and wp_web_page_sk is not null) (type: boolean)
                         |              |           Statistics:Num rows: 2301 
Data size: 1348089 Basic stats: COMPLETE Column stats: NONE
-                        |              |           TableScan [TS_41]
+                        |              |           TableScan [TS_35]
                         |              |              alias:web_page
                         |              |              Statistics:Num rows: 
4602 Data size: 2696178 Basic stats: COMPLETE Column stats: NONE
                         |              |<-Reducer 13 [SIMPLE_EDGE]
-                        |                 Reduce Output Operator [RS_55]
+                        |                 Reduce Output Operator [RS_44]
                         |                    key expressions:_col2 (type: int)
                         |                    Map-reduce partition 
columns:_col2 (type: int)
                         |                    sort order:+
                         |                    Statistics:Num rows: 47520 Data 
size: 22381920 Basic stats: COMPLETE Column stats: NONE
-                        |                    Merge Join Operator 
[MERGEJOIN_104]
+                        |                    Merge Join Operator [MERGEJOIN_91]
                         |                    |  condition map:[{"":"Inner Join 
0 to 1"}]
                         |                    |  keys:{"0":"_col0 (type: 
int)","1":"_col0 (type: int)"}
                         |                    |  outputColumnNames:["_col2"]
                         |                    |  Statistics:Num rows: 47520 
Data size: 22381920 Basic stats: COMPLETE Column stats: NONE
                         |                    |<-Map 17 [SIMPLE_EDGE]
-                        |                    |  Reduce Output Operator [RS_52]
+                        |                    |  Reduce Output Operator [RS_42]
                         |                    |     key expressions:_col0 
(type: int)
                         |                    |     Map-reduce partition 
columns:_col0 (type: int)
                         |                    |     sort order:+
                         |                    |     Statistics:Num rows: 43200 
Data size: 20347200 Basic stats: COMPLETE Column stats: NONE
-                        |                    |     Select Operator [SEL_40]
+                        |                    |     Select Operator [SEL_34]
                         |                    |        
outputColumnNames:["_col0"]
                         |                    |        Statistics:Num rows: 
43200 Data size: 20347200 Basic stats: COMPLETE Column stats: NONE
-                        |                    |        Filter Operator [FIL_98]
+                        |                    |        Filter Operator [FIL_85]
                         |                    |           predicate:(t_hour 
BETWEEN 14 AND 15 and t_time_sk is not null) (type: boolean)
                         |                    |           Statistics:Num rows: 
43200 Data size: 20347200 Basic stats: COMPLETE Column stats: NONE
-                        |                    |           TableScan [TS_38]
+                        |                    |           TableScan [TS_32]
                         |                    |              alias:time_dim
                         |                    |              Statistics:Num 
rows: 86400 Data size: 40694400 Basic stats: COMPLETE Column stats: NONE
                         |                    |<-Reducer 12 [SIMPLE_EDGE]
-                        |                       Reduce Output Operator [RS_50]
+                        |                       Reduce Output Operator [RS_41]
                         |                          key expressions:_col0 
(type: int)
                         |                          Map-reduce partition 
columns:_col0 (type: int)
                         |                          sort order:+
                         |                          Statistics:Num rows: 3960 
Data size: 423720 Basic stats: COMPLETE Column stats: NONE
                         |                          value expressions:_col2 
(type: int)
-                        |                          Merge Join Operator 
[MERGEJOIN_103]
+                        |                          Merge Join Operator 
[MERGEJOIN_90]
                         |                          |  condition 
map:[{"":"Inner Join 0 to 1"}]
                         |                          |  keys:{"0":"_col1 (type: 
int)","1":"_col0 (type: int)"}
                         |                          |  
outputColumnNames:["_col0","_col2"]
                         |                          |  Statistics:Num rows: 
3960 Data size: 423720 Basic stats: COMPLETE Column stats: NONE
                         |                          |<-Map 11 [SIMPLE_EDGE]
-                        |                          |  Reduce Output Operator 
[RS_45]
+                        |                          |  Reduce Output Operator 
[RS_38]
                         |                          |     key expressions:_col1 
(type: int)
                         |                          |     Map-reduce partition 
columns:_col1 (type: int)
                         |                          |     sort order:+
                         |                          |     Statistics:Num rows: 
1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                         |                          |     value 
expressions:_col0 (type: int), _col2 (type: int)
-                        |                          |     Select Operator 
[SEL_34]
+                        |                          |     Select Operator 
[SEL_28]
                         |                          |        
outputColumnNames:["_col0","_col1","_col2"]
                         |                          |        Statistics:Num 
rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                        |                          |        Filter Operator 
[FIL_96]
+                        |                          |        Filter Operator 
[FIL_83]
                         |                          |           
predicate:((ws_ship_hdemo_sk is not null and ws_sold_time_sk is not null) and 
ws_web_page_sk is not null) (type: boolean)
                         |                          |           Statistics:Num 
rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                        |                          |           TableScan 
[TS_32]
+                        |                          |           TableScan 
[TS_26]
                         |                          |              
alias:web_sales
                         |                          |              
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                         |                          |<-Map 16 [SIMPLE_EDGE]
-                        |                             Reduce Output Operator 
[RS_47]
+                        |                             Reduce Output Operator 
[RS_39]
                         |                                key expressions:_col0 
(type: int)
                         |                                Map-reduce partition 
columns:_col0 (type: int)
                         |                                sort order:+
                         |                                Statistics:Num rows: 
3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE
-                        |                                Select Operator 
[SEL_37]
+                        |                                Select Operator 
[SEL_31]
                         |                                   
outputColumnNames:["_col0"]
                         |                                   Statistics:Num 
rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE
-                        |                                   Filter Operator 
[FIL_97]
+                        |                                   Filter Operator 
[FIL_84]
                         |                                      
predicate:((hd_dep_count = 8) and hd_demo_sk is not null) (type: boolean)
                         |                                      Statistics:Num 
rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE
-                        |                                      TableScan 
[TS_35]
+                        |                                      TableScan 
[TS_29]
                         |                                         
alias:household_demographics
                         |                                         
Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: 
NONE
                         |<-Reducer 5 [SIMPLE_EDGE]
-                           Reduce Output Operator [RS_65]
+                           Reduce Output Operator [RS_53]
                               sort order:
                               Statistics:Num rows: 1 Data size: 8 Basic stats: 
COMPLETE Column stats: NONE
                               value expressions:_col0 (type: bigint)
-                              Group By Operator [GBY_30]
+                              Group By Operator [GBY_24]
                               |  aggregations:["count(VALUE._col0)"]
                               |  outputColumnNames:["_col0"]
                               |  Statistics:Num rows: 1 Data size: 8 Basic 
stats: COMPLETE Column stats: NONE
                               |<-Reducer 4 [SIMPLE_EDGE]
-                                 Reduce Output Operator [RS_29]
+                                 Reduce Output Operator [RS_23]
                                     sort order:
                                     Statistics:Num rows: 1 Data size: 8 Basic 
stats: COMPLETE Column stats: NONE
                                     value expressions:_col0 (type: bigint)
-                                    Group By Operator [GBY_28]
+                                    Group By Operator [GBY_22]
                                        aggregations:["count()"]
                                        outputColumnNames:["_col0"]
                                        Statistics:Num rows: 1 Data size: 8 
Basic stats: COMPLETE Column stats: NONE
-                                       Merge Join Operator [MERGEJOIN_102]
+                                       Merge Join Operator [MERGEJOIN_89]
                                        |  condition map:[{"":"Inner Join 0 to 
1"}]
                                        |  keys:{"0":"_col2 (type: 
int)","1":"_col0 (type: int)"}
                                        |  Statistics:Num rows: 52272 Data 
size: 24620112 Basic stats: COMPLETE Column stats: NONE
                                        |<-Map 10 [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:+
@@ -182,25 +182,25 @@ Stage-0
                                        |     Select Operator [SEL_11]
                                        |        outputColumnNames:["_col0"]
                                        |        Statistics:Num rows: 2301 Data 
size: 1348089 Basic stats: COMPLETE Column stats: NONE
-                                       |        Filter Operator [FIL_95]
+                                       |        Filter Operator [FIL_82]
                                        |           predicate:(wp_char_count 
BETWEEN 5000 AND 5200 and wp_web_page_sk is not null) (type: boolean)
                                        |           Statistics:Num rows: 2301 
Data size: 1348089 Basic stats: COMPLETE Column stats: NONE
                                        |           TableScan [TS_9]
                                        |              alias:web_page
                                        |              Statistics:Num rows: 
4602 Data size: 2696178 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: 47520 Data 
size: 22381920 Basic stats: COMPLETE Column stats: NONE
-                                             Merge Join Operator 
[MERGEJOIN_101]
+                                             Merge Join Operator [MERGEJOIN_88]
                                              |  condition map:[{"":"Inner Join 
0 to 1"}]
                                              |  keys:{"0":"_col0 (type: 
int)","1":"_col0 (type: int)"}
                                              |  outputColumnNames:["_col2"]
                                              |  Statistics:Num rows: 47520 
Data size: 22381920 Basic stats: COMPLETE Column stats: NONE
                                              |<-Map 9 [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:+
@@ -208,26 +208,26 @@ Stage-0
                                              |     Select Operator [SEL_8]
                                              |        
outputColumnNames:["_col0"]
                                              |        Statistics:Num rows: 
43200 Data size: 20347200 Basic stats: COMPLETE Column stats: NONE
-                                             |        Filter Operator [FIL_94]
+                                             |        Filter Operator [FIL_81]
                                              |           predicate:(t_time_sk 
is not null and t_hour BETWEEN 6 AND 7) (type: boolean)
                                              |           Statistics:Num rows: 
43200 Data size: 20347200 Basic stats: COMPLETE Column stats: NONE
                                              |           TableScan [TS_6]
                                              |              alias:time_dim
                                              |              Statistics:Num 
rows: 86400 Data size: 40694400 Basic stats: COMPLETE Column stats: NONE
                                              |<-Reducer 2 [SIMPLE_EDGE]
-                                                Reduce Output Operator [RS_18]
+                                                Reduce Output Operator [RS_15]
                                                    key expressions:_col0 
(type: int)
                                                    Map-reduce partition 
columns:_col0 (type: int)
                                                    sort order:+
                                                    Statistics:Num rows: 3960 
Data size: 423720 Basic stats: COMPLETE Column stats: NONE
                                                    value expressions:_col2 
(type: int)
-                                                   Merge Join Operator 
[MERGEJOIN_100]
+                                                   Merge Join Operator 
[MERGEJOIN_87]
                                                    |  condition 
map:[{"":"Inner Join 0 to 1"}]
                                                    |  keys:{"0":"_col1 (type: 
int)","1":"_col0 (type: int)"}
                                                    |  
outputColumnNames:["_col0","_col2"]
                                                    |  Statistics:Num rows: 
3960 Data size: 423720 Basic stats: COMPLETE Column stats: NONE
                                                    |<-Map 1 [SIMPLE_EDGE]
-                                                   |  Reduce Output Operator 
[RS_13]
+                                                   |  Reduce Output Operator 
[RS_12]
                                                    |     key expressions:_col1 
(type: int)
                                                    |     Map-reduce partition 
columns:_col1 (type: int)
                                                    |     sort order:+
@@ -236,14 +236,14 @@ Stage-0
                                                    |     Select Operator 
[SEL_2]
                                                    |        
outputColumnNames:["_col0","_col1","_col2"]
                                                    |        Statistics:Num 
rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                   |        Filter Operator 
[FIL_92]
+                                                   |        Filter Operator 
[FIL_79]
                                                    |           
predicate:((ws_ship_hdemo_sk is not null and ws_sold_time_sk is not null) and 
ws_web_page_sk is not null) (type: boolean)
                                                    |           Statistics:Num 
rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                    |           TableScan [TS_0]
                                                    |              
alias:web_sales
                                                    |              
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                    |<-Map 8 [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:+
@@ -251,7 +251,7 @@ Stage-0
                                                          Select Operator 
[SEL_5]
                                                             
outputColumnNames:["_col0"]
                                                             Statistics:Num 
rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE
-                                                            Filter Operator 
[FIL_93]
+                                                            Filter Operator 
[FIL_80]
                                                                
predicate:((hd_dep_count = 8) and hd_demo_sk is not null) (type: boolean)
                                                                Statistics:Num 
rows: 3600 Data size: 385200 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/query91.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query91.q.out 
b/ql/src/test/results/clientpositive/perf/query91.q.out
index e2326b4..54f58e4 100644
--- a/ql/src/test/results/clientpositive/perf/query91.q.out
+++ b/ql/src/test/results/clientpositive/perf/query91.q.out
@@ -19,49 +19,49 @@ Stage-0
       limit:-1
       Stage-1
          Reducer 9
-         File Output Operator [FS_58]
+         File Output Operator [FS_46]
             compressed:false
             Statistics:Num rows: 58564004 Data size: 50366227250 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"}
-            Select Operator [SEL_57]
+            Select Operator [SEL_45]
             |  outputColumnNames:["_col0","_col1","_col2","_col3"]
             |  Statistics:Num rows: 58564004 Data size: 50366227250 Basic 
stats: COMPLETE Column stats: NONE
             |<-Reducer 8 [SIMPLE_EDGE]
-               Reduce Output Operator [RS_56]
+               Reduce Output Operator [RS_44]
                   key expressions:_col3 (type: decimal(17,2))
                   sort order:-
                   Statistics:Num rows: 58564004 Data size: 50366227250 Basic 
stats: COMPLETE Column stats: NONE
                   value expressions:_col0 (type: string), _col1 (type: 
string), _col2 (type: string)
-                  Select Operator [SEL_55]
+                  Select Operator [SEL_43]
                      outputColumnNames:["_col0","_col1","_col2","_col3"]
                      Statistics:Num rows: 58564004 Data size: 50366227250 
Basic stats: COMPLETE Column stats: NONE
-                     Group By Operator [GBY_54]
+                     Group By Operator [GBY_42]
                      |  aggregations:["sum(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","_col4","_col5"]
                      |  Statistics:Num rows: 58564004 Data size: 50366227250 
Basic stats: COMPLETE Column stats: NONE
                      |<-Reducer 7 [SIMPLE_EDGE]
-                        Reduce Output Operator [RS_53]
+                        Reduce Output Operator [RS_41]
                            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: 117128008 Data size: 
100732454500 Basic stats: COMPLETE Column stats: NONE
                            value expressions:_col5 (type: decimal(17,2))
-                           Group By Operator [GBY_52]
+                           Group By Operator [GBY_40]
                               aggregations:["sum(_col7)"]
                               keys:_col1 (type: string), _col2 (type: string), 
_col3 (type: string), _col18 (type: string), _col19 (type: string)
                               
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
                               Statistics:Num rows: 117128008 Data size: 
100732454500 Basic stats: COMPLETE Column stats: NONE
-                              Select Operator [SEL_51]
+                              Select Operator [SEL_39]
                                  
outputColumnNames:["_col1","_col2","_col3","_col18","_col19","_col7"]
                                  Statistics:Num rows: 117128008 Data size: 
100732454500 Basic stats: COMPLETE Column stats: NONE
-                                 Merge Join Operator [MERGEJOIN_98]
+                                 Merge Join Operator [MERGEJOIN_86]
                                  |  condition map:[{"":"Inner Join 0 to 1"}]
                                  |  keys:{"0":"_col13 (type: int)","1":"_col0 
(type: int)"}
                                  |  
outputColumnNames:["_col1","_col2","_col3","_col7","_col18","_col19"]
                                  |  Statistics:Num rows: 117128008 Data size: 
100732454500 Basic stats: COMPLETE Column stats: NONE
                                  |<-Map 15 [SIMPLE_EDGE]
-                                 |  Reduce Output Operator [RS_49]
+                                 |  Reduce Output Operator [RS_37]
                                  |     key expressions:_col0 (type: int)
                                  |     Map-reduce partition columns:_col0 
(type: int)
                                  |     sort order:+
@@ -69,26 +69,26 @@ Stage-0
                                  |     Select Operator [SEL_20]
                                  |        outputColumnNames:["_col0"]
                                  |        Statistics:Num rows: 3600 Data size: 
385200 Basic stats: COMPLETE Column stats: NONE
-                                 |        Filter Operator [FIL_92]
+                                 |        Filter Operator [FIL_80]
                                  |           predicate:(hd_demo_sk is not null 
and (hd_buy_potential like '0-500%')) (type: boolean)
                                  |           Statistics:Num rows: 3600 Data 
size: 385200 Basic stats: COMPLETE Column stats: NONE
                                  |           TableScan [TS_18]
                                  |              alias:household_demographics
                                  |              Statistics:Num rows: 7200 Data 
size: 770400 Basic stats: COMPLETE Column stats: NONE
                                  |<-Reducer 6 [SIMPLE_EDGE]
-                                    Reduce Output Operator [RS_47]
+                                    Reduce Output Operator [RS_36]
                                        key expressions:_col13 (type: int)
                                        Map-reduce partition columns:_col13 
(type: int)
                                        sort order:+
                                        Statistics:Num rows: 106480005 Data 
size: 91574956652 Basic stats: COMPLETE Column stats: NONE
                                        value expressions:_col1 (type: string), 
_col2 (type: string), _col3 (type: string), _col7 (type: decimal(7,2)), _col18 
(type: string), _col19 (type: string)
-                                       Merge Join Operator [MERGEJOIN_97]
+                                       Merge Join Operator [MERGEJOIN_85]
                                        |  condition map:[{"":"Inner Join 0 to 
1"}]
                                        |  keys:{"0":"_col12 (type: 
int)","1":"_col0 (type: int)"}
                                        |  
outputColumnNames:["_col1","_col2","_col3","_col7","_col13","_col18","_col19"]
                                        |  Statistics:Num rows: 106480005 Data 
size: 91574956652 Basic stats: COMPLETE Column stats: NONE
                                        |<-Map 14 [SIMPLE_EDGE]
-                                       |  Reduce Output Operator [RS_44]
+                                       |  Reduce Output Operator [RS_34]
                                        |     key expressions:_col0 (type: int)
                                        |     Map-reduce partition 
columns:_col0 (type: int)
                                        |     sort order:+
@@ -97,26 +97,26 @@ Stage-0
                                        |     Select Operator [SEL_17]
                                        |        
outputColumnNames:["_col0","_col1","_col2"]
                                        |        Statistics:Num rows: 9900 Data 
size: 3585529 Basic stats: COMPLETE Column stats: NONE
-                                       |        Filter Operator [FIL_91]
+                                       |        Filter Operator [FIL_79]
                                        |           
predicate:((((((cd_marital_status = 'M') and (cd_education_status = 'Unknown')) 
or ((cd_marital_status = 'W') and (cd_education_status = 'Advanced Degree'))) 
and ((cd_education_status = 'Unknown') or (cd_education_status = 'Advanced 
Degree'))) and ((cd_marital_status = 'M') or (cd_marital_status = 'W'))) and 
cd_demo_sk is not null) (type: boolean)
                                        |           Statistics:Num rows: 9900 
Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
                                        |           TableScan [TS_15]
                                        |              
alias:customer_demographics
                                        |              Statistics:Num rows: 
19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
                                        |<-Reducer 5 [SIMPLE_EDGE]
-                                          Reduce Output Operator [RS_42]
+                                          Reduce Output Operator [RS_33]
                                              key expressions:_col12 (type: int)
                                              Map-reduce partition 
columns:_col12 (type: int)
                                              sort order:+
                                              Statistics:Num rows: 96800003 
Data size: 83249958789 Basic stats: COMPLETE Column stats: NONE
                                              value expressions:_col1 (type: 
string), _col2 (type: string), _col3 (type: string), _col7 (type: 
decimal(7,2)), _col13 (type: int)
-                                             Merge Join Operator [MERGEJOIN_96]
+                                             Merge Join Operator [MERGEJOIN_84]
                                              |  condition map:[{"":"Inner Join 
0 to 1"}]
                                              |  keys:{"0":"_col14 (type: 
int)","1":"_col0 (type: int)"}
                                              |  
outputColumnNames:["_col1","_col2","_col3","_col7","_col12","_col13"]
                                              |  Statistics:Num rows: 96800003 
Data size: 83249958789 Basic stats: COMPLETE Column stats: NONE
                                              |<-Map 13 [SIMPLE_EDGE]
-                                             |  Reduce Output Operator [RS_39]
+                                             |  Reduce Output Operator [RS_31]
                                              |     key expressions:_col0 
(type: int)
                                              |     Map-reduce partition 
columns:_col0 (type: int)
                                              |     sort order:+
@@ -124,26 +124,26 @@ Stage-0
                                              |     Select Operator [SEL_14]
                                              |        
outputColumnNames:["_col0"]
                                              |        Statistics:Num rows: 
20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
-                                             |        Filter Operator [FIL_90]
+                                             |        Filter Operator [FIL_78]
                                              |           
predicate:((ca_gmt_offset = -7) and ca_address_sk is not null) (type: boolean)
                                              |           Statistics:Num rows: 
20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
                                              |           TableScan [TS_12]
                                              |              
alias:customer_address
                                              |              Statistics:Num 
rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
                                              |<-Reducer 4 [SIMPLE_EDGE]
-                                                Reduce Output Operator [RS_37]
+                                                Reduce Output Operator [RS_30]
                                                    key expressions:_col14 
(type: int)
                                                    Map-reduce partition 
columns:_col14 (type: int)
                                                    sort order:+
                                                    Statistics:Num rows: 
88000001 Data size: 75681779077 Basic stats: COMPLETE Column stats: NONE
                                                    value expressions:_col1 
(type: string), _col2 (type: string), _col3 (type: string), _col7 (type: 
decimal(7,2)), _col12 (type: int), _col13 (type: int)
-                                                   Merge Join Operator 
[MERGEJOIN_95]
+                                                   Merge Join Operator 
[MERGEJOIN_83]
                                                    |  condition 
map:[{"":"Inner Join 0 to 1"}]
                                                    |  keys:{"0":"_col5 (type: 
int)","1":"_col0 (type: int)"}
                                                    |  
outputColumnNames:["_col1","_col2","_col3","_col7","_col12","_col13","_col14"]
                                                    |  Statistics:Num rows: 
88000001 Data size: 75681779077 Basic stats: COMPLETE Column stats: NONE
                                                    |<-Map 12 [SIMPLE_EDGE]
-                                                   |  Reduce Output Operator 
[RS_34]
+                                                   |  Reduce Output Operator 
[RS_28]
                                                    |     key expressions:_col0 
(type: int)
                                                    |     Map-reduce partition 
columns:_col0 (type: int)
                                                    |     sort order:+
@@ -152,26 +152,26 @@ Stage-0
                                                    |     Select Operator 
[SEL_11]
                                                    |        
outputColumnNames:["_col0","_col1","_col2","_col3"]
                                                    |        Statistics:Num 
rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
-                                                   |        Filter Operator 
[FIL_89]
+                                                   |        Filter Operator 
[FIL_77]
                                                    |           
predicate:(((c_customer_sk is not null and c_current_addr_sk is not null) and 
c_current_cdemo_sk is not null) and c_current_hdemo_sk is not null) (type: 
boolean)
                                                    |           Statistics:Num 
rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
                                                    |           TableScan [TS_9]
                                                    |              
alias:customer
                                                    |              
Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE 
Column stats: NONE
                                                    |<-Reducer 3 [SIMPLE_EDGE]
-                                                      Reduce Output Operator 
[RS_32]
+                                                      Reduce Output Operator 
[RS_27]
                                                          key expressions:_col5 
(type: int)
                                                          Map-reduce partition 
columns:_col5 (type: int)
                                                          sort order:+
                                                          Statistics:Num rows: 
20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
                                                          value 
expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), 
_col7 (type: decimal(7,2))
-                                                         Merge Join Operator 
[MERGEJOIN_94]
+                                                         Merge Join Operator 
[MERGEJOIN_82]
                                                          |  condition 
map:[{"":"Inner Join 0 to 1"}]
                                                          |  keys:{"0":"_col4 
(type: int)","1":"_col0 (type: int)"}
                                                          |  
outputColumnNames:["_col1","_col2","_col3","_col5","_col7"]
                                                          |  Statistics:Num 
rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
                                                          |<-Map 11 
[SIMPLE_EDGE]
-                                                         |  Reduce Output 
Operator [RS_29]
+                                                         |  Reduce Output 
Operator [RS_25]
                                                          |     key 
expressions:_col0 (type: int)
                                                          |     Map-reduce 
partition columns:_col0 (type: int)
                                                          |     sort order:+
@@ -179,26 +179,26 @@ Stage-0
                                                          |     Select Operator 
[SEL_8]
                                                          |        
outputColumnNames:["_col0"]
                                                          |        
Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column 
stats: NONE
-                                                         |        Filter 
Operator [FIL_88]
+                                                         |        Filter 
Operator [FIL_76]
                                                          |           
predicate:(((d_moy = 11) and d_date_sk is not null) and (d_year = 1999)) (type: 
boolean)
                                                          |           
Statistics:Num rows: 18262 Data size: 20435178 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_27]
+                                                            Reduce Output 
Operator [RS_24]
                                                                key 
expressions:_col4 (type: int)
                                                                Map-reduce 
partition columns:_col4 (type: int)
                                                                sort order:+
                                                                Statistics:Num 
rows: 66 Data size: 134970 Basic stats: COMPLETE Column stats: NONE
                                                                value 
expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), 
_col5 (type: int), _col7 (type: decimal(7,2))
-                                                               Merge Join 
Operator [MERGEJOIN_93]
+                                                               Merge Join 
Operator [MERGEJOIN_81]
                                                                |  condition 
map:[{"":"Inner Join 0 to 1"}]
                                                                |  
keys:{"0":"_col0 (type: int)","1":"_col2 (type: int)"}
                                                                |  
outputColumnNames:["_col1","_col2","_col3","_col4","_col5","_col7"]
                                                                |  
Statistics:Num rows: 66 Data size: 134970 Basic stats: COMPLETE Column stats: 
NONE
                                                                |<-Map 1 
[SIMPLE_EDGE]
-                                                               |  Reduce 
Output Operator [RS_22]
+                                                               |  Reduce 
Output Operator [RS_21]
                                                                |     key 
expressions:_col0 (type: int)
                                                                |     
Map-reduce partition columns:_col0 (type: int)
                                                                |     sort 
order:+
@@ -207,14 +207,14 @@ Stage-0
                                                                |     Select 
Operator [SEL_2]
                                                                |        
outputColumnNames:["_col0","_col1","_col2","_col3"]
                                                                |        
Statistics:Num rows: 60 Data size: 122700 Basic stats: COMPLETE Column stats: 
NONE
-                                                               |        Filter 
Operator [FIL_86]
+                                                               |        Filter 
Operator [FIL_74]
                                                                |           
predicate:cc_call_center_sk is not null (type: boolean)
                                                                |           
Statistics:Num rows: 60 Data size: 122700 Basic stats: COMPLETE Column stats: 
NONE
                                                                |           
TableScan [TS_0]
                                                                |              
alias:call_center
                                                                |              
Statistics:Num rows: 60 Data size: 122700 Basic stats: COMPLETE Column stats: 
NONE
                                                                |<-Map 10 
[SIMPLE_EDGE]
-                                                                  Reduce 
Output Operator [RS_24]
+                                                                  Reduce 
Output Operator [RS_22]
                                                                      key 
expressions:_col2 (type: int)
                                                                      
Map-reduce partition columns:_col2 (type: int)
                                                                      sort 
order:+
@@ -223,7 +223,7 @@ Stage-0
                                                                      Select 
Operator [SEL_5]
                                                                         
outputColumnNames:["_col0","_col1","_col2","_col3"]
                                                                         
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                                        Filter 
Operator [FIL_87]
+                                                                        Filter 
Operator [FIL_75]
                                                                            
predicate:((cr_call_center_sk is not null and cr_returned_date_sk is not null) 
and cr_returning_customer_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/query92.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query92.q.out 
b/ql/src/test/results/clientpositive/perf/query92.q.out
index 9ea3adc..6fb2133 100644
--- a/ql/src/test/results/clientpositive/perf/query92.q.out
+++ b/ql/src/test/results/clientpositive/perf/query92.q.out
@@ -17,61 +17,61 @@ Stage-0
       limit:-1
       Stage-1
          Reducer 5
-         File Output Operator [FS_41]
+         File Output Operator [FS_37]
             compressed:false
             Statistics:Num rows: 1 Data size: 24 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"}
-            Group By Operator [GBY_39]
+            Group By Operator [GBY_35]
             |  
aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"]
             |  outputColumnNames:["_col0","_col1","_col2"]
             |  Statistics:Num rows: 1 Data size: 24 Basic stats: COMPLETE 
Column stats: NONE
             |<-Reducer 4 [SIMPLE_EDGE]
-               Reduce Output Operator [RS_38]
+               Reduce Output Operator [RS_34]
                   sort order:
                   Statistics:Num rows: 1 Data size: 24 Basic stats: COMPLETE 
Column stats: NONE
                   value expressions:_col0 (type: bigint), _col1 (type: 
bigint), _col2 (type: bigint)
-                  Group By Operator [GBY_37]
+                  Group By Operator [GBY_33]
                      aggregations:["sum(_col0)","sum(_col1)","sum(_col2)"]
                      outputColumnNames:["_col0","_col1","_col2"]
                      Statistics:Num rows: 1 Data size: 24 Basic stats: 
COMPLETE Column stats: NONE
-                     Select Operator [SEL_35]
+                     Select Operator [SEL_31]
                         outputColumnNames:["_col0","_col1","_col2"]
                         Statistics:Num rows: 4909 Data size: 5493875 Basic 
stats: COMPLETE Column stats: NONE
-                        Merge Join Operator [MERGEJOIN_52]
+                        Merge Join Operator [MERGEJOIN_48]
                         |  condition map:[{"":"Outer Join 0 to 1"}]
                         |  keys:{"0":"_col0 (type: int), _col1 (type: 
int)","1":"_col0 (type: int), _col1 (type: int)"}
                         |  outputColumnNames:["_col0","_col2"]
                         |  Statistics:Num rows: 4909 Data size: 5493875 Basic 
stats: COMPLETE Column stats: NONE
                         |<-Reducer 3 [SIMPLE_EDGE]
-                        |  Reduce Output Operator [RS_32]
+                        |  Reduce Output Operator [RS_28]
                         |     key expressions:_col0 (type: int), _col1 (type: 
int)
                         |     Map-reduce partition columns:_col0 (type: int), 
_col1 (type: int)
                         |     sort order:++
                         |     Statistics:Num rows: 4463 Data size: 4994432 
Basic stats: COMPLETE Column stats: NONE
-                        |     Select Operator [SEL_15]
+                        |     Select Operator [SEL_13]
                         |        outputColumnNames:["_col0","_col1"]
                         |        Statistics:Num rows: 4463 Data size: 4994432 
Basic stats: COMPLETE Column stats: NONE
-                        |        Group By Operator [GBY_14]
+                        |        Group By Operator [GBY_12]
                         |        |  keys:KEY._col0 (type: int), KEY._col1 
(type: int)
                         |        |  outputColumnNames:["_col0","_col1"]
                         |        |  Statistics:Num rows: 4463 Data size: 
4994432 Basic stats: COMPLETE Column stats: NONE
                         |        |<-Reducer 2 [SIMPLE_EDGE]
-                        |           Reduce Output Operator [RS_13]
+                        |           Reduce Output Operator [RS_11]
                         |              key expressions:_col0 (type: int), 
_col1 (type: int)
                         |              Map-reduce partition columns:_col0 
(type: int), _col1 (type: int)
                         |              sort order:++
                         |              Statistics:Num rows: 8927 Data size: 
9989984 Basic stats: COMPLETE Column stats: NONE
-                        |              Group By Operator [GBY_12]
+                        |              Group By Operator [GBY_10]
                         |                 keys:_col1 (type: int), _col2 (type: 
int)
                         |                 outputColumnNames:["_col0","_col1"]
                         |                 Statistics:Num rows: 8927 Data size: 
9989984 Basic stats: COMPLETE Column stats: NONE
-                        |                 Merge Join Operator [MERGEJOIN_50]
+                        |                 Merge Join Operator [MERGEJOIN_46]
                         |                 |  condition map:[{"":"Inner Join 0 
to 1"}]
                         |                 |  keys:{"0":"_col0 (type: 
int)","1":"_col0 (type: int)"}
                         |                 |  
outputColumnNames:["_col1","_col2"]
                         |                 |  Statistics:Num rows: 8927 Data 
size: 9989984 Basic stats: COMPLETE Column stats: NONE
                         |                 |<-Map 1 [SIMPLE_EDGE]
-                        |                 |  Reduce Output Operator [RS_7]
+                        |                 |  Reduce Output Operator [RS_6]
                         |                 |     key expressions:_col0 (type: 
int)
                         |                 |     Map-reduce partition 
columns:_col0 (type: int)
                         |                 |     sort order:+
@@ -80,14 +80,14 @@ Stage-0
                         |                 |     Select Operator [SEL_2]
                         |                 |        
outputColumnNames:["_col0","_col1","_col2"]
                         |                 |        Statistics:Num rows: 1 Data 
size: 0 Basic stats: PARTIAL Column stats: NONE
-                        |                 |        Filter Operator [FIL_46]
+                        |                 |        Filter Operator [FIL_42]
                         |                 |           
predicate:ss_sold_date_sk is not null (type: boolean)
                         |                 |           Statistics:Num rows: 1 
Data size: 0 Basic stats: PARTIAL Column stats: NONE
                         |                 |           TableScan [TS_0]
                         |                 |              alias:ss
                         |                 |              Statistics:Num rows: 
1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                         |                 |<-Map 6 [SIMPLE_EDGE]
-                        |                    Reduce Output Operator [RS_9]
+                        |                    Reduce Output Operator [RS_7]
                         |                       key expressions:_col0 (type: 
int)
                         |                       Map-reduce partition 
columns:_col0 (type: int)
                         |                       sort order:+
@@ -95,66 +95,66 @@ Stage-0
                         |                       Select Operator [SEL_5]
                         |                          outputColumnNames:["_col0"]
                         |                          Statistics:Num rows: 8116 
Data size: 9081804 Basic stats: COMPLETE Column stats: NONE
-                        |                          Filter Operator [FIL_47]
+                        |                          Filter Operator [FIL_43]
                         |                             predicate:(((d_month_seq 
<= 1217) and d_date_sk is not null) and (d_month_seq >= 1206)) (type: boolean)
                         |                             Statistics:Num rows: 
8116 Data size: 9081804 Basic stats: COMPLETE Column stats: NONE
                         |                             TableScan [TS_3]
                         |                                alias:d1
                         |                                Statistics:Num rows: 
73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
                         |<-Reducer 9 [SIMPLE_EDGE]
-                           Reduce Output Operator [RS_33]
+                           Reduce Output Operator [RS_29]
                               key expressions:_col0 (type: int), _col1 (type: 
int)
                               Map-reduce partition columns:_col0 (type: int), 
_col1 (type: int)
                               sort order:++
                               Statistics:Num rows: 4463 Data size: 4994432 
Basic stats: COMPLETE Column stats: NONE
-                              Group By Operator [GBY_30]
+                              Group By Operator [GBY_26]
                               |  keys:KEY._col0 (type: int), KEY._col1 (type: 
int)
                               |  outputColumnNames:["_col0","_col1"]
                               |  Statistics:Num rows: 4463 Data size: 4994432 
Basic stats: COMPLETE Column stats: NONE
                               |<-Reducer 8 [SIMPLE_EDGE]
-                                 Reduce Output Operator [RS_29]
+                                 Reduce Output Operator [RS_25]
                                     key expressions:_col0 (type: int), _col1 
(type: int)
                                     Map-reduce partition columns:_col0 (type: 
int), _col1 (type: int)
                                     sort order:++
                                     Statistics:Num rows: 8927 Data size: 
9989984 Basic stats: COMPLETE Column stats: NONE
-                                    Group By Operator [GBY_28]
+                                    Group By Operator [GBY_24]
                                        keys:_col1 (type: int), _col2 (type: 
int)
                                        outputColumnNames:["_col0","_col1"]
                                        Statistics:Num rows: 8927 Data size: 
9989984 Basic stats: COMPLETE Column stats: NONE
-                                       Merge Join Operator [MERGEJOIN_51]
+                                       Merge Join Operator [MERGEJOIN_47]
                                        |  condition map:[{"":"Inner Join 0 to 
1"}]
                                        |  keys:{"0":"_col0 (type: 
int)","1":"_col0 (type: int)"}
                                        |  outputColumnNames:["_col1","_col2"]
                                        |  Statistics:Num rows: 8927 Data size: 
9989984 Basic stats: COMPLETE Column stats: NONE
                                        |<-Map 10 [SIMPLE_EDGE]
-                                       |  Reduce Output Operator [RS_25]
+                                       |  Reduce Output Operator [RS_21]
                                        |     key expressions:_col0 (type: int)
                                        |     Map-reduce partition 
columns:_col0 (type: int)
                                        |     sort order:+
                                        |     Statistics:Num rows: 8116 Data 
size: 9081804 Basic stats: COMPLETE Column stats: NONE
-                                       |     Select Operator [SEL_21]
+                                       |     Select Operator [SEL_19]
                                        |        outputColumnNames:["_col0"]
                                        |        Statistics:Num rows: 8116 Data 
size: 9081804 Basic stats: COMPLETE Column stats: NONE
-                                       |        Filter Operator [FIL_49]
+                                       |        Filter Operator [FIL_45]
                                        |           predicate:(((d_month_seq <= 
1217) and d_date_sk is not null) and (d_month_seq >= 1206)) (type: boolean)
                                        |           Statistics:Num rows: 8116 
Data size: 9081804 Basic stats: COMPLETE Column stats: NONE
-                                       |           TableScan [TS_19]
+                                       |           TableScan [TS_17]
                                        |              alias:d1
                                        |              Statistics:Num rows: 
73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
                                        |<-Map 7 [SIMPLE_EDGE]
-                                          Reduce Output Operator [RS_23]
+                                          Reduce Output Operator [RS_20]
                                              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), _col2 (type: int)
-                                             Select Operator [SEL_18]
+                                             Select Operator [SEL_16]
                                                 
outputColumnNames:["_col0","_col1","_col2"]
                                                 Statistics:Num rows: 1 Data 
size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                Filter Operator [FIL_48]
+                                                Filter Operator [FIL_44]
                                                    predicate:cs_sold_date_sk 
is not null (type: boolean)
                                                    Statistics:Num rows: 1 Data 
size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                   TableScan [TS_16]
+                                                   TableScan [TS_14]
                                                       alias:cs
                                                       Statistics:Num rows: 1 
Data size: 0 Basic stats: PARTIAL Column stats: NONE
 

Reply via email to