http://git-wip-us.apache.org/repos/asf/hive/blob/5553c59e/ql/src/test/results/clientpositive/perf/tez/constraints/query72.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/perf/tez/constraints/query72.q.out 
b/ql/src/test/results/clientpositive/perf/tez/constraints/query72.q.out
index c17750d..fe82eda 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query72.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query72.q.out
@@ -81,217 +81,215 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Map 10 <- Reducer 18 (BROADCAST_EDGE), Reducer 20 (BROADCAST_EDGE), Reducer 22 
(BROADCAST_EDGE)
-Reducer 11 <- Map 10 (SIMPLE_EDGE), Map 17 (SIMPLE_EDGE)
-Reducer 12 <- Map 19 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
-Reducer 13 <- Map 21 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE)
-Reducer 14 <- Map 23 (SIMPLE_EDGE), Reducer 13 (SIMPLE_EDGE)
-Reducer 15 <- Map 24 (SIMPLE_EDGE), Reducer 14 (SIMPLE_EDGE)
-Reducer 16 <- Map 25 (SIMPLE_EDGE), Reducer 15 (SIMPLE_EDGE)
-Reducer 18 <- Map 17 (CUSTOM_SIMPLE_EDGE)
-Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
-Reducer 20 <- Map 19 (CUSTOM_SIMPLE_EDGE)
-Reducer 22 <- Map 21 (CUSTOM_SIMPLE_EDGE)
-Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
-Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
-Reducer 6 <- Map 5 (SIMPLE_EDGE), Map 9 (SIMPLE_EDGE)
-Reducer 7 <- Reducer 16 (ONE_TO_ONE_EDGE), Reducer 6 (SIMPLE_EDGE)
-Reducer 8 <- Map 26 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Map 1 <- Reducer 14 (BROADCAST_EDGE), Reducer 16 (BROADCAST_EDGE), Reducer 19 
(BROADCAST_EDGE)
+Reducer 10 <- Map 26 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Reducer 10 (SIMPLE_EDGE)
+Reducer 12 <- Reducer 11 (SIMPLE_EDGE)
+Reducer 14 <- Map 13 (CUSTOM_SIMPLE_EDGE)
+Reducer 16 <- Map 15 (CUSTOM_SIMPLE_EDGE)
+Reducer 18 <- Map 17 (SIMPLE_EDGE), Map 20 (SIMPLE_EDGE)
+Reducer 19 <- Reducer 18 (CUSTOM_SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE)
+Reducer 3 <- Map 15 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 18 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 21 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Map 22 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Map 23 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Map 24 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Map 25 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
     limit:100
     Stage-1
-      Reducer 4 vectorized
-      File Output Operator [FS_294]
-        Limit [LIM_293] (rows=100 width=312)
+      Reducer 12 vectorized
+      File Output Operator [FS_287]
+        Limit [LIM_286] (rows=100 width=312)
           Number of rows:100
-          Select Operator [SEL_292] (rows=384313734 width=312)
+          Select Operator [SEL_285] (rows=193558220 width=312)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-          <-Reducer 3 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_291]
-              Group By Operator [GBY_290] (rows=384313734 width=312)
+          <-Reducer 11 [SIMPLE_EDGE] vectorized
+            SHUFFLE [RS_284]
+              Group By Operator [GBY_283] (rows=193558220 width=312)
                 
Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(VALUE._col0)","count(VALUE._col1)","count(VALUE._col2)"],keys:KEY._col0,
 KEY._col1, KEY._col2
-              <-Reducer 2 [SIMPLE_EDGE]
+              <-Reducer 10 [SIMPLE_EDGE]
                 SHUFFLE [RS_64]
                   PartitionCols:_col0, _col1, _col2
-                  Group By Operator [GBY_63] (rows=1574305390 width=312)
+                  Group By Operator [GBY_63] (rows=193558220 width=312)
                     
Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(_col3)","count(_col4)","count()"],keys:_col0,
 _col1, _col2
-                    Select Operator [SEL_61] (rows=1574305390 width=292)
+                    Select Operator [SEL_61] (rows=499184560 width=292)
                       Output:["_col0","_col1","_col2","_col3","_col4"]
-                      Merge Join Operator [MERGEJOIN_247] (rows=1574305390 
width=292)
-                        Conds:RS_249._col0, _col1=RS_59._col4, _col6(Right 
Outer),Output:["_col15","_col17","_col21","_col27"]
-                      <-Map 1 [SIMPLE_EDGE] vectorized
-                        SHUFFLE [RS_249]
+                      Merge Join Operator [MERGEJOIN_243] (rows=499184560 
width=292)
+                        Conds:RS_58._col4, _col6=RS_282._col0, _col1(Left 
Outer),Output:["_col13","_col15","_col19","_col25"]
+                      <-Map 26 [SIMPLE_EDGE] vectorized
+                        SHUFFLE [RS_282]
                           PartitionCols:_col0, _col1
-                          Select Operator [SEL_248] (rows=28798881 width=8)
+                          Select Operator [SEL_281] (rows=28798881 width=8)
                             Output:["_col0","_col1"]
-                            TableScan [TS_0] (rows=28798881 width=8)
+                            TableScan [TS_56] (rows=28798881 width=8)
                               
default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["cr_item_sk","cr_order_number"]
-                      <-Reducer 8 [SIMPLE_EDGE]
-                        SHUFFLE [RS_59]
+                      <-Reducer 9 [SIMPLE_EDGE]
+                        SHUFFLE [RS_58]
                           PartitionCols:_col4, _col6
-                          Select Operator [SEL_57] (rows=610435044 width=300)
+                          Select Operator [SEL_55] (rows=193558220 width=300)
                             
Output:["_col4","_col6","_col13","_col15","_col19","_col25"]
-                            Merge Join Operator [MERGEJOIN_246] 
(rows=610435044 width=300)
-                              Conds:RS_54._col0, _col19=RS_289._col0, 
_col1(Inner),Output:["_col5","_col7","_col14","_col16","_col19","_col23"]
-                            <-Map 26 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_289]
-                                PartitionCols:_col0, _col1
-                                Select Operator [SEL_288] (rows=73049 width=8)
-                                  Output:["_col0","_col1"]
-                                  Filter Operator [FIL_287] (rows=73049 
width=8)
-                                    predicate:d_week_seq is not null
-                                    TableScan [TS_44] (rows=73049 width=8)
-                                      
default@date_dim,d2,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_week_seq"]
-                            <-Reducer 7 [SIMPLE_EDGE]
-                              SHUFFLE [RS_54]
-                                PartitionCols:_col0, _col19
-                                Filter Operator [FIL_53] (rows=545947820 
width=311)
-                                  predicate:(_col3 < _col17)
-                                  Merge Join Operator [MERGEJOIN_245] 
(rows=1637843460 width=311)
-                                    
Conds:RS_50._col1=RS_51._col8(Inner),Output:["_col0","_col3","_col5","_col7","_col14","_col16","_col17","_col19","_col23"]
-                                  <-Reducer 16 [ONE_TO_ONE_EDGE]
-                                    FORWARD [RS_51]
-                                      PartitionCols:_col8
-                                      Select Operator [SEL_43] (rows=2726340 
width=203)
-                                        
Output:["_col1","_col8","_col10","_col11","_col13","_col17"]
-                                        Merge Join Operator [MERGEJOIN_244] 
(rows=2726340 width=203)
-                                          
Conds:RS_40._col4=RS_286._col0(Inner),Output:["_col4","_col6","_col7","_col9","_col15","_col17"]
-                                        <-Map 25 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_286]
-                                            PartitionCols:_col0
-                                            Select Operator [SEL_285] 
(rows=462000 width=188)
-                                              Output:["_col0","_col1"]
-                                              TableScan [TS_22] (rows=462000 
width=188)
-                                                
default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_item_desc"]
-                                        <-Reducer 15 [SIMPLE_EDGE]
-                                          SHUFFLE [RS_40]
-                                            PartitionCols:_col4
-                                            Merge Join Operator 
[MERGEJOIN_243] (rows=2726340 width=19)
-                                              
Conds:RS_37._col5=RS_284._col0(Left 
Outer),Output:["_col4","_col6","_col7","_col9","_col15"]
-                                            <-Map 24 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_284]
-                                                PartitionCols:_col0
-                                                Select Operator [SEL_283] 
(rows=2300 width=4)
-                                                  Output:["_col0"]
-                                                  TableScan [TS_20] (rows=2300 
width=4)
-                                                    
default@promotion,promotion,Tbl:COMPLETE,Col:COMPLETE,Output:["p_promo_sk"]
-                                            <-Reducer 14 [SIMPLE_EDGE]
-                                              SHUFFLE [RS_37]
-                                                PartitionCols:_col5
-                                                Filter Operator [FIL_36] 
(rows=2726340 width=34)
-                                                  predicate:(_col14 > _col10)
-                                                  Merge Join Operator 
[MERGEJOIN_242] (rows=8179022 width=34)
-                                                    
Conds:RS_33._col1=RS_282._col0(Inner),Output:["_col4","_col5","_col6","_col7","_col9","_col10","_col14"]
-                                                  <-Map 23 [SIMPLE_EDGE] 
vectorized
-                                                    SHUFFLE [RS_282]
-                                                      PartitionCols:_col0
-                                                      Select Operator 
[SEL_281] (rows=73049 width=12)
-                                                        
Output:["_col0","_col1"]
-                                                        TableScan [TS_18] 
(rows=73049 width=98)
-                                                          
default@date_dim,d3,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_date"]
-                                                  <-Reducer 13 [SIMPLE_EDGE]
-                                                    SHUFFLE [RS_33]
-                                                      PartitionCols:_col1
-                                                      Merge Join Operator 
[MERGEJOIN_241] (rows=8179022 width=29)
-                                                        
Conds:RS_30._col3=RS_272._col0(Inner),Output:["_col1","_col4","_col5","_col6","_col7","_col9","_col10"]
-                                                      <-Map 21 [SIMPLE_EDGE] 
vectorized
-                                                        PARTITION_ONLY_SHUFFLE 
[RS_272]
-                                                          PartitionCols:_col0
-                                                          Select Operator 
[SEL_271] (rows=1440 width=4)
-                                                            Output:["_col0"]
-                                                            Filter Operator 
[FIL_270] (rows=1440 width=96)
-                                                              
predicate:(hd_buy_potential = '1001-5000')
-                                                              TableScan 
[TS_15] (rows=7200 width=96)
-                                                                
default@household_demographics,household_demographics,Tbl:COMPLETE,Col:COMPLETE,Output:["hd_demo_sk","hd_buy_potential"]
-                                                      <-Reducer 12 
[SIMPLE_EDGE]
-                                                        SHUFFLE [RS_30]
-                                                          PartitionCols:_col3
-                                                          Merge Join Operator 
[MERGEJOIN_240] (rows=40895108 width=35)
-                                                            
Conds:RS_27._col2=RS_264._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col6","_col7","_col9","_col10"]
-                                                          <-Map 19 
[SIMPLE_EDGE] vectorized
-                                                            
PARTITION_ONLY_SHUFFLE [RS_264]
-                                                              
PartitionCols:_col0
-                                                              Select Operator 
[SEL_263] (rows=265971 width=4)
-                                                                
Output:["_col0"]
-                                                                Filter 
Operator [FIL_262] (rows=265971 width=89)
-                                                                  
predicate:(cd_marital_status = 'M')
-                                                                  TableScan 
[TS_12] (rows=1861800 width=89)
-                                                                    
default@customer_demographics,customer_demographics,Tbl:COMPLETE,Col:COMPLETE,Output:["cd_demo_sk","cd_marital_status"]
-                                                          <-Reducer 11 
[SIMPLE_EDGE]
-                                                            SHUFFLE [RS_27]
-                                                              
PartitionCols:_col2
-                                                              Merge Join 
Operator [MERGEJOIN_239] (rows=100076475 width=39)
-                                                                
Conds:RS_280._col0=RS_256._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col9","_col10"]
-                                                              <-Map 17 
[SIMPLE_EDGE] vectorized
-                                                                
PARTITION_ONLY_SHUFFLE [RS_256]
-                                                                  
PartitionCols:_col0
-                                                                  Select 
Operator [SEL_255] (rows=652 width=16)
-                                                                    
Output:["_col0","_col1","_col2"]
-                                                                    Filter 
Operator [FIL_254] (rows=652 width=106)
-                                                                      
predicate:((d_year = 2001) and d_week_seq is not null)
-                                                                      
TableScan [TS_9] (rows=73049 width=106)
-                                                                        
default@date_dim,d1,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_date","d_week_seq","d_year"]
-                                                              <-Map 10 
[SIMPLE_EDGE] vectorized
-                                                                SHUFFLE 
[RS_280]
-                                                                  
PartitionCols:_col0
-                                                                  Select 
Operator [SEL_279] (rows=282274763 width=31)
-                                                                    
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                                                                    Filter 
Operator [FIL_278] (rows=282274763 width=31)
-                                                                      
predicate:((cs_bill_cdemo_sk BETWEEN 
DynamicValue(RS_28_customer_demographics_cd_demo_sk_min) AND 
DynamicValue(RS_28_customer_demographics_cd_demo_sk_max) and 
in_bloom_filter(cs_bill_cdemo_sk, 
DynamicValue(RS_28_customer_demographics_cd_demo_sk_bloom_filter))) and 
(cs_bill_hdemo_sk BETWEEN 
DynamicValue(RS_31_household_demographics_hd_demo_sk_min) AND 
DynamicValue(RS_31_household_demographics_hd_demo_sk_max) and 
in_bloom_filter(cs_bill_hdemo_sk, 
DynamicValue(RS_31_household_demographics_hd_demo_sk_bloom_filter))) and 
(cs_sold_date_sk BETWEEN DynamicValue(RS_25_d1_d_date_sk_min) AND 
DynamicValue(RS_25_d1_d_date_sk_max) and in_bloom_filter(cs_sold_date_sk, 
DynamicValue(RS_25_d1_d_date_sk_bloom_filter))) and cs_bill_cdemo_sk is not 
null and cs_bill_hdemo_sk is not null and cs_ship_date_sk is not null and 
cs_sold_date_sk is not null)
-                                                                      
TableScan [TS_6] (rows=287989836 width=31)
-                                                                        
default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["cs_sold_date_sk","cs_ship_date_sk","cs_bill_cdemo_sk","cs_bill_hdemo_sk","cs_item_sk","cs_promo_sk","cs_order_number","cs_quantity"]
-                                                                      
<-Reducer 18 [BROADCAST_EDGE] vectorized
-                                                                        
BROADCAST [RS_261]
-                                                                          
Group By Operator [GBY_260] (rows=1 width=12)
-                                                                            
Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2,
 expectedEntries=1000000)"]
-                                                                          
<-Map 17 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                                            
PARTITION_ONLY_SHUFFLE [RS_259]
-                                                                              
Group By Operator [GBY_258] (rows=1 width=12)
-                                                                               
 
Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0,
 expectedEntries=1000000)"]
-                                                                               
 Select Operator [SEL_257] (rows=652 width=4)
-                                                                               
   Output:["_col0"]
-                                                                               
    Please refer to the previous Select Operator [SEL_255]
-                                                                      
<-Reducer 20 [BROADCAST_EDGE] vectorized
-                                                                        
BROADCAST [RS_269]
-                                                                          
Group By Operator [GBY_268] (rows=1 width=12)
-                                                                            
Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2,
 expectedEntries=1000000)"]
-                                                                          
<-Map 19 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                                            
PARTITION_ONLY_SHUFFLE [RS_267]
-                                                                              
Group By Operator [GBY_266] (rows=1 width=12)
-                                                                               
 
Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0,
 expectedEntries=1000000)"]
-                                                                               
 Select Operator [SEL_265] (rows=265971 width=4)
-                                                                               
   Output:["_col0"]
-                                                                               
    Please refer to the previous Select Operator [SEL_263]
-                                                                      
<-Reducer 22 [BROADCAST_EDGE] vectorized
-                                                                        
BROADCAST [RS_277]
-                                                                          
Group By Operator [GBY_276] (rows=1 width=12)
-                                                                            
Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2,
 expectedEntries=1000000)"]
-                                                                          
<-Map 21 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                                            
PARTITION_ONLY_SHUFFLE [RS_275]
-                                                                              
Group By Operator [GBY_274] (rows=1 width=12)
-                                                                               
 
Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0,
 expectedEntries=1000000)"]
-                                                                               
 Select Operator [SEL_273] (rows=1440 width=4)
-                                                                               
   Output:["_col0"]
-                                                                               
    Please refer to the previous Select Operator [SEL_271]
-                                  <-Reducer 6 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_50]
-                                      PartitionCols:_col1
-                                      Merge Join Operator [MERGEJOIN_238] 
(rows=37584000 width=111)
-                                        
Conds:RS_251._col2=RS_253._col0(Inner),Output:["_col0","_col1","_col3","_col5"]
-                                      <-Map 5 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_251]
-                                          PartitionCols:_col2
-                                          Select Operator [SEL_250] 
(rows=37584000 width=15)
-                                            
Output:["_col0","_col1","_col2","_col3"]
-                                            TableScan [TS_2] (rows=37584000 
width=15)
-                                              
default@inventory,inventory,Tbl:COMPLETE,Col:COMPLETE,Output:["inv_date_sk","inv_item_sk","inv_warehouse_sk","inv_quantity_on_hand"]
-                                      <-Map 9 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_253]
+                            Merge Join Operator [MERGEJOIN_242] 
(rows=193558220 width=300)
+                              Conds:RS_52._col5=RS_280._col0(Left 
Outer),Output:["_col4","_col6","_col13","_col20","_col24","_col25"]
+                            <-Map 25 [SIMPLE_EDGE] vectorized
+                              SHUFFLE [RS_280]
+                                PartitionCols:_col0
+                                Select Operator [SEL_279] (rows=2300 width=4)
+                                  Output:["_col0"]
+                                  TableScan [TS_27] (rows=2300 width=4)
+                                    
default@promotion,promotion,Tbl:COMPLETE,Col:COMPLETE,Output:["p_promo_sk"]
+                            <-Reducer 8 [SIMPLE_EDGE]
+                              SHUFFLE [RS_52]
+                                PartitionCols:_col5
+                                Merge Join Operator [MERGEJOIN_241] 
(rows=193558220 width=299)
+                                  
Conds:RS_49._col4=RS_278._col0(Inner),Output:["_col4","_col5","_col6","_col13","_col20","_col24"]
+                                <-Map 24 [SIMPLE_EDGE] vectorized
+                                  SHUFFLE [RS_278]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_277] (rows=462000 
width=188)
+                                      Output:["_col0","_col1"]
+                                      TableScan [TS_25] (rows=462000 width=188)
+                                        
default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_item_desc"]
+                                <-Reducer 7 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_49]
+                                    PartitionCols:_col4
+                                    Filter Operator [FIL_48] (rows=193558220 
width=131)
+                                      predicate:(_col22 > _col14)
+                                      Merge Join Operator [MERGEJOIN_240] 
(rows=580674662 width=131)
+                                        
Conds:RS_45._col1=RS_276._col0(Inner),Output:["_col4","_col5","_col6","_col13","_col14","_col20","_col22"]
+                                      <-Map 23 [SIMPLE_EDGE] vectorized
+                                        SHUFFLE [RS_276]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_252] (rows=27 
width=104)
+                                          Select Operator [SEL_275] 
(rows=73049 width=12)
                                             Output:["_col0","_col1"]
-                                            TableScan [TS_4] (rows=27 
width=104)
-                                              
default@warehouse,warehouse,Tbl:COMPLETE,Col:COMPLETE,Output:["w_warehouse_sk","w_warehouse_name"]
+                                            TableScan [TS_23] (rows=73049 
width=98)
+                                              
default@date_dim,d3,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_date"]
+                                      <-Reducer 6 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_45]
+                                          PartitionCols:_col1
+                                          Merge Join Operator [MERGEJOIN_239] 
(rows=580674662 width=127)
+                                            
Conds:RS_42._col17=RS_274._col0(Inner),Output:["_col1","_col4","_col5","_col6","_col13","_col14","_col20"]
+                                          <-Map 22 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_274]
+                                              PartitionCols:_col0
+                                              Select Operator [SEL_273] 
(rows=27 width=104)
+                                                Output:["_col0","_col1"]
+                                                TableScan [TS_21] (rows=27 
width=104)
+                                                  
default@warehouse,warehouse,Tbl:COMPLETE,Col:COMPLETE,Output:["w_warehouse_sk","w_warehouse_name"]
+                                          <-Reducer 5 [SIMPLE_EDGE]
+                                            SHUFFLE [RS_42]
+                                              PartitionCols:_col17
+                                              Filter Operator [FIL_41] 
(rows=580674662 width=39)
+                                                predicate:(_col18 < _col7)
+                                                Merge Join Operator 
[MERGEJOIN_238] (rows=1742023986 width=39)
+                                                  Conds:RS_38._col10, 
_col4=RS_272._col0, 
_col1(Inner),Output:["_col1","_col4","_col5","_col6","_col7","_col13","_col14","_col17","_col18"]
+                                                <-Map 21 [SIMPLE_EDGE] 
vectorized
+                                                  SHUFFLE [RS_272]
+                                                    PartitionCols:_col0, _col1
+                                                    Select Operator [SEL_271] 
(rows=37584000 width=15)
+                                                      
Output:["_col0","_col1","_col2","_col3"]
+                                                      TableScan [TS_19] 
(rows=37584000 width=15)
+                                                        
default@inventory,inventory,Tbl:COMPLETE,Col:COMPLETE,Output:["inv_date_sk","inv_item_sk","inv_warehouse_sk","inv_quantity_on_hand"]
+                                                <-Reducer 4 [SIMPLE_EDGE]
+                                                  SHUFFLE [RS_38]
+                                                    PartitionCols:_col10, _col4
+                                                    Merge Join Operator 
[MERGEJOIN_237] (rows=2899758 width=30)
+                                                      
Conds:RS_35._col0=RS_36._col2(Inner),Output:["_col1","_col4","_col5","_col6","_col7","_col10","_col13","_col14"]
+                                                    <-Reducer 18 [SIMPLE_EDGE]
+                                                      SHUFFLE [RS_36]
+                                                        PartitionCols:_col2
+                                                        Merge Join Operator 
[MERGEJOIN_236] (rows=3621 width=20)
+                                                          
Conds:RS_262._col1=RS_265._col1(Inner),Output:["_col0","_col2","_col3","_col4"]
+                                                        <-Map 17 [SIMPLE_EDGE] 
vectorized
+                                                          SHUFFLE [RS_262]
+                                                            PartitionCols:_col1
+                                                            Select Operator 
[SEL_261] (rows=73049 width=8)
+                                                              
Output:["_col0","_col1"]
+                                                              Filter Operator 
[FIL_260] (rows=73049 width=8)
+                                                                
predicate:d_week_seq is not null
+                                                                TableScan 
[TS_9] (rows=73049 width=8)
+                                                                  
default@date_dim,d2,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_week_seq"]
+                                                        <-Map 20 [SIMPLE_EDGE] 
vectorized
+                                                          SHUFFLE [RS_265]
+                                                            PartitionCols:_col1
+                                                            Select Operator 
[SEL_264] (rows=652 width=16)
+                                                              
Output:["_col0","_col1","_col2"]
+                                                              Filter Operator 
[FIL_263] (rows=652 width=106)
+                                                                
predicate:((d_year = 2001) and d_week_seq is not null)
+                                                                TableScan 
[TS_12] (rows=73049 width=106)
+                                                                  
default@date_dim,d1,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_date","d_week_seq","d_year"]
+                                                    <-Reducer 3 [SIMPLE_EDGE]
+                                                      SHUFFLE [RS_35]
+                                                        PartitionCols:_col0
+                                                        Merge Join Operator 
[MERGEJOIN_235] (rows=8179029 width=21)
+                                                          
Conds:RS_32._col3=RS_254._col0(Inner),Output:["_col0","_col1","_col4","_col5","_col6","_col7"]
+                                                        <-Map 15 [SIMPLE_EDGE] 
vectorized
+                                                          SHUFFLE [RS_254]
+                                                            PartitionCols:_col0
+                                                            Select Operator 
[SEL_253] (rows=1440 width=4)
+                                                              Output:["_col0"]
+                                                              Filter Operator 
[FIL_252] (rows=1440 width=96)
+                                                                
predicate:(hd_buy_potential = '1001-5000')
+                                                                TableScan 
[TS_6] (rows=7200 width=96)
+                                                                  
default@household_demographics,household_demographics,Tbl:COMPLETE,Col:COMPLETE,Output:["hd_demo_sk","hd_buy_potential"]
+                                                        <-Reducer 2 
[SIMPLE_EDGE]
+                                                          SHUFFLE [RS_32]
+                                                            PartitionCols:_col3
+                                                            Merge Join 
Operator [MERGEJOIN_234] (rows=40895144 width=27)
+                                                              
Conds:RS_270._col2=RS_246._col0(Inner),Output:["_col0","_col1","_col3","_col4","_col5","_col6","_col7"]
+                                                            <-Map 13 
[SIMPLE_EDGE] vectorized
+                                                              SHUFFLE [RS_246]
+                                                                
PartitionCols:_col0
+                                                                Select 
Operator [SEL_245] (rows=265971 width=4)
+                                                                  
Output:["_col0"]
+                                                                  Filter 
Operator [FIL_244] (rows=265971 width=89)
+                                                                    
predicate:(cd_marital_status = 'M')
+                                                                    TableScan 
[TS_3] (rows=1861800 width=89)
+                                                                      
default@customer_demographics,customer_demographics,Tbl:COMPLETE,Col:COMPLETE,Output:["cd_demo_sk","cd_marital_status"]
+                                                            <-Map 1 
[SIMPLE_EDGE] vectorized
+                                                              SHUFFLE [RS_270]
+                                                                
PartitionCols:_col2
+                                                                Select 
Operator [SEL_269] (rows=282274763 width=31)
+                                                                  
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+                                                                  Filter 
Operator [FIL_268] (rows=282274763 width=31)
+                                                                    
predicate:((cs_bill_cdemo_sk BETWEEN 
DynamicValue(RS_30_customer_demographics_cd_demo_sk_min) AND 
DynamicValue(RS_30_customer_demographics_cd_demo_sk_max) and 
in_bloom_filter(cs_bill_cdemo_sk, 
DynamicValue(RS_30_customer_demographics_cd_demo_sk_bloom_filter))) and 
(cs_bill_hdemo_sk BETWEEN 
DynamicValue(RS_33_household_demographics_hd_demo_sk_min) AND 
DynamicValue(RS_33_household_demographics_hd_demo_sk_max) and 
in_bloom_filter(cs_bill_hdemo_sk, 
DynamicValue(RS_33_household_demographics_hd_demo_sk_bloom_filter))) and 
(cs_sold_date_sk BETWEEN DynamicValue(RS_36_d1_d_date_sk_min) AND 
DynamicValue(RS_36_d1_d_date_sk_max) and in_bloom_filter(cs_sold_date_sk, 
DynamicValue(RS_36_d1_d_date_sk_bloom_filter))) and cs_bill_cdemo_sk is not 
null and cs_bill_hdemo_sk is not null and cs_ship_date_sk is not null and 
cs_sold_date_sk is not null)
+                                                                    TableScan 
[TS_0] (rows=287989836 width=31)
+                                                                      
default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["cs_sold_date_sk","cs_ship_date_sk","cs_bill_cdemo_sk","cs_bill_hdemo_sk","cs_item_sk","cs_promo_sk","cs_order_number","cs_quantity"]
+                                                                    <-Reducer 
14 [BROADCAST_EDGE] vectorized
+                                                                      
BROADCAST [RS_251]
+                                                                        Group 
By Operator [GBY_250] (rows=1 width=12)
+                                                                          
Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2,
 expectedEntries=1000000)"]
+                                                                        <-Map 
13 [CUSTOM_SIMPLE_EDGE] vectorized
+                                                                          
SHUFFLE [RS_249]
+                                                                            
Group By Operator [GBY_248] (rows=1 width=12)
+                                                                              
Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0,
 expectedEntries=1000000)"]
+                                                                              
Select Operator [SEL_247] (rows=265971 width=4)
+                                                                               
 Output:["_col0"]
+                                                                               
  Please refer to the previous Select Operator [SEL_245]
+                                                                    <-Reducer 
16 [BROADCAST_EDGE] vectorized
+                                                                      
BROADCAST [RS_259]
+                                                                        Group 
By Operator [GBY_258] (rows=1 width=12)
+                                                                          
Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2,
 expectedEntries=1000000)"]
+                                                                        <-Map 
15 [CUSTOM_SIMPLE_EDGE] vectorized
+                                                                          
SHUFFLE [RS_257]
+                                                                            
Group By Operator [GBY_256] (rows=1 width=12)
+                                                                              
Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0,
 expectedEntries=1000000)"]
+                                                                              
Select Operator [SEL_255] (rows=1440 width=4)
+                                                                               
 Output:["_col0"]
+                                                                               
  Please refer to the previous Select Operator [SEL_253]
+                                                                    <-Reducer 
19 [BROADCAST_EDGE] vectorized
+                                                                      
BROADCAST [RS_267]
+                                                                        Group 
By Operator [GBY_266] (rows=1 width=12)
+                                                                          
Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2,
 expectedEntries=1000000)"]
+                                                                        
<-Reducer 18 [CUSTOM_SIMPLE_EDGE]
+                                                                          
SHUFFLE [RS_138]
+                                                                            
Group By Operator [GBY_137] (rows=1 width=12)
+                                                                              
Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0,
 expectedEntries=1000000)"]
+                                                                              
Select Operator [SEL_136] (rows=3621 width=8)
+                                                                               
 Output:["_col0"]
+                                                                               
  Please refer to the previous Merge Join Operator [MERGEJOIN_236]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/5553c59e/ql/src/test/results/clientpositive/perf/tez/constraints/query74.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/perf/tez/constraints/query74.q.out 
b/ql/src/test/results/clientpositive/perf/tez/constraints/query74.q.out
index 12ed5c8..525217b 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query74.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query74.q.out
@@ -131,10 +131,10 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Map 1 <- Reducer 23 (BROADCAST_EDGE)
-Map 13 <- Reducer 25 (BROADCAST_EDGE)
+Map 1 <- Reducer 24 (BROADCAST_EDGE)
+Map 13 <- Reducer 23 (BROADCAST_EDGE)
 Map 17 <- Reducer 22 (BROADCAST_EDGE)
-Map 9 <- Reducer 24 (BROADCAST_EDGE)
+Map 9 <- Reducer 25 (BROADCAST_EDGE)
 Reducer 10 <- Map 21 (SIMPLE_EDGE), Map 9 (SIMPLE_EDGE)
 Reducer 11 <- Map 26 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE)
 Reducer 12 <- Reducer 11 (SIMPLE_EDGE)
@@ -164,16 +164,16 @@ Stage-0
       File Output Operator [FS_348]
         Limit [LIM_347] (rows=100 width=280)
           Number of rows:100
-          Select Operator [SEL_346] (rows=12248093 width=280)
+          Select Operator [SEL_346] (rows=12248094 width=280)
             Output:["_col0","_col1","_col2"]
           <-Reducer 7 [SIMPLE_EDGE]
             SHUFFLE [RS_89]
-              Select Operator [SEL_88] (rows=12248093 width=280)
+              Select Operator [SEL_88] (rows=12248094 width=280)
                 Output:["_col0","_col1","_col2"]
-                Filter Operator [FIL_87] (rows=12248093 width=732)
-                  predicate:CASE WHEN (_col3 is not null) THEN (CASE WHEN 
(_col6) THEN (((_col1 / _col5) > (_col10 / _col3))) ELSE ((null > (_col10 / 
_col3))) END) ELSE (CASE WHEN (_col6) THEN (((_col1 / _col5) > null)) ELSE 
(null) END) END
-                  Merge Join Operator [MERGEJOIN_283] (rows=24496186 width=732)
-                    
Conds:RS_84._col2=RS_345._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col8","_col9","_col10"]
+                Filter Operator [FIL_87] (rows=12248094 width=732)
+                  predicate:CASE WHEN (_col4 is not null) THEN (CASE WHEN 
(_col2) THEN (((_col6 / _col1) > (_col10 / _col4))) ELSE ((null > (_col10 / 
_col4))) END) ELSE (CASE WHEN (_col2) THEN (((_col6 / _col1) > null)) ELSE 
(null) END) END
+                  Merge Join Operator [MERGEJOIN_283] (rows=24496188 width=732)
+                    
Conds:RS_84._col3=RS_345._col0(Inner),Output:["_col1","_col2","_col4","_col6","_col7","_col8","_col9","_col10"]
                   <-Reducer 20 [SIMPLE_EDGE] vectorized
                     SHUFFLE [RS_345]
                       PartitionCols:_col0
@@ -229,96 +229,143 @@ Stage-0
                                                      Please refer to the 
previous Select Operator [SEL_287]
                   <-Reducer 6 [ONE_TO_ONE_EDGE]
                     FORWARD [RS_84]
-                      PartitionCols:_col2
-                      Merge Join Operator [MERGEJOIN_282] (rows=20485011 
width=440)
-                        
Conds:RS_81._col2=RS_338._col0(Inner),Output:["_col1","_col2","_col3","_col5","_col6"]
+                      PartitionCols:_col3
+                      Merge Join Operator [MERGEJOIN_282] (rows=20485012 
width=440)
+                        
Conds:RS_81._col3=RS_338._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6"]
                       <-Reducer 16 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_338]
                           PartitionCols:_col0
-                          Select Operator [SEL_337] (rows=17130654 width=216)
-                            Output:["_col0","_col1","_col2"]
-                            Filter Operator [FIL_336] (rows=17130654 width=212)
-                              predicate:(_col3 > 0)
-                              Select Operator [SEL_335] (rows=51391963 
width=212)
-                                Output:["_col0","_col3"]
-                                Group By Operator [GBY_334] (rows=51391963 
width=392)
-                                  
Output:["_col0","_col1","_col2","_col3"],aggregations:["max(VALUE._col0)"],keys:KEY._col0,
 KEY._col1, KEY._col2
-                                <-Reducer 15 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_55]
-                                    PartitionCols:_col0, _col1, _col2
-                                    Group By Operator [GBY_54] (rows=51391963 
width=392)
-                                      
Output:["_col0","_col1","_col2","_col3"],aggregations:["max(_col2)"],keys:_col5,
 _col6, _col7
-                                      Merge Join Operator [MERGEJOIN_278] 
(rows=51391963 width=391)
-                                        
Conds:RS_50._col1=RS_315._col0(Inner),Output:["_col2","_col5","_col6","_col7"]
-                                      <-Map 26 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_315]
+                          Select Operator [SEL_337] (rows=51391963 width=212)
+                            Output:["_col0","_col1"]
+                            Group By Operator [GBY_336] (rows=51391963 
width=392)
+                              
Output:["_col0","_col1","_col2","_col3"],aggregations:["max(VALUE._col0)"],keys:KEY._col0,
 KEY._col1, KEY._col2
+                            <-Reducer 15 [SIMPLE_EDGE]
+                              SHUFFLE [RS_56]
+                                PartitionCols:_col0, _col1, _col2
+                                Group By Operator [GBY_55] (rows=51391963 
width=392)
+                                  
Output:["_col0","_col1","_col2","_col3"],aggregations:["max(_col2)"],keys:_col5,
 _col6, _col7
+                                  Merge Join Operator [MERGEJOIN_278] 
(rows=51391963 width=391)
+                                    
Conds:RS_51._col1=RS_313._col0(Inner),Output:["_col2","_col5","_col6","_col7"]
+                                  <-Map 26 [SIMPLE_EDGE] vectorized
+                                    SHUFFLE [RS_313]
+                                      PartitionCols:_col0
+                                       Please refer to the previous Select 
Operator [SEL_311]
+                                  <-Reducer 14 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_51]
+                                      PartitionCols:_col1
+                                      Merge Join Operator [MERGEJOIN_277] 
(rows=51391963 width=115)
+                                        
Conds:RS_335._col0=RS_292._col0(Inner),Output:["_col1","_col2"]
+                                      <-Map 21 [SIMPLE_EDGE] vectorized
+                                        PARTITION_ONLY_SHUFFLE [RS_292]
                                           PartitionCols:_col0
-                                           Please refer to the previous Select 
Operator [SEL_311]
-                                      <-Reducer 14 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_50]
-                                          PartitionCols:_col1
-                                          Merge Join Operator [MERGEJOIN_277] 
(rows=51391963 width=115)
-                                            
Conds:RS_333._col0=RS_296._col0(Inner),Output:["_col1","_col2"]
-                                          <-Map 21 [SIMPLE_EDGE] vectorized
-                                            PARTITION_ONLY_SHUFFLE [RS_296]
-                                              PartitionCols:_col0
-                                              Select Operator [SEL_289] 
(rows=652 width=4)
-                                                Output:["_col0"]
-                                                Filter Operator [FIL_286] 
(rows=652 width=8)
-                                                  predicate:((d_year = 2001) 
and (d_year) IN (2001, 2002))
-                                                   Please refer to the 
previous TableScan [TS_62]
-                                          <-Map 13 [SIMPLE_EDGE] vectorized
-                                            SHUFFLE [RS_333]
-                                              PartitionCols:_col0
-                                              Select Operator [SEL_332] 
(rows=143930993 width=119)
-                                                
Output:["_col0","_col1","_col2"]
-                                                Filter Operator [FIL_331] 
(rows=143930993 width=119)
-                                                  predicate:((ws_sold_date_sk 
BETWEEN DynamicValue(RS_48_date_dim_d_date_sk_min) AND 
DynamicValue(RS_48_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, 
DynamicValue(RS_48_date_dim_d_date_sk_bloom_filter))) and ws_bill_customer_sk 
is not null and ws_sold_date_sk is not null)
-                                                  TableScan [TS_39] 
(rows=144002668 width=119)
-                                                    
default@web_sales,web_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ws_sold_date_sk","ws_bill_customer_sk","ws_net_paid"]
-                                                  <-Reducer 25 
[BROADCAST_EDGE] vectorized
-                                                    BROADCAST [RS_330]
-                                                      Group By Operator 
[GBY_329] (rows=1 width=12)
-                                                        
Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2,
 expectedEntries=1000000)"]
-                                                      <-Map 21 
[CUSTOM_SIMPLE_EDGE] vectorized
-                                                        PARTITION_ONLY_SHUFFLE 
[RS_305]
-                                                          Group By Operator 
[GBY_301] (rows=1 width=12)
-                                                            
Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0,
 expectedEntries=1000000)"]
-                                                            Select Operator 
[SEL_297] (rows=652 width=4)
-                                                              Output:["_col0"]
-                                                               Please refer to 
the previous Select Operator [SEL_289]
+                                           Please refer to the previous Select 
Operator [SEL_287]
+                                      <-Map 13 [SIMPLE_EDGE] vectorized
+                                        SHUFFLE [RS_335]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_334] 
(rows=143930993 width=119)
+                                            Output:["_col0","_col1","_col2"]
+                                            Filter Operator [FIL_333] 
(rows=143930993 width=119)
+                                              predicate:((ws_sold_date_sk 
BETWEEN DynamicValue(RS_49_date_dim_d_date_sk_min) AND 
DynamicValue(RS_49_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, 
DynamicValue(RS_49_date_dim_d_date_sk_bloom_filter))) and ws_bill_customer_sk 
is not null and ws_sold_date_sk is not null)
+                                              TableScan [TS_40] 
(rows=144002668 width=119)
+                                                
default@web_sales,web_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ws_sold_date_sk","ws_bill_customer_sk","ws_net_paid"]
+                                              <-Reducer 23 [BROADCAST_EDGE] 
vectorized
+                                                BROADCAST [RS_332]
+                                                  Group By Operator [GBY_331] 
(rows=1 width=12)
+                                                    
Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2,
 expectedEntries=1000000)"]
+                                                  <-Map 21 
[CUSTOM_SIMPLE_EDGE] vectorized
+                                                    PARTITION_ONLY_SHUFFLE 
[RS_303]
+                                                      Group By Operator 
[GBY_299] (rows=1 width=12)
+                                                        
Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0,
 expectedEntries=1000000)"]
+                                                        Select Operator 
[SEL_293] (rows=652 width=4)
+                                                          Output:["_col0"]
+                                                           Please refer to the 
previous Select Operator [SEL_287]
                       <-Reducer 5 [ONE_TO_ONE_EDGE]
                         FORWARD [RS_81]
-                          PartitionCols:_col2
-                          Merge Join Operator [MERGEJOIN_281] (rows=31888273 
width=324)
-                            
Conds:RS_318._col0=RS_328._col0(Inner),Output:["_col1","_col2","_col3"]
+                          PartitionCols:_col3
+                          Merge Join Operator [MERGEJOIN_281] (rows=17130654 
width=328)
+                            
Conds:RS_320._col0=RS_330._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
                           <-Reducer 12 [SIMPLE_EDGE] vectorized
-                            SHUFFLE [RS_328]
+                            SHUFFLE [RS_330]
                               PartitionCols:_col0
-                              Select Operator [SEL_327] (rows=26666666 
width=212)
+                              Select Operator [SEL_329] (rows=26666666 
width=212)
                                 Output:["_col0","_col1"]
-                                Filter Operator [FIL_326] (rows=26666666 
width=212)
+                                Filter Operator [FIL_328] (rows=26666666 
width=212)
                                   predicate:(_col3 > 0)
-                                  Select Operator [SEL_325] (rows=80000000 
width=212)
+                                  Select Operator [SEL_327] (rows=80000000 
width=212)
                                     Output:["_col0","_col3"]
-                                    Group By Operator [GBY_324] (rows=80000000 
width=392)
+                                    Group By Operator [GBY_326] (rows=80000000 
width=392)
                                       
Output:["_col0","_col1","_col2","_col3"],aggregations:["max(VALUE._col0)"],keys:KEY._col0,
 KEY._col1, KEY._col2
                                     <-Reducer 11 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_35]
+                                      SHUFFLE [RS_36]
                                         PartitionCols:_col0, _col1, _col2
-                                        Group By Operator [GBY_34] 
(rows=80000000 width=392)
+                                        Group By Operator [GBY_35] 
(rows=80000000 width=392)
                                           
Output:["_col0","_col1","_col2","_col3"],aggregations:["max(_col2)"],keys:_col5,
 _col6, _col7
                                           Merge Join Operator [MERGEJOIN_276] 
(rows=187573258 width=377)
-                                            
Conds:RS_30._col1=RS_314._col0(Inner),Output:["_col2","_col5","_col6","_col7"]
+                                            
Conds:RS_31._col1=RS_315._col0(Inner),Output:["_col2","_col5","_col6","_col7"]
                                           <-Map 26 [SIMPLE_EDGE] vectorized
-                                            SHUFFLE [RS_314]
+                                            SHUFFLE [RS_315]
                                               PartitionCols:_col0
                                                Please refer to the previous 
Select Operator [SEL_311]
                                           <-Reducer 10 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_30]
+                                            SHUFFLE [RS_31]
                                               PartitionCols:_col1
                                               Merge Join Operator 
[MERGEJOIN_275] (rows=187573258 width=101)
-                                                
Conds:RS_323._col0=RS_294._col0(Inner),Output:["_col1","_col2"]
+                                                
Conds:RS_325._col0=RS_296._col0(Inner),Output:["_col1","_col2"]
+                                              <-Map 21 [SIMPLE_EDGE] vectorized
+                                                PARTITION_ONLY_SHUFFLE [RS_296]
+                                                  PartitionCols:_col0
+                                                  Select Operator [SEL_289] 
(rows=652 width=4)
+                                                    Output:["_col0"]
+                                                    Filter Operator [FIL_286] 
(rows=652 width=8)
+                                                      predicate:((d_year = 
2001) and (d_year) IN (2001, 2002))
+                                                       Please refer to the 
previous TableScan [TS_62]
+                                              <-Map 9 [SIMPLE_EDGE] vectorized
+                                                SHUFFLE [RS_325]
+                                                  PartitionCols:_col0
+                                                  Select Operator [SEL_324] 
(rows=525327388 width=114)
+                                                    
Output:["_col0","_col1","_col2"]
+                                                    Filter Operator [FIL_323] 
(rows=525327388 width=114)
+                                                      
predicate:((ss_sold_date_sk BETWEEN DynamicValue(RS_29_date_dim_d_date_sk_min) 
AND DynamicValue(RS_29_date_dim_d_date_sk_max) and 
in_bloom_filter(ss_sold_date_sk, 
DynamicValue(RS_29_date_dim_d_date_sk_bloom_filter))) and ss_customer_sk is not 
null and ss_sold_date_sk is not null)
+                                                      TableScan [TS_20] 
(rows=575995635 width=114)
+                                                        
default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_customer_sk","ss_net_paid"]
+                                                      <-Reducer 25 
[BROADCAST_EDGE] vectorized
+                                                        BROADCAST [RS_322]
+                                                          Group By Operator 
[GBY_321] (rows=1 width=12)
+                                                            
Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2,
 expectedEntries=1000000)"]
+                                                          <-Map 21 
[CUSTOM_SIMPLE_EDGE] vectorized
+                                                            
PARTITION_ONLY_SHUFFLE [RS_305]
+                                                              Group By 
Operator [GBY_301] (rows=1 width=12)
+                                                                
Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0,
 expectedEntries=1000000)"]
+                                                                Select 
Operator [SEL_297] (rows=652 width=4)
+                                                                  
Output:["_col0"]
+                                                                   Please 
refer to the previous Select Operator [SEL_289]
+                          <-Reducer 4 [SIMPLE_EDGE] vectorized
+                            SHUFFLE [RS_320]
+                              PartitionCols:_col0
+                              Select Operator [SEL_319] (rows=17130654 
width=216)
+                                Output:["_col0","_col1","_col2"]
+                                Filter Operator [FIL_318] (rows=17130654 
width=212)
+                                  predicate:(_col3 > 0)
+                                  Select Operator [SEL_317] (rows=51391963 
width=212)
+                                    Output:["_col0","_col3"]
+                                    Group By Operator [GBY_316] (rows=51391963 
width=392)
+                                      
Output:["_col0","_col1","_col2","_col3"],aggregations:["max(VALUE._col0)"],keys:KEY._col0,
 KEY._col1, KEY._col2
+                                    <-Reducer 3 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_16]
+                                        PartitionCols:_col0, _col1, _col2
+                                        Group By Operator [GBY_15] 
(rows=51391963 width=392)
+                                          
Output:["_col0","_col1","_col2","_col3"],aggregations:["max(_col2)"],keys:_col5,
 _col6, _col7
+                                          Merge Join Operator [MERGEJOIN_274] 
(rows=51391963 width=391)
+                                            
Conds:RS_11._col1=RS_314._col0(Inner),Output:["_col2","_col5","_col6","_col7"]
+                                          <-Map 26 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_314]
+                                              PartitionCols:_col0
+                                               Please refer to the previous 
Select Operator [SEL_311]
+                                          <-Reducer 2 [SIMPLE_EDGE]
+                                            SHUFFLE [RS_11]
+                                              PartitionCols:_col1
+                                              Merge Join Operator 
[MERGEJOIN_273] (rows=51391963 width=115)
+                                                
Conds:RS_310._col0=RS_294._col0(Inner),Output:["_col1","_col2"]
                                               <-Map 21 [SIMPLE_EDGE] vectorized
                                                 PARTITION_ONLY_SHUFFLE [RS_294]
                                                   PartitionCols:_col0
@@ -327,18 +374,18 @@ Stage-0
                                                     Filter Operator [FIL_285] 
(rows=652 width=8)
                                                       predicate:((d_year = 
2001) and (d_year) IN (2001, 2002))
                                                        Please refer to the 
previous TableScan [TS_62]
-                                              <-Map 9 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_323]
+                                              <-Map 1 [SIMPLE_EDGE] vectorized
+                                                SHUFFLE [RS_310]
                                                   PartitionCols:_col0
-                                                  Select Operator [SEL_322] 
(rows=525327388 width=114)
+                                                  Select Operator [SEL_309] 
(rows=143930993 width=119)
                                                     
Output:["_col0","_col1","_col2"]
-                                                    Filter Operator [FIL_321] 
(rows=525327388 width=114)
-                                                      
predicate:((ss_sold_date_sk BETWEEN DynamicValue(RS_28_date_dim_d_date_sk_min) 
AND DynamicValue(RS_28_date_dim_d_date_sk_max) and 
in_bloom_filter(ss_sold_date_sk, 
DynamicValue(RS_28_date_dim_d_date_sk_bloom_filter))) and ss_customer_sk is not 
null and ss_sold_date_sk is not null)
-                                                      TableScan [TS_19] 
(rows=575995635 width=114)
-                                                        
default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_customer_sk","ss_net_paid"]
+                                                    Filter Operator [FIL_308] 
(rows=143930993 width=119)
+                                                      
predicate:((ws_sold_date_sk BETWEEN DynamicValue(RS_9_date_dim_d_date_sk_min) 
AND DynamicValue(RS_9_date_dim_d_date_sk_max) and 
in_bloom_filter(ws_sold_date_sk, 
DynamicValue(RS_9_date_dim_d_date_sk_bloom_filter))) and ws_bill_customer_sk is 
not null and ws_sold_date_sk is not null)
+                                                      TableScan [TS_0] 
(rows=144002668 width=119)
+                                                        
default@web_sales,web_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ws_sold_date_sk","ws_bill_customer_sk","ws_net_paid"]
                                                       <-Reducer 24 
[BROADCAST_EDGE] vectorized
-                                                        BROADCAST [RS_320]
-                                                          Group By Operator 
[GBY_319] (rows=1 width=12)
+                                                        BROADCAST [RS_307]
+                                                          Group By Operator 
[GBY_306] (rows=1 width=12)
                                                             
Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2,
 expectedEntries=1000000)"]
                                                           <-Map 21 
[CUSTOM_SIMPLE_EDGE] vectorized
                                                             
PARTITION_ONLY_SHUFFLE [RS_304]
@@ -347,51 +394,4 @@ Stage-0
                                                                 Select 
Operator [SEL_295] (rows=652 width=4)
                                                                   
Output:["_col0"]
                                                                    Please 
refer to the previous Select Operator [SEL_288]
-                          <-Reducer 4 [SIMPLE_EDGE] vectorized
-                            SHUFFLE [RS_318]
-                              PartitionCols:_col0
-                              Select Operator [SEL_317] (rows=51391963 
width=212)
-                                Output:["_col0","_col1"]
-                                Group By Operator [GBY_316] (rows=51391963 
width=392)
-                                  
Output:["_col0","_col1","_col2","_col3"],aggregations:["max(VALUE._col0)"],keys:KEY._col0,
 KEY._col1, KEY._col2
-                                <-Reducer 3 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_16]
-                                    PartitionCols:_col0, _col1, _col2
-                                    Group By Operator [GBY_15] (rows=51391963 
width=392)
-                                      
Output:["_col0","_col1","_col2","_col3"],aggregations:["max(_col2)"],keys:_col5,
 _col6, _col7
-                                      Merge Join Operator [MERGEJOIN_274] 
(rows=51391963 width=391)
-                                        
Conds:RS_11._col1=RS_313._col0(Inner),Output:["_col2","_col5","_col6","_col7"]
-                                      <-Map 26 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_313]
-                                          PartitionCols:_col0
-                                           Please refer to the previous Select 
Operator [SEL_311]
-                                      <-Reducer 2 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_11]
-                                          PartitionCols:_col1
-                                          Merge Join Operator [MERGEJOIN_273] 
(rows=51391963 width=115)
-                                            
Conds:RS_310._col0=RS_292._col0(Inner),Output:["_col1","_col2"]
-                                          <-Map 21 [SIMPLE_EDGE] vectorized
-                                            PARTITION_ONLY_SHUFFLE [RS_292]
-                                              PartitionCols:_col0
-                                               Please refer to the previous 
Select Operator [SEL_287]
-                                          <-Map 1 [SIMPLE_EDGE] vectorized
-                                            SHUFFLE [RS_310]
-                                              PartitionCols:_col0
-                                              Select Operator [SEL_309] 
(rows=143930993 width=119)
-                                                
Output:["_col0","_col1","_col2"]
-                                                Filter Operator [FIL_308] 
(rows=143930993 width=119)
-                                                  predicate:((ws_sold_date_sk 
BETWEEN DynamicValue(RS_9_date_dim_d_date_sk_min) AND 
DynamicValue(RS_9_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, 
DynamicValue(RS_9_date_dim_d_date_sk_bloom_filter))) and ws_bill_customer_sk is 
not null and ws_sold_date_sk is not null)
-                                                  TableScan [TS_0] 
(rows=144002668 width=119)
-                                                    
default@web_sales,web_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ws_sold_date_sk","ws_bill_customer_sk","ws_net_paid"]
-                                                  <-Reducer 23 
[BROADCAST_EDGE] vectorized
-                                                    BROADCAST [RS_307]
-                                                      Group By Operator 
[GBY_306] (rows=1 width=12)
-                                                        
Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2,
 expectedEntries=1000000)"]
-                                                      <-Map 21 
[CUSTOM_SIMPLE_EDGE] vectorized
-                                                        PARTITION_ONLY_SHUFFLE 
[RS_303]
-                                                          Group By Operator 
[GBY_299] (rows=1 width=12)
-                                                            
Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0,
 expectedEntries=1000000)"]
-                                                            Select Operator 
[SEL_293] (rows=652 width=4)
-                                                              Output:["_col0"]
-                                                               Please refer to 
the previous Select Operator [SEL_287]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/5553c59e/ql/src/test/results/clientpositive/perf/tez/constraints/query76.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/perf/tez/constraints/query76.q.out 
b/ql/src/test/results/clientpositive/perf/tez/constraints/query76.q.out
index 56d4500..f6d7825 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query76.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query76.q.out
@@ -93,29 +93,29 @@ Stage-0
                         Select Operator [SEL_157] (rows=1433911 width=399)
                           
Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                           Merge Join Operator [MERGEJOIN_156] (rows=1433911 
width=209)
-                            
Conds:RS_39._col0=RS_185._col0(Inner),Output:["_col2","_col4","_col6","_col7"]
+                            
Conds:RS_39._col1=RS_185._col0(Inner),Output:["_col2","_col4","_col5","_col7"]
                           <-Map 16 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_185]
                               PartitionCols:_col0
-                              Select Operator [SEL_184] (rows=73049 width=12)
-                                Output:["_col0","_col1","_col2"]
-                                TableScan [TS_34] (rows=73049 width=12)
-                                  
default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year","d_qoy"]
+                              Select Operator [SEL_184] (rows=462000 width=94)
+                                Output:["_col0","_col1"]
+                                TableScan [TS_34] (rows=462000 width=94)
+                                  
default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_category"]
                           <-Reducer 9 [SIMPLE_EDGE]
                             SHUFFLE [RS_39]
-                              PartitionCols:_col0
-                              Merge Join Operator [MERGEJOIN_142] 
(rows=1433911 width=205)
-                                
Conds:RS_183._col1=RS_165._col0(Inner),Output:["_col0","_col2","_col4"]
+                              PartitionCols:_col1
+                              Merge Join Operator [MERGEJOIN_142] 
(rows=1433911 width=123)
+                                
Conds:RS_183._col0=RS_165._col0(Inner),Output:["_col1","_col2","_col4","_col5"]
                               <-Map 1 [SIMPLE_EDGE] vectorized
                                 SHUFFLE [RS_165]
                                   PartitionCols:_col0
-                                  Select Operator [SEL_162] (rows=462000 
width=94)
-                                    Output:["_col0","_col1"]
-                                    TableScan [TS_0] (rows=462000 width=94)
-                                      
default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_category"]
+                                  Select Operator [SEL_162] (rows=73049 
width=12)
+                                    Output:["_col0","_col1","_col2"]
+                                    TableScan [TS_0] (rows=73049 width=12)
+                                      
default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year","d_qoy"]
                               <-Map 15 [SIMPLE_EDGE] vectorized
                                 SHUFFLE [RS_183]
-                                  PartitionCols:_col1
+                                  PartitionCols:_col0
                                   Select Operator [SEL_182] (rows=1433911 
width=119)
                                     Output:["_col0","_col1","_col2"]
                                     Filter Operator [FIL_181] (rows=1433911 
width=123)
@@ -132,26 +132,26 @@ Stage-0
                         Select Operator [SEL_145] (rows=24749363 width=387)
                           
Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                           Merge Join Operator [MERGEJOIN_144] (rows=24749363 
width=204)
-                            
Conds:RS_10._col2=RS_170._col0(Inner),Output:["_col1","_col4","_col6","_col7"]
+                            
Conds:RS_10._col4=RS_170._col0(Inner),Output:["_col1","_col2","_col5","_col7"]
                           <-Map 12 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_170]
                               PartitionCols:_col0
-                              Select Operator [SEL_169] (rows=73049 width=12)
-                                Output:["_col0","_col1","_col2"]
-                                TableScan [TS_5] (rows=73049 width=12)
-                                  
default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year","d_qoy"]
+                              Select Operator [SEL_169] (rows=462000 width=94)
+                                Output:["_col0","_col1"]
+                                TableScan [TS_5] (rows=462000 width=94)
+                                  
default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_category"]
                           <-Reducer 2 [SIMPLE_EDGE]
                             SHUFFLE [RS_10]
-                              PartitionCols:_col2
-                              Merge Join Operator [MERGEJOIN_138] 
(rows=24749363 width=200)
-                                
Conds:RS_163._col0=RS_168._col1(Inner),Output:["_col1","_col2","_col4"]
+                              PartitionCols:_col4
+                              Merge Join Operator [MERGEJOIN_138] 
(rows=24749363 width=118)
+                                
Conds:RS_163._col0=RS_168._col0(Inner),Output:["_col1","_col2","_col4","_col5"]
                               <-Map 1 [SIMPLE_EDGE] vectorized
                                 SHUFFLE [RS_163]
                                   PartitionCols:_col0
                                    Please refer to the previous Select 
Operator [SEL_162]
                               <-Map 11 [SIMPLE_EDGE] vectorized
                                 SHUFFLE [RS_168]
-                                  PartitionCols:_col1
+                                  PartitionCols:_col0
                                   Select Operator [SEL_167] (rows=24749363 
width=114)
                                     Output:["_col0","_col1","_col2"]
                                     Filter Operator [FIL_166] (rows=24749363 
width=118)
@@ -168,26 +168,26 @@ Stage-0
                         Select Operator [SEL_151] (rows=35728 width=394)
                           
Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                           Merge Join Operator [MERGEJOIN_150] (rows=35728 
width=209)
-                            
Conds:RS_24._col0=RS_180._col0(Inner),Output:["_col2","_col4","_col6","_col7"]
+                            
Conds:RS_24._col1=RS_180._col0(Inner),Output:["_col2","_col4","_col5","_col7"]
                           <-Map 14 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_180]
                               PartitionCols:_col0
-                              Select Operator [SEL_179] (rows=73049 width=12)
-                                Output:["_col0","_col1","_col2"]
-                                TableScan [TS_19] (rows=73049 width=12)
-                                  
default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year","d_qoy"]
+                              Select Operator [SEL_179] (rows=462000 width=94)
+                                Output:["_col0","_col1"]
+                                TableScan [TS_19] (rows=462000 width=94)
+                                  
default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_category"]
                           <-Reducer 7 [SIMPLE_EDGE]
                             SHUFFLE [RS_24]
-                              PartitionCols:_col0
-                              Merge Join Operator [MERGEJOIN_140] (rows=35728 
width=205)
-                                
Conds:RS_178._col1=RS_164._col0(Inner),Output:["_col0","_col2","_col4"]
+                              PartitionCols:_col1
+                              Merge Join Operator [MERGEJOIN_140] (rows=35728 
width=123)
+                                
Conds:RS_178._col0=RS_164._col0(Inner),Output:["_col1","_col2","_col4","_col5"]
                               <-Map 1 [SIMPLE_EDGE] vectorized
                                 SHUFFLE [RS_164]
                                   PartitionCols:_col0
                                    Please refer to the previous Select 
Operator [SEL_162]
                               <-Map 13 [SIMPLE_EDGE] vectorized
                                 SHUFFLE [RS_178]
-                                  PartitionCols:_col1
+                                  PartitionCols:_col0
                                   Select Operator [SEL_177] (rows=35728 
width=119)
                                     Output:["_col0","_col1","_col2"]
                                     Filter Operator [FIL_176] (rows=35728 
width=123)

Reply via email to