http://git-wip-us.apache.org/repos/asf/hive/blob/ff30a1eb/ql/src/test/results/clientpositive/llap/subquery_views.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/subquery_views.q.out 
b/ql/src/test/results/clientpositive/llap/subquery_views.q.out
index 094d6b2..af69569 100644
--- a/ql/src/test/results/clientpositive/llap/subquery_views.q.out
+++ b/ql/src/test/results/clientpositive/llap/subquery_views.q.out
@@ -305,19 +305,19 @@ STAGE PLANS:
                   1 _col0 (type: string), _col1 (type: string)
                   2 _col4 (type: string), _col2 (type: string)
                 outputColumnNames: _col0, _col1, _col4, _col5, _col9
-                Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE 
Column stats: COMPLETE
+                Statistics: Num rows: 87 Data size: 17226 Basic stats: 
COMPLETE Column stats: COMPLETE
                 Filter Operator
                   predicate: CASE WHEN ((_col4 = 0)) THEN (true) WHEN (_col4 
is null) THEN (true) WHEN (_col9 is not null) THEN (false) WHEN (_col0 is null) 
THEN (null) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END (type: boolean)
-                  Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE 
Column stats: COMPLETE
+                  Statistics: Num rows: 43 Data size: 8514 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Select Operator
                     expressions: _col0 (type: string), _col1 (type: string)
                     outputColumnNames: _col0, _col1
-                    Statistics: Num rows: 1 Data size: 178 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 43 Data size: 7654 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       key expressions: _col0 (type: string)
                       sort order: +
                       Map-reduce partition columns: _col0 (type: string)
-                      Statistics: Num rows: 1 Data size: 178 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 43 Data size: 7654 Basic stats: 
COMPLETE Column stats: COMPLETE
                       value expressions: _col1 (type: string)
         Reducer 3 
             Execution mode: llap
@@ -329,10 +329,10 @@ STAGE PLANS:
                   0 _col0 (type: string)
                   1 _col0 (type: string)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 1 Data size: 178 Basic stats: COMPLETE 
Column stats: COMPLETE
+                Statistics: Num rows: 43 Data size: 7654 Basic stats: COMPLETE 
Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 1 Data size: 178 Basic stats: COMPLETE 
Column stats: COMPLETE
+                  Statistics: Num rows: 43 Data size: 7654 Basic stats: 
COMPLETE Column stats: COMPLETE
                   table:
                       input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -399,24 +399,24 @@ STAGE PLANS:
                   1 _col0 (type: string), _col1 (type: string)
                   2 _col4 (type: string), _col2 (type: string)
                 outputColumnNames: _col0, _col4, _col5, _col9
-                Statistics: Num rows: 1 Data size: 107 Basic stats: COMPLETE 
Column stats: COMPLETE
+                Statistics: Num rows: 87 Data size: 9309 Basic stats: COMPLETE 
Column stats: COMPLETE
                 Filter Operator
                   predicate: CASE WHEN ((_col4 = 0)) THEN (true) WHEN (_col4 
is null) THEN (true) WHEN (_col9 is not null) THEN (false) WHEN (_col0 is null) 
THEN (null) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END (type: boolean)
-                  Statistics: Num rows: 1 Data size: 107 Basic stats: COMPLETE 
Column stats: COMPLETE
+                  Statistics: Num rows: 43 Data size: 4601 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Select Operator
                     expressions: _col0 (type: string)
                     outputColumnNames: _col0
-                    Statistics: Num rows: 1 Data size: 87 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 43 Data size: 3741 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Group By Operator
                       keys: _col0 (type: string)
                       mode: hash
                       outputColumnNames: _col0
-                      Statistics: Num rows: 1 Data size: 87 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 8 Data size: 696 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
-                        Statistics: Num rows: 1 Data size: 87 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 8 Data size: 696 Basic stats: 
COMPLETE Column stats: COMPLETE
         Reducer 8 
             Execution mode: llap
             Reduce Operator Tree:

http://git-wip-us.apache.org/repos/asf/hive/blob/ff30a1eb/ql/src/test/results/clientpositive/perf/query17.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query17.q.out 
b/ql/src/test/results/clientpositive/perf/query17.q.out
index 6c9e00b..c5e69d5 100644
--- a/ql/src/test/results/clientpositive/perf/query17.q.out
+++ b/ql/src/test/results/clientpositive/perf/query17.q.out
@@ -89,139 +89,137 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 10 <- Map 14 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
-Reducer 12 <- Map 11 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE)
-Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
-Reducer 3 <- Reducer 10 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
-Reducer 4 <- Map 15 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
-Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 10 <- Reducer 11 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Map 14 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 12 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 15 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
 Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
-Reducer 8 <- Map 7 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE)
-Reducer 9 <- Map 7 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+Reducer 9 <- Map 13 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
     limit:100
     Stage-1
-      Reducer 6
-      File Output Operator [FS_54]
-        Limit [LIM_53] (rows=100 width=88)
+      Reducer 7
+      File Output Operator [FS_55]
+        Limit [LIM_54] (rows=100 width=88)
           Number of rows:100
-          Select Operator [SEL_52] (rows=510205767 width=88)
+          Select Operator [SEL_53] (rows=421657640 width=88)
             
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
-          <-Reducer 5 [SIMPLE_EDGE]
-            SHUFFLE [RS_51]
-              Select Operator [SEL_50] (rows=510205767 width=88)
+          <-Reducer 6 [SIMPLE_EDGE]
+            SHUFFLE [RS_52]
+              Select Operator [SEL_51] (rows=421657640 width=88)
                 
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
-                Group By Operator [GBY_49] (rows=510205767 width=88)
+                Group By Operator [GBY_50] (rows=421657640 width=88)
                   
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"],aggregations:["count(VALUE._col0)","avg(VALUE._col1)","stddev_samp(VALUE._col2)","count(VALUE._col3)","avg(VALUE._col4)","stddev_samp(VALUE._col5)","count(VALUE._col6)","avg(VALUE._col7)","stddev_samp(VALUE._col8)"],keys:KEY._col0,
 KEY._col1, KEY._col2
-                <-Reducer 4 [SIMPLE_EDGE]
-                  SHUFFLE [RS_48]
+                <-Reducer 5 [SIMPLE_EDGE]
+                  SHUFFLE [RS_49]
                     PartitionCols:_col0, _col1, _col2
-                    Group By Operator [GBY_47] (rows=1020411534 width=88)
-                      
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"],aggregations:["count(_col15)","avg(_col15)","stddev_samp(_col15)","count(_col20)","avg(_col20)","stddev_samp(_col20)","count(_col3)","avg(_col3)","stddev_samp(_col3)"],keys:_col24,
 _col25, _col7
-                      Merge Join Operator [MERGEJOIN_100] (rows=1020411534 
width=88)
-                        
Conds:RS_43._col11=RS_44._col0(Inner),Output:["_col3","_col7","_col15","_col20","_col24","_col25"]
+                    Group By Operator [GBY_48] (rows=843315281 width=88)
+                      
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"],aggregations:["count(_col5)","avg(_col5)","stddev_samp(_col5)","count(_col21)","avg(_col21)","stddev_samp(_col21)","count(_col14)","avg(_col14)","stddev_samp(_col14)"],keys:_col9,
 _col10, _col25
+                      Merge Join Operator [MERGEJOIN_98] (rows=843315281 
width=88)
+                        
Conds:RS_44._col3=RS_45._col0(Inner),Output:["_col5","_col9","_col10","_col14","_col21","_col25"]
                       <-Map 15 [SIMPLE_EDGE]
-                        SHUFFLE [RS_44]
+                        SHUFFLE [RS_45]
                           PartitionCols:_col0
-                          Select Operator [SEL_36] (rows=462000 width=1436)
-                            Output:["_col0","_col1","_col2"]
-                            Filter Operator [FIL_93] (rows=462000 width=1436)
-                              predicate:i_item_sk is not null
-                              TableScan [TS_34] (rows=462000 width=1436)
-                                
default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id","i_item_desc"]
-                      <-Reducer 3 [SIMPLE_EDGE]
-                        SHUFFLE [RS_43]
-                          PartitionCols:_col11
-                          Merge Join Operator [MERGEJOIN_99] (rows=927646829 
width=88)
-                            Conds:RS_40._col1, _col2=RS_41._col12, 
_col11(Inner),Output:["_col3","_col7","_col11","_col15","_col20"]
+                          Select Operator [SEL_34] (rows=1704 width=1910)
+                            Output:["_col0","_col1"]
+                            Filter Operator [FIL_91] (rows=1704 width=1910)
+                              predicate:s_store_sk is not null
+                              TableScan [TS_32] (rows=1704 width=1910)
+                                
default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_state"]
+                      <-Reducer 4 [SIMPLE_EDGE]
+                        SHUFFLE [RS_44]
+                          PartitionCols:_col3
+                          Merge Join Operator [MERGEJOIN_97] (rows=766650239 
width=88)
+                            Conds:RS_41._col1, _col2, _col4=RS_42._col7, 
_col8, _col9(Inner),Output:["_col3","_col5","_col9","_col10","_col14","_col21"]
                           <-Reducer 10 [SIMPLE_EDGE]
+                            SHUFFLE [RS_42]
+                              PartitionCols:_col7, _col8, _col9
+                              Merge Join Operator [MERGEJOIN_96] 
(rows=348467716 width=135)
+                                Conds:RS_28._col2, _col1=RS_29._col1, 
_col2(Inner),Output:["_col3","_col7","_col8","_col9","_col10"]
+                              <-Reducer 11 [SIMPLE_EDGE]
+                                SHUFFLE [RS_29]
+                                  PartitionCols:_col1, _col2
+                                  Merge Join Operator [MERGEJOIN_95] 
(rows=63350266 width=77)
+                                    
Conds:RS_21._col0=RS_22._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                                  <-Map 8 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_22]
+                                      PartitionCols:_col0
+                                      Select Operator [SEL_20] (rows=36525 
width=1119)
+                                        Output:["_col0"]
+                                        Filter Operator [FIL_90] (rows=36525 
width=1119)
+                                          predicate:((d_quarter_name) IN 
('2000Q1', '2000Q2', '2000Q3') and d_date_sk is not null)
+                                          TableScan [TS_3] (rows=73049 
width=1119)
+                                            
default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_quarter_name"]
+                                  <-Map 14 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_21]
+                                      PartitionCols:_col0
+                                      Select Operator [SEL_17] (rows=57591150 
width=77)
+                                        
Output:["_col0","_col1","_col2","_col3","_col4"]
+                                        Filter Operator [FIL_89] 
(rows=57591150 width=77)
+                                          predicate:(sr_customer_sk is not 
null and sr_item_sk is not null and sr_ticket_number is not null and 
sr_returned_date_sk is not null)
+                                          TableScan [TS_15] (rows=57591150 
width=77)
+                                            
default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_returned_date_sk","sr_item_sk","sr_customer_sk","sr_ticket_number","sr_return_quantity"]
+                              <-Reducer 9 [SIMPLE_EDGE]
+                                SHUFFLE [RS_28]
+                                  PartitionCols:_col2, _col1
+                                  Merge Join Operator [MERGEJOIN_94] 
(rows=316788826 width=135)
+                                    
Conds:RS_25._col0=RS_26._col0(Inner),Output:["_col1","_col2","_col3"]
+                                  <-Map 8 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_26]
+                                      PartitionCols:_col0
+                                      Select Operator [SEL_14] (rows=36525 
width=1119)
+                                        Output:["_col0"]
+                                        Filter Operator [FIL_88] (rows=36525 
width=1119)
+                                          predicate:((d_quarter_name) IN 
('2000Q1', '2000Q2', '2000Q3') and d_date_sk is not null)
+                                           Please refer to the previous 
TableScan [TS_3]
+                                  <-Map 13 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_25]
+                                      PartitionCols:_col0
+                                      Select Operator [SEL_11] (rows=287989836 
width=135)
+                                        
Output:["_col0","_col1","_col2","_col3"]
+                                        Filter Operator [FIL_87] 
(rows=287989836 width=135)
+                                          predicate:(cs_bill_customer_sk is 
not null and cs_item_sk is not null and cs_sold_date_sk is not null)
+                                          TableScan [TS_9] (rows=287989836 
width=135)
+                                            
default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_quantity"]
+                          <-Reducer 3 [SIMPLE_EDGE]
                             SHUFFLE [RS_41]
-                              PartitionCols:_col12, _col11
-                              Select Operator [SEL_33] (rows=843315281 
width=88)
-                                
Output:["_col1","_col5","_col9","_col11","_col12","_col14"]
-                                Merge Join Operator [MERGEJOIN_98] 
(rows=843315281 width=88)
-                                  
Conds:RS_30._col3=RS_31._col0(Inner),Output:["_col1","_col5","_col7","_col8","_col10","_col16"]
-                                <-Map 14 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_31]
-                                    PartitionCols:_col0
-                                    Select Operator [SEL_20] (rows=1704 
width=1910)
-                                      Output:["_col0","_col1"]
-                                      Filter Operator [FIL_92] (rows=1704 
width=1910)
-                                        predicate:s_store_sk is not null
-                                        TableScan [TS_18] (rows=1704 
width=1910)
-                                          
default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_state"]
-                                <-Reducer 9 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_30]
-                                    PartitionCols:_col3
-                                    Merge Join Operator [MERGEJOIN_97] 
(rows=766650239 width=88)
-                                      
Conds:RS_27._col6=RS_28._col0(Inner),Output:["_col1","_col3","_col5","_col7","_col8","_col10"]
-                                    <-Map 7 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_28]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_17] (rows=36525 
width=1119)
-                                          Output:["_col0"]
-                                          Filter Operator [FIL_91] (rows=36525 
width=1119)
-                                            predicate:((d_quarter_name) IN 
('2000Q1', '2000Q2', '2000Q3') and d_date_sk is not null)
-                                            TableScan [TS_3] (rows=73049 
width=1119)
-                                              
default@date_dim,d3,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_quarter_name"]
-                                    <-Reducer 8 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_27]
-                                        PartitionCols:_col6
-                                        Merge Join Operator [MERGEJOIN_96] 
(rows=696954748 width=88)
-                                          
Conds:RS_24._col0=RS_25._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col8","_col10"]
-                                        <-Map 7 [SIMPLE_EDGE]
-                                          SHUFFLE [RS_25]
-                                            PartitionCols:_col0
-                                            Select Operator [SEL_14] 
(rows=36524 width=1119)
-                                              Output:["_col0"]
-                                              Filter Operator [FIL_90] 
(rows=36524 width=1119)
-                                                predicate:((d_quarter_name = 
'2000Q1') and d_date_sk is not null)
-                                                 Please refer to the previous 
TableScan [TS_3]
-                                        <-Reducer 12 [SIMPLE_EDGE]
-                                          SHUFFLE [RS_24]
-                                            PartitionCols:_col0
-                                            Merge Join Operator [MERGEJOIN_95] 
(rows=633595212 width=88)
-                                              Conds:RS_21._col1, _col2, 
_col4=RS_22._col1, _col2, 
_col3(Inner),Output:["_col0","_col1","_col3","_col5","_col6","_col7","_col8","_col10"]
-                                            <-Map 11 [SIMPLE_EDGE]
-                                              SHUFFLE [RS_21]
-                                                PartitionCols:_col1, _col2, 
_col4
-                                                Select Operator [SEL_8] 
(rows=575995635 width=88)
-                                                  
Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                                  Filter Operator [FIL_88] 
(rows=575995635 width=88)
-                                                    predicate:(ss_customer_sk 
is not null and ss_item_sk is not null and ss_ticket_number is not null and 
ss_sold_date_sk is not null and ss_store_sk is not null)
-                                                    TableScan [TS_6] 
(rows=575995635 width=88)
-                                                      
default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_customer_sk","ss_store_sk","ss_ticket_number","ss_quantity"]
-                                            <-Map 13 [SIMPLE_EDGE]
-                                              SHUFFLE [RS_22]
-                                                PartitionCols:_col1, _col2, 
_col3
-                                                Select Operator [SEL_11] 
(rows=57591150 width=77)
-                                                  
Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                  Filter Operator [FIL_89] 
(rows=57591150 width=77)
-                                                    predicate:(sr_customer_sk 
is not null and sr_item_sk is not null and sr_ticket_number is not null and 
sr_returned_date_sk is not null)
-                                                    TableScan [TS_9] 
(rows=57591150 width=77)
-                                                      
default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_returned_date_sk","sr_item_sk","sr_customer_sk","sr_ticket_number","sr_return_quantity"]
-                          <-Reducer 2 [SIMPLE_EDGE]
-                            SHUFFLE [RS_40]
-                              PartitionCols:_col1, _col2
-                              Merge Join Operator [MERGEJOIN_94] 
(rows=316788826 width=135)
-                                
Conds:RS_37._col0=RS_38._col0(Inner),Output:["_col1","_col2","_col3"]
-                              <-Map 7 [SIMPLE_EDGE]
-                                SHUFFLE [RS_38]
+                              PartitionCols:_col1, _col2, _col4
+                              Merge Join Operator [MERGEJOIN_93] 
(rows=696954748 width=88)
+                                
Conds:RS_38._col1=RS_39._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5","_col9","_col10"]
+                              <-Map 12 [SIMPLE_EDGE]
+                                SHUFFLE [RS_39]
                                   PartitionCols:_col0
-                                  Select Operator [SEL_5] (rows=36525 
width=1119)
-                                    Output:["_col0"]
-                                    Filter Operator [FIL_87] (rows=36525 
width=1119)
-                                      predicate:((d_quarter_name) IN 
('2000Q1', '2000Q2', '2000Q3') and d_date_sk is not null)
-                                       Please refer to the previous TableScan 
[TS_3]
-                              <-Map 1 [SIMPLE_EDGE]
-                                SHUFFLE [RS_37]
-                                  PartitionCols:_col0
-                                  Select Operator [SEL_2] (rows=287989836 
width=135)
-                                    Output:["_col0","_col1","_col2","_col3"]
-                                    Filter Operator [FIL_86] (rows=287989836 
width=135)
-                                      predicate:(cs_bill_customer_sk is not 
null and cs_item_sk is not null and cs_sold_date_sk is not null)
-                                      TableScan [TS_0] (rows=287989836 
width=135)
-                                        
default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_quantity"]
+                                  Select Operator [SEL_8] (rows=462000 
width=1436)
+                                    Output:["_col0","_col1","_col2"]
+                                    Filter Operator [FIL_86] (rows=462000 
width=1436)
+                                      predicate:i_item_sk is not null
+                                      TableScan [TS_6] (rows=462000 width=1436)
+                                        
default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id","i_item_desc"]
+                              <-Reducer 2 [SIMPLE_EDGE]
+                                SHUFFLE [RS_38]
+                                  PartitionCols:_col1
+                                  Merge Join Operator [MERGEJOIN_92] 
(rows=633595212 width=88)
+                                    
Conds:RS_35._col0=RS_36._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5"]
+                                  <-Map 8 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_36]
+                                      PartitionCols:_col0
+                                      Select Operator [SEL_5] (rows=36524 
width=1119)
+                                        Output:["_col0"]
+                                        Filter Operator [FIL_85] (rows=36524 
width=1119)
+                                          predicate:((d_quarter_name = 
'2000Q1') and d_date_sk is not null)
+                                           Please refer to the previous 
TableScan [TS_3]
+                                  <-Map 1 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_35]
+                                      PartitionCols:_col0
+                                      Select Operator [SEL_2] (rows=575995635 
width=88)
+                                        
Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                                        Filter Operator [FIL_84] 
(rows=575995635 width=88)
+                                          predicate:(ss_customer_sk is not 
null and ss_item_sk is not null and ss_ticket_number is not null and 
ss_sold_date_sk is not null and ss_store_sk is not null)
+                                          TableScan [TS_0] (rows=575995635 
width=88)
+                                            
default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_customer_sk","ss_store_sk","ss_ticket_number","ss_quantity"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/ff30a1eb/ql/src/test/results/clientpositive/perf/query24.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query24.q.out 
b/ql/src/test/results/clientpositive/perf/query24.q.out
index 3eb65b6..9a1b4f6 100644
--- a/ql/src/test/results/clientpositive/perf/query24.q.out
+++ b/ql/src/test/results/clientpositive/perf/query24.q.out
@@ -101,8 +101,8 @@ Plan optimized by CBO.
 
 Vertex dependency in root stage
 Reducer 10 <- Map 18 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
-Reducer 11 <- Map 19 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE)
-Reducer 12 <- Map 17 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
+Reducer 11 <- Map 16 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE)
+Reducer 12 <- Map 19 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
 Reducer 13 <- Map 20 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE)
 Reducer 14 <- Reducer 13 (SIMPLE_EDGE)
 Reducer 15 <- Reducer 14 (CUSTOM_SIMPLE_EDGE)
@@ -113,7 +113,7 @@ Reducer 5 <- Map 19 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
 Reducer 6 <- Map 20 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
 Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
 Reducer 8 <- Reducer 15 (CUSTOM_SIMPLE_EDGE), Reducer 7 (CUSTOM_SIMPLE_EDGE)
-Reducer 9 <- Map 1 (SIMPLE_EDGE), Map 16 (SIMPLE_EDGE)
+Reducer 9 <- Map 1 (SIMPLE_EDGE), Map 17 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
@@ -145,9 +145,9 @@ Stage-0
                             SHUFFLE [RS_78]
                               PartitionCols:_col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8, _col9
                               Group By Operator [GBY_77] (rows=927646829 
width=88)
-                                
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"],aggregations:["sum(_col4)"],keys:_col22,
 _col17, _col18, _col19, _col20, _col21, _col13, _col14, _col8, _col10
+                                
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"],aggregations:["sum(_col4)"],keys:_col11,
 _col12, _col6, _col8, _col15, _col16, _col17, _col18, _col19, _col22
                                 Merge Join Operator [MERGEJOIN_153] 
(rows=927646829 width=88)
-                                  Conds:RS_73._col11, _col15=RS_74._col1, 
upper(_col2)(Inner),Output:["_col4","_col8","_col10","_col13","_col14","_col17","_col18","_col19","_col20","_col21","_col22"]
+                                  Conds:RS_73._col9, _col13=RS_74._col1, 
upper(_col2)(Inner),Output:["_col4","_col6","_col8","_col11","_col12","_col15","_col16","_col17","_col18","_col19","_col22"]
                                 <-Map 20 [SIMPLE_EDGE]
                                   SHUFFLE [RS_74]
                                     PartitionCols:_col1, upper(_col2)
@@ -159,69 +159,69 @@ Stage-0
                                           
default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_state","ca_zip","ca_country"]
                                 <-Reducer 12 [SIMPLE_EDGE]
                                   SHUFFLE [RS_73]
-                                    PartitionCols:_col11, _col15
+                                    PartitionCols:_col9, _col13
                                     Merge Join Operator [MERGEJOIN_152] 
(rows=843315281 width=88)
-                                      
Conds:RS_70._col0=RS_71._col0(Inner),Output:["_col4","_col8","_col10","_col11","_col13","_col14","_col15","_col17","_col18","_col19","_col20","_col21"]
-                                    <-Map 17 [SIMPLE_EDGE]
+                                      Conds:RS_70._col0, _col3=RS_71._col0, 
_col1(Inner),Output:["_col4","_col6","_col8","_col9","_col11","_col12","_col13","_col15","_col16","_col17","_col18","_col19"]
+                                    <-Map 19 [SIMPLE_EDGE]
                                       SHUFFLE [RS_71]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_57] (rows=462000 
width=1436)
-                                          
Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                          Filter Operator [FIL_142] 
(rows=462000 width=1436)
-                                            predicate:i_item_sk is not null
-                                            TableScan [TS_6] (rows=462000 
width=1436)
-                                              
default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_current_price","i_size","i_color","i_units","i_manager_id"]
+                                        PartitionCols:_col0, _col1
+                                        Select Operator [SEL_14] 
(rows=57591150 width=77)
+                                          Output:["_col0","_col1"]
+                                          Filter Operator [FIL_136] 
(rows=57591150 width=77)
+                                            predicate:(sr_ticket_number is not 
null and sr_item_sk is not null)
+                                            TableScan [TS_12] (rows=57591150 
width=77)
+                                              
default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_item_sk","sr_ticket_number"]
                                     <-Reducer 11 [SIMPLE_EDGE]
                                       SHUFFLE [RS_70]
-                                        PartitionCols:_col0
+                                        PartitionCols:_col0, _col3
                                         Merge Join Operator [MERGEJOIN_151] 
(rows=766650239 width=88)
-                                          
Conds:RS_67._col1=RS_68._col0(Inner),Output:["_col0","_col4","_col8","_col10","_col11","_col13","_col14","_col15"]
-                                        <-Map 19 [SIMPLE_EDGE]
+                                          
Conds:RS_67._col0=RS_68._col0(Inner),Output:["_col0","_col3","_col4","_col6","_col8","_col9","_col11","_col12","_col13","_col15","_col16","_col17","_col18","_col19"]
+                                        <-Map 16 [SIMPLE_EDGE]
                                           SHUFFLE [RS_68]
                                             PartitionCols:_col0
-                                            Select Operator [SEL_14] 
(rows=80000000 width=860)
-                                              
Output:["_col0","_col1","_col2","_col3"]
-                                              Filter Operator [FIL_136] 
(rows=80000000 width=860)
-                                                predicate:(c_customer_sk is 
not null and c_birth_country is not null)
-                                                TableScan [TS_12] 
(rows=80000000 width=860)
-                                                  
default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_first_name","c_last_name","c_birth_country"]
+                                            Select Operator [SEL_54] 
(rows=462000 width=1436)
+                                              
Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                                              Filter Operator [FIL_141] 
(rows=462000 width=1436)
+                                                predicate:i_item_sk is not null
+                                                TableScan [TS_3] (rows=462000 
width=1436)
+                                                  
default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_current_price","i_size","i_color","i_units","i_manager_id"]
                                         <-Reducer 10 [SIMPLE_EDGE]
                                           SHUFFLE [RS_67]
-                                            PartitionCols:_col1
+                                            PartitionCols:_col0
                                             Merge Join Operator 
[MERGEJOIN_150] (rows=696954748 width=88)
-                                              
Conds:RS_64._col2=RS_65._col0(Inner),Output:["_col0","_col1","_col4","_col8","_col10","_col11"]
+                                              
Conds:RS_64._col1=RS_65._col0(Inner),Output:["_col0","_col3","_col4","_col6","_col8","_col9","_col11","_col12","_col13"]
                                             <-Map 18 [SIMPLE_EDGE]
                                               SHUFFLE [RS_65]
                                                 PartitionCols:_col0
-                                                Select Operator [SEL_11] 
(rows=852 width=1910)
-                                                  
Output:["_col0","_col1","_col3","_col4"]
-                                                  Filter Operator [FIL_135] 
(rows=852 width=1910)
-                                                    predicate:((s_market_id = 
7) and s_store_sk is not null and s_zip is not null)
-                                                    TableScan [TS_9] 
(rows=1704 width=1910)
-                                                      
default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_store_name","s_market_id","s_state","s_zip"]
+                                                Select Operator [SEL_11] 
(rows=80000000 width=860)
+                                                  
Output:["_col0","_col1","_col2","_col3"]
+                                                  Filter Operator [FIL_135] 
(rows=80000000 width=860)
+                                                    predicate:(c_customer_sk 
is not null and c_birth_country is not null)
+                                                    TableScan [TS_9] 
(rows=80000000 width=860)
+                                                      
default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_first_name","c_last_name","c_birth_country"]
                                             <-Reducer 9 [SIMPLE_EDGE]
                                               SHUFFLE [RS_64]
-                                                PartitionCols:_col2
+                                                PartitionCols:_col1
                                                 Merge Join Operator 
[MERGEJOIN_149] (rows=633595212 width=88)
-                                                  Conds:RS_61._col0, 
_col3=RS_62._col0, _col1(Inner),Output:["_col0","_col1","_col2","_col4"]
+                                                  
Conds:RS_61._col2=RS_62._col0(Inner),Output:["_col0","_col1","_col3","_col4","_col6","_col8","_col9"]
                                                 <-Map 1 [SIMPLE_EDGE]
                                                   SHUFFLE [RS_61]
-                                                    PartitionCols:_col0, _col3
+                                                    PartitionCols:_col2
                                                     Select Operator [SEL_2] 
(rows=575995635 width=88)
                                                       
Output:["_col0","_col1","_col2","_col3","_col4"]
                                                       Filter Operator 
[FIL_132] (rows=575995635 width=88)
                                                         
predicate:(ss_ticket_number is not null and ss_item_sk is not null and 
ss_store_sk is not null and ss_customer_sk is not null)
                                                         TableScan [TS_0] 
(rows=575995635 width=88)
                                                           
default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_item_sk","ss_customer_sk","ss_store_sk","ss_ticket_number","ss_sales_price"]
-                                                <-Map 16 [SIMPLE_EDGE]
+                                                <-Map 17 [SIMPLE_EDGE]
                                                   SHUFFLE [RS_62]
-                                                    PartitionCols:_col0, _col1
-                                                    Select Operator [SEL_5] 
(rows=57591150 width=77)
-                                                      Output:["_col0","_col1"]
-                                                      Filter Operator 
[FIL_133] (rows=57591150 width=77)
-                                                        
predicate:(sr_ticket_number is not null and sr_item_sk is not null)
-                                                        TableScan [TS_3] 
(rows=57591150 width=77)
-                                                          
default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_item_sk","sr_ticket_number"]
+                                                    PartitionCols:_col0
+                                                    Select Operator [SEL_8] 
(rows=852 width=1910)
+                                                      
Output:["_col0","_col1","_col3","_col4"]
+                                                      Filter Operator 
[FIL_134] (rows=852 width=1910)
+                                                        
predicate:((s_market_id = 7) and s_store_sk is not null and s_zip is not null)
+                                                        TableScan [TS_6] 
(rows=1704 width=1910)
+                                                          
default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_store_name","s_market_id","s_state","s_zip"]
             <-Reducer 7 [CUSTOM_SIMPLE_EDGE]
               PARTITION_ONLY_SHUFFLE [RS_86]
                 Select Operator [SEL_42] (rows=231911707 width=88)
@@ -236,55 +236,55 @@ Stage-0
                         SHUFFLE [RS_35]
                           PartitionCols:_col0, _col1, _col2
                           Group By Operator [GBY_34] (rows=927646829 width=88)
-                            
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"],aggregations:["sum(_col4)"],keys:_col19,
 _col20, _col14, _col22, _col8, _col9, _col11, _col12, _col16
+                            
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"],aggregations:["sum(_col4)"],keys:_col17,
 _col18, _col12, _col22, _col6, _col7, _col9, _col10, _col14
                             Merge Join Operator [MERGEJOIN_148] 
(rows=927646829 width=88)
-                              Conds:RS_30._col17, _col21=RS_31._col1, 
upper(_col2)(Inner),Output:["_col4","_col8","_col9","_col11","_col12","_col14","_col16","_col19","_col20","_col22"]
+                              Conds:RS_30._col15, _col19=RS_31._col1, 
upper(_col2)(Inner),Output:["_col4","_col6","_col7","_col9","_col10","_col12","_col14","_col17","_col18","_col22"]
                             <-Map 20 [SIMPLE_EDGE]
                               SHUFFLE [RS_31]
                                 PartitionCols:_col1, upper(_col2)
                                  Please refer to the previous Select Operator 
[SEL_17]
                             <-Reducer 5 [SIMPLE_EDGE]
                               SHUFFLE [RS_30]
-                                PartitionCols:_col17, _col21
+                                PartitionCols:_col15, _col19
                                 Merge Join Operator [MERGEJOIN_147] 
(rows=843315281 width=88)
-                                  
Conds:RS_27._col1=RS_28._col0(Inner),Output:["_col4","_col8","_col9","_col11","_col12","_col14","_col16","_col17","_col19","_col20","_col21"]
+                                  Conds:RS_27._col0, _col3=RS_28._col0, 
_col1(Inner),Output:["_col4","_col6","_col7","_col9","_col10","_col12","_col14","_col15","_col17","_col18","_col19"]
                                 <-Map 19 [SIMPLE_EDGE]
                                   SHUFFLE [RS_28]
-                                    PartitionCols:_col0
+                                    PartitionCols:_col0, _col1
                                      Please refer to the previous Select 
Operator [SEL_14]
                                 <-Reducer 4 [SIMPLE_EDGE]
                                   SHUFFLE [RS_27]
-                                    PartitionCols:_col1
+                                    PartitionCols:_col0, _col3
                                     Merge Join Operator [MERGEJOIN_146] 
(rows=766650239 width=88)
-                                      
Conds:RS_24._col2=RS_25._col0(Inner),Output:["_col1","_col4","_col8","_col9","_col11","_col12","_col14","_col16","_col17"]
+                                      
Conds:RS_24._col1=RS_25._col0(Inner),Output:["_col0","_col3","_col4","_col6","_col7","_col9","_col10","_col12","_col14","_col15","_col17","_col18","_col19"]
                                     <-Map 18 [SIMPLE_EDGE]
                                       SHUFFLE [RS_25]
                                         PartitionCols:_col0
                                          Please refer to the previous Select 
Operator [SEL_11]
                                     <-Reducer 3 [SIMPLE_EDGE]
                                       SHUFFLE [RS_24]
-                                        PartitionCols:_col2
+                                        PartitionCols:_col1
                                         Merge Join Operator [MERGEJOIN_145] 
(rows=696954748 width=88)
-                                          
Conds:RS_21._col0=RS_22._col0(Inner),Output:["_col1","_col2","_col4","_col8","_col9","_col11","_col12"]
+                                          
Conds:RS_21._col2=RS_22._col0(Inner),Output:["_col0","_col1","_col3","_col4","_col6","_col7","_col9","_col10","_col12","_col14","_col15"]
                                         <-Map 17 [SIMPLE_EDGE]
                                           SHUFFLE [RS_22]
                                             PartitionCols:_col0
-                                            Select Operator [SEL_8] 
(rows=231000 width=1436)
-                                              
Output:["_col0","_col1","_col2","_col4","_col5"]
-                                              Filter Operator [FIL_134] 
(rows=231000 width=1436)
-                                                predicate:((i_color = 
'orchid') and i_item_sk is not null)
-                                                 Please refer to the previous 
TableScan [TS_6]
+                                             Please refer to the previous 
Select Operator [SEL_8]
                                         <-Reducer 2 [SIMPLE_EDGE]
                                           SHUFFLE [RS_21]
-                                            PartitionCols:_col0
+                                            PartitionCols:_col2
                                             Merge Join Operator 
[MERGEJOIN_144] (rows=633595212 width=88)
-                                              Conds:RS_18._col0, 
_col3=RS_19._col0, _col1(Inner),Output:["_col0","_col1","_col2","_col4"]
+                                              
Conds:RS_18._col0=RS_19._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col9","_col10"]
                                             <-Map 1 [SIMPLE_EDGE]
                                               SHUFFLE [RS_18]
-                                                PartitionCols:_col0, _col3
+                                                PartitionCols:_col0
                                                  Please refer to the previous 
Select Operator [SEL_2]
                                             <-Map 16 [SIMPLE_EDGE]
                                               SHUFFLE [RS_19]
-                                                PartitionCols:_col0, _col1
-                                                 Please refer to the previous 
Select Operator [SEL_5]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_5] 
(rows=231000 width=1436)
+                                                  
Output:["_col0","_col1","_col2","_col4","_col5"]
+                                                  Filter Operator [FIL_133] 
(rows=231000 width=1436)
+                                                    predicate:((i_color = 
'orchid') and i_item_sk is not null)
+                                                     Please refer to the 
previous TableScan [TS_3]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/ff30a1eb/ql/src/test/results/clientpositive/perf/query25.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query25.q.out 
b/ql/src/test/results/clientpositive/perf/query25.q.out
index ee94eec..654ba2d 100644
--- a/ql/src/test/results/clientpositive/perf/query25.q.out
+++ b/ql/src/test/results/clientpositive/perf/query25.q.out
@@ -95,137 +95,135 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 10 <- Map 14 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
-Reducer 12 <- Map 11 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE)
-Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 10 <- Reducer 11 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Map 13 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
 Reducer 3 <- Reducer 10 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
-Reducer 4 <- Map 15 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
-Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 4 <- Map 14 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 15 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
 Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
-Reducer 8 <- Map 7 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE)
-Reducer 9 <- Map 7 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+Reducer 9 <- Map 12 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
     limit:100
     Stage-1
-      Reducer 6
-      File Output Operator [FS_54]
-        Limit [LIM_53] (rows=100 width=88)
+      Reducer 7
+      File Output Operator [FS_55]
+        Limit [LIM_54] (rows=100 width=88)
           Number of rows:100
-          Select Operator [SEL_52] (rows=510205767 width=88)
+          Select Operator [SEL_53] (rows=421657640 width=88)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-          <-Reducer 5 [SIMPLE_EDGE]
-            SHUFFLE [RS_51]
-              Group By Operator [GBY_49] (rows=510205767 width=88)
+          <-Reducer 6 [SIMPLE_EDGE]
+            SHUFFLE [RS_52]
+              Group By Operator [GBY_50] (rows=421657640 width=88)
                 
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0,
 KEY._col1, KEY._col2, KEY._col3
-              <-Reducer 4 [SIMPLE_EDGE]
-                SHUFFLE [RS_48]
+              <-Reducer 5 [SIMPLE_EDGE]
+                SHUFFLE [RS_49]
                   PartitionCols:_col0, _col1, _col2, _col3
-                  Group By Operator [GBY_47] (rows=1020411534 width=88)
-                    
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col18)","sum(_col23)","sum(_col3)"],keys:_col28,
 _col29, _col8, _col9
-                    Merge Join Operator [MERGEJOIN_100] (rows=1020411534 
width=88)
-                      
Conds:RS_43._col14=RS_44._col0(Inner),Output:["_col3","_col8","_col9","_col18","_col23","_col28","_col29"]
+                  Group By Operator [GBY_48] (rows=843315281 width=88)
+                    
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col5)","sum(_col20)","sum(_col12)"],keys:_col25,
 _col26, _col28, _col29
+                    Merge Join Operator [MERGEJOIN_101] (rows=843315281 
width=88)
+                      
Conds:RS_44._col3=RS_45._col0(Inner),Output:["_col5","_col12","_col20","_col25","_col26","_col28","_col29"]
                     <-Map 15 [SIMPLE_EDGE]
-                      SHUFFLE [RS_44]
+                      SHUFFLE [RS_45]
                         PartitionCols:_col0
-                        Select Operator [SEL_36] (rows=462000 width=1436)
+                        Select Operator [SEL_34] (rows=1704 width=1910)
                           Output:["_col0","_col1","_col2"]
-                          Filter Operator [FIL_93] (rows=462000 width=1436)
-                            predicate:i_item_sk is not null
-                            TableScan [TS_34] (rows=462000 width=1436)
-                              
default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id","i_item_desc"]
-                    <-Reducer 3 [SIMPLE_EDGE]
-                      SHUFFLE [RS_43]
-                        PartitionCols:_col14
-                        Merge Join Operator [MERGEJOIN_99] (rows=927646829 
width=88)
-                          Conds:RS_40._col1, _col2=RS_41._col14, 
_col13(Inner),Output:["_col3","_col8","_col9","_col14","_col18","_col23"]
-                        <-Reducer 10 [SIMPLE_EDGE]
+                          Filter Operator [FIL_94] (rows=1704 width=1910)
+                            predicate:s_store_sk is not null
+                            TableScan [TS_32] (rows=1704 width=1910)
+                              
default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_store_id","s_store_name"]
+                    <-Reducer 4 [SIMPLE_EDGE]
+                      SHUFFLE [RS_44]
+                        PartitionCols:_col3
+                        Merge Join Operator [MERGEJOIN_100] (rows=766650239 
width=88)
+                          
Conds:RS_41._col1=RS_42._col0(Inner),Output:["_col3","_col5","_col12","_col20","_col25","_col26"]
+                        <-Map 14 [SIMPLE_EDGE]
+                          SHUFFLE [RS_42]
+                            PartitionCols:_col0
+                            Select Operator [SEL_31] (rows=462000 width=1436)
+                              Output:["_col0","_col1","_col2"]
+                              Filter Operator [FIL_93] (rows=462000 width=1436)
+                                predicate:i_item_sk is not null
+                                TableScan [TS_29] (rows=462000 width=1436)
+                                  
default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id","i_item_desc"]
+                        <-Reducer 3 [SIMPLE_EDGE]
                           SHUFFLE [RS_41]
-                            PartitionCols:_col14, _col13
-                            Select Operator [SEL_33] (rows=843315281 width=88)
-                              
Output:["_col1","_col2","_col7","_col11","_col13","_col14","_col16"]
-                              Merge Join Operator [MERGEJOIN_98] 
(rows=843315281 width=88)
-                                
Conds:RS_30._col3=RS_31._col0(Inner),Output:["_col1","_col5","_col7","_col8","_col10","_col18","_col19"]
-                              <-Map 14 [SIMPLE_EDGE]
-                                SHUFFLE [RS_31]
-                                  PartitionCols:_col0
-                                  Select Operator [SEL_20] (rows=1704 
width=1910)
-                                    Output:["_col0","_col1","_col2"]
-                                    Filter Operator [FIL_92] (rows=1704 
width=1910)
-                                      predicate:s_store_sk is not null
-                                      TableScan [TS_18] (rows=1704 width=1910)
-                                        
default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_store_id","s_store_name"]
-                              <-Reducer 9 [SIMPLE_EDGE]
-                                SHUFFLE [RS_30]
-                                  PartitionCols:_col3
-                                  Merge Join Operator [MERGEJOIN_97] 
(rows=766650239 width=88)
-                                    
Conds:RS_27._col6=RS_28._col0(Inner),Output:["_col1","_col3","_col5","_col7","_col8","_col10"]
-                                  <-Map 7 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_28]
-                                      PartitionCols:_col0
-                                      Select Operator [SEL_17] (rows=4058 
width=1119)
-                                        Output:["_col0"]
-                                        Filter Operator [FIL_91] (rows=4058 
width=1119)
-                                          predicate:(d_moy BETWEEN 4 AND 10 
and (d_year = 2000) and d_date_sk is not null)
-                                          TableScan [TS_3] (rows=73049 
width=1119)
-                                            
default@date_dim,d3,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
-                                  <-Reducer 8 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_27]
-                                      PartitionCols:_col6
-                                      Merge Join Operator [MERGEJOIN_96] 
(rows=696954748 width=88)
-                                        
Conds:RS_24._col0=RS_25._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col8","_col10"]
-                                      <-Map 7 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_25]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_14] (rows=18262 
width=1119)
-                                            Output:["_col0"]
-                                            Filter Operator [FIL_90] 
(rows=18262 width=1119)
-                                              predicate:((d_moy = 4) and 
(d_year = 2000) and d_date_sk is not null)
-                                               Please refer to the previous 
TableScan [TS_3]
-                                      <-Reducer 12 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_24]
-                                          PartitionCols:_col0
-                                          Merge Join Operator [MERGEJOIN_95] 
(rows=633595212 width=88)
-                                            Conds:RS_21._col1, _col2, 
_col4=RS_22._col1, _col2, 
_col3(Inner),Output:["_col0","_col1","_col3","_col5","_col6","_col7","_col8","_col10"]
-                                          <-Map 11 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_21]
-                                              PartitionCols:_col1, _col2, _col4
-                                              Select Operator [SEL_8] 
(rows=575995635 width=88)
-                                                
Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                                Filter Operator [FIL_88] 
(rows=575995635 width=88)
-                                                  predicate:(ss_customer_sk is 
not null and ss_item_sk is not null and ss_ticket_number is not null and 
ss_sold_date_sk is not null and ss_store_sk is not null)
-                                                  TableScan [TS_6] 
(rows=575995635 width=88)
-                                                    
default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_customer_sk","ss_store_sk","ss_ticket_number","ss_net_profit"]
-                                          <-Map 13 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_22]
-                                              PartitionCols:_col1, _col2, _col3
-                                              Select Operator [SEL_11] 
(rows=57591150 width=77)
-                                                
Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                Filter Operator [FIL_89] 
(rows=57591150 width=77)
-                                                  predicate:(sr_customer_sk is 
not null and sr_item_sk is not null and sr_ticket_number is not null and 
sr_returned_date_sk is not null)
-                                                  TableScan [TS_9] 
(rows=57591150 width=77)
-                                                    
default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_returned_date_sk","sr_item_sk","sr_customer_sk","sr_ticket_number","sr_net_loss"]
-                        <-Reducer 2 [SIMPLE_EDGE]
-                          SHUFFLE [RS_40]
-                            PartitionCols:_col1, _col2
-                            Merge Join Operator [MERGEJOIN_94] (rows=316788826 
width=135)
-                              
Conds:RS_37._col0=RS_38._col0(Inner),Output:["_col1","_col2","_col3"]
-                            <-Map 7 [SIMPLE_EDGE]
+                            PartitionCols:_col1
+                            Merge Join Operator [MERGEJOIN_99] (rows=696954748 
width=88)
+                              Conds:RS_38._col1, _col2, _col4=RS_39._col8, 
_col9, _col10(Inner),Output:["_col1","_col3","_col5","_col12","_col20"]
+                            <-Reducer 10 [SIMPLE_EDGE]
+                              SHUFFLE [RS_39]
+                                PartitionCols:_col8, _col9, _col10
+                                Merge Join Operator [MERGEJOIN_98] 
(rows=348467716 width=135)
+                                  Conds:RS_25._col2, _col1=RS_26._col1, 
_col2(Inner),Output:["_col3","_col8","_col9","_col10","_col11"]
+                                <-Reducer 11 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_26]
+                                    PartitionCols:_col1, _col2
+                                    Merge Join Operator [MERGEJOIN_97] 
(rows=63350266 width=77)
+                                      
Conds:RS_18._col0=RS_19._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                                    <-Map 8 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_19]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_17] (rows=4058 
width=1119)
+                                          Output:["_col0"]
+                                          Filter Operator [FIL_92] (rows=4058 
width=1119)
+                                            predicate:(d_moy BETWEEN 4 AND 10 
and (d_year = 2000) and d_date_sk is not null)
+                                            TableScan [TS_3] (rows=73049 
width=1119)
+                                              
default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
+                                    <-Map 13 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_18]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_14] 
(rows=57591150 width=77)
+                                          
Output:["_col0","_col1","_col2","_col3","_col4"]
+                                          Filter Operator [FIL_91] 
(rows=57591150 width=77)
+                                            predicate:(sr_customer_sk is not 
null and sr_item_sk is not null and sr_ticket_number is not null and 
sr_returned_date_sk is not null)
+                                            TableScan [TS_12] (rows=57591150 
width=77)
+                                              
default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_returned_date_sk","sr_item_sk","sr_customer_sk","sr_ticket_number","sr_net_loss"]
+                                <-Reducer 9 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_25]
+                                    PartitionCols:_col2, _col1
+                                    Merge Join Operator [MERGEJOIN_96] 
(rows=316788826 width=135)
+                                      
Conds:RS_22._col0=RS_23._col0(Inner),Output:["_col1","_col2","_col3"]
+                                    <-Map 8 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_23]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_11] (rows=4058 
width=1119)
+                                          Output:["_col0"]
+                                          Filter Operator [FIL_90] (rows=4058 
width=1119)
+                                            predicate:(d_moy BETWEEN 4 AND 10 
and (d_year = 2000) and d_date_sk is not null)
+                                             Please refer to the previous 
TableScan [TS_3]
+                                    <-Map 12 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_22]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_8] 
(rows=287989836 width=135)
+                                          
Output:["_col0","_col1","_col2","_col3"]
+                                          Filter Operator [FIL_89] 
(rows=287989836 width=135)
+                                            predicate:(cs_bill_customer_sk is 
not null and cs_item_sk is not null and cs_sold_date_sk is not null)
+                                            TableScan [TS_6] (rows=287989836 
width=135)
+                                              
default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_net_profit"]
+                            <-Reducer 2 [SIMPLE_EDGE]
                               SHUFFLE [RS_38]
-                                PartitionCols:_col0
-                                Select Operator [SEL_5] (rows=4058 width=1119)
-                                  Output:["_col0"]
-                                  Filter Operator [FIL_87] (rows=4058 
width=1119)
-                                    predicate:(d_moy BETWEEN 4 AND 10 and 
(d_year = 2000) and d_date_sk is not null)
-                                     Please refer to the previous TableScan 
[TS_3]
-                            <-Map 1 [SIMPLE_EDGE]
-                              SHUFFLE [RS_37]
-                                PartitionCols:_col0
-                                Select Operator [SEL_2] (rows=287989836 
width=135)
-                                  Output:["_col0","_col1","_col2","_col3"]
-                                  Filter Operator [FIL_86] (rows=287989836 
width=135)
-                                    predicate:(cs_bill_customer_sk is not null 
and cs_item_sk is not null and cs_sold_date_sk is not null)
-                                    TableScan [TS_0] (rows=287989836 width=135)
-                                      
default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_net_profit"]
+                                PartitionCols:_col1, _col2, _col4
+                                Merge Join Operator [MERGEJOIN_95] 
(rows=633595212 width=88)
+                                  
Conds:RS_35._col0=RS_36._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5"]
+                                <-Map 8 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_36]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_5] (rows=18262 
width=1119)
+                                      Output:["_col0"]
+                                      Filter Operator [FIL_88] (rows=18262 
width=1119)
+                                        predicate:((d_moy = 4) and (d_year = 
2000) and d_date_sk is not null)
+                                         Please refer to the previous 
TableScan [TS_3]
+                                <-Map 1 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_35]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_2] (rows=575995635 
width=88)
+                                      
Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                                      Filter Operator [FIL_87] (rows=575995635 
width=88)
+                                        predicate:(ss_customer_sk is not null 
and ss_item_sk is not null and ss_ticket_number is not null and ss_sold_date_sk 
is not null and ss_store_sk is not null)
+                                        TableScan [TS_0] (rows=575995635 
width=88)
+                                          
default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_customer_sk","ss_store_sk","ss_ticket_number","ss_net_profit"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/ff30a1eb/ql/src/test/results/clientpositive/perf/query29.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query29.q.out 
b/ql/src/test/results/clientpositive/perf/query29.q.out
index b3b9c3e..d64f034 100644
--- a/ql/src/test/results/clientpositive/perf/query29.q.out
+++ b/ql/src/test/results/clientpositive/perf/query29.q.out
@@ -93,138 +93,138 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 10 <- Map 14 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
-Reducer 11 <- Map 14 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE)
-Reducer 12 <- Map 15 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
-Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
-Reducer 3 <- Reducer 12 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
-Reducer 4 <- Map 16 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 10 <- Map 15 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Map 16 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE)
+Reducer 13 <- Map 12 (SIMPLE_EDGE), Map 14 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 11 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
 Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
-Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
-Reducer 9 <- Map 13 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 8 <- Map 12 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 13 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
     limit:100
     Stage-1
-      Reducer 6
-      File Output Operator [FS_54]
-        Limit [LIM_53] (rows=100 width=88)
+      Reducer 5
+      File Output Operator [FS_55]
+        Limit [LIM_54] (rows=100 width=88)
           Number of rows:100
-          Select Operator [SEL_52] (rows=510205767 width=88)
+          Select Operator [SEL_53] (rows=463823414 width=88)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-          <-Reducer 5 [SIMPLE_EDGE]
-            SHUFFLE [RS_51]
-              Group By Operator [GBY_49] (rows=510205767 width=88)
+          <-Reducer 4 [SIMPLE_EDGE]
+            SHUFFLE [RS_52]
+              Group By Operator [GBY_50] (rows=463823414 width=88)
                 
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0,
 KEY._col1, KEY._col2, KEY._col3
-              <-Reducer 4 [SIMPLE_EDGE]
-                SHUFFLE [RS_48]
+              <-Reducer 3 [SIMPLE_EDGE]
+                SHUFFLE [RS_49]
                   PartitionCols:_col0, _col1, _col2, _col3
-                  Group By Operator [GBY_47] (rows=1020411534 width=88)
-                    
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col17)","sum(_col22)","sum(_col3)"],keys:_col27,
 _col28, _col7, _col8
-                    Merge Join Operator [MERGEJOIN_100] (rows=1020411534 
width=88)
-                      
Conds:RS_43._col13=RS_44._col0(Inner),Output:["_col3","_col7","_col8","_col17","_col22","_col27","_col28"]
-                    <-Map 16 [SIMPLE_EDGE]
-                      SHUFFLE [RS_44]
-                        PartitionCols:_col0
-                        Select Operator [SEL_36] (rows=462000 width=1436)
-                          Output:["_col0","_col1","_col2"]
-                          Filter Operator [FIL_93] (rows=462000 width=1436)
-                            predicate:i_item_sk is not null
-                            TableScan [TS_34] (rows=462000 width=1436)
-                              
default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id","i_item_desc"]
-                    <-Reducer 3 [SIMPLE_EDGE]
-                      SHUFFLE [RS_43]
-                        PartitionCols:_col13
-                        Merge Join Operator [MERGEJOIN_99] (rows=927646829 
width=88)
-                          Conds:RS_40._col1, _col2=RS_41._col14, 
_col13(Inner),Output:["_col3","_col7","_col8","_col13","_col17","_col22"]
-                        <-Reducer 12 [SIMPLE_EDGE]
-                          SHUFFLE [RS_41]
-                            PartitionCols:_col14, _col13
-                            Select Operator [SEL_33] (rows=843315281 width=88)
-                              
Output:["_col1","_col2","_col7","_col11","_col13","_col14","_col16"]
-                              Merge Join Operator [MERGEJOIN_98] 
(rows=843315281 width=88)
-                                
Conds:RS_30._col3=RS_31._col0(Inner),Output:["_col1","_col5","_col7","_col8","_col10","_col18","_col19"]
+                  Group By Operator [GBY_48] (rows=927646829 width=88)
+                    
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col14)","sum(_col22)","sum(_col3)"],keys:_col7,
 _col8, _col27, _col28
+                    Merge Join Operator [MERGEJOIN_99] (rows=927646829 
width=88)
+                      Conds:RS_44._col1, _col2=RS_45._col14, 
_col13(Inner),Output:["_col3","_col7","_col8","_col14","_col22","_col27","_col28"]
+                    <-Reducer 11 [SIMPLE_EDGE]
+                      SHUFFLE [RS_45]
+                        PartitionCols:_col14, _col13
+                        Select Operator [SEL_40] (rows=843315281 width=88)
+                          
Output:["_col1","_col2","_col8","_col13","_col14","_col16","_col21","_col22"]
+                          Merge Join Operator [MERGEJOIN_98] (rows=843315281 
width=88)
+                            
Conds:RS_37._col3=RS_38._col0(Inner),Output:["_col5","_col10","_col11","_col13","_col18","_col19","_col21","_col22"]
+                          <-Map 16 [SIMPLE_EDGE]
+                            SHUFFLE [RS_38]
+                              PartitionCols:_col0
+                              Select Operator [SEL_27] (rows=1704 width=1910)
+                                Output:["_col0","_col1","_col2"]
+                                Filter Operator [FIL_92] (rows=1704 width=1910)
+                                  predicate:s_store_sk is not null
+                                  TableScan [TS_25] (rows=1704 width=1910)
+                                    
default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_store_id","s_store_name"]
+                          <-Reducer 10 [SIMPLE_EDGE]
+                            SHUFFLE [RS_37]
+                              PartitionCols:_col3
+                              Merge Join Operator [MERGEJOIN_97] 
(rows=766650239 width=88)
+                                
Conds:RS_34._col1=RS_35._col0(Inner),Output:["_col3","_col5","_col10","_col11","_col13","_col18","_col19"]
                               <-Map 15 [SIMPLE_EDGE]
-                                SHUFFLE [RS_31]
+                                SHUFFLE [RS_35]
                                   PartitionCols:_col0
-                                  Select Operator [SEL_20] (rows=1704 
width=1910)
+                                  Select Operator [SEL_24] (rows=462000 
width=1436)
                                     Output:["_col0","_col1","_col2"]
-                                    Filter Operator [FIL_92] (rows=1704 
width=1910)
-                                      predicate:s_store_sk is not null
-                                      TableScan [TS_18] (rows=1704 width=1910)
-                                        
default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_store_id","s_store_name"]
-                              <-Reducer 11 [SIMPLE_EDGE]
-                                SHUFFLE [RS_30]
-                                  PartitionCols:_col3
-                                  Merge Join Operator [MERGEJOIN_97] 
(rows=766650239 width=88)
-                                    
Conds:RS_27._col6=RS_28._col0(Inner),Output:["_col1","_col3","_col5","_col7","_col8","_col10"]
-                                  <-Map 14 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_28]
-                                      PartitionCols:_col0
-                                      Select Operator [SEL_17] (rows=4058 
width=1119)
-                                        Output:["_col0"]
-                                        Filter Operator [FIL_91] (rows=4058 
width=1119)
-                                          predicate:(d_moy BETWEEN 4 AND 7 and 
(d_year = 1999) and d_date_sk is not null)
-                                          TableScan [TS_12] (rows=73049 
width=1119)
-                                            
default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
-                                  <-Reducer 10 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_27]
-                                      PartitionCols:_col6
-                                      Merge Join Operator [MERGEJOIN_96] 
(rows=696954748 width=88)
-                                        
Conds:RS_24._col0=RS_25._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col8","_col10"]
+                                    Filter Operator [FIL_91] (rows=462000 
width=1436)
+                                      predicate:i_item_sk is not null
+                                      TableScan [TS_22] (rows=462000 
width=1436)
+                                        
default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id","i_item_desc"]
+                              <-Reducer 9 [SIMPLE_EDGE]
+                                SHUFFLE [RS_34]
+                                  PartitionCols:_col1
+                                  Merge Join Operator [MERGEJOIN_96] 
(rows=696954748 width=88)
+                                    Conds:RS_31._col1, _col2, 
_col4=RS_32._col1, _col2, 
_col3(Inner),Output:["_col1","_col3","_col5","_col10","_col11","_col13"]
+                                  <-Reducer 13 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_32]
+                                      PartitionCols:_col1, _col2, _col3
+                                      Merge Join Operator [MERGEJOIN_95] 
(rows=63350266 width=77)
+                                        
Conds:RS_18._col0=RS_19._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                                      <-Map 12 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_19]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_17] (rows=4058 
width=1119)
+                                            Output:["_col0"]
+                                            Filter Operator [FIL_90] 
(rows=4058 width=1119)
+                                              predicate:(d_moy BETWEEN 4 AND 7 
and (d_year = 1999) and d_date_sk is not null)
+                                              TableScan [TS_9] (rows=73049 
width=1119)
+                                                
default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
                                       <-Map 14 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_25]
+                                        SHUFFLE [RS_18]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_14] (rows=18262 
width=1119)
+                                          Select Operator [SEL_14] 
(rows=57591150 width=77)
+                                            
Output:["_col0","_col1","_col2","_col3","_col4"]
+                                            Filter Operator [FIL_89] 
(rows=57591150 width=77)
+                                              predicate:(sr_customer_sk is not 
null and sr_item_sk is not null and sr_ticket_number is not null and 
sr_returned_date_sk is not null)
+                                              TableScan [TS_12] (rows=57591150 
width=77)
+                                                
default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_returned_date_sk","sr_item_sk","sr_customer_sk","sr_ticket_number","sr_return_quantity"]
+                                  <-Reducer 8 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_31]
+                                      PartitionCols:_col1, _col2, _col4
+                                      Merge Join Operator [MERGEJOIN_94] 
(rows=633595212 width=88)
+                                        
Conds:RS_28._col0=RS_29._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5"]
+                                      <-Map 12 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_29]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_11] (rows=18262 
width=1119)
                                             Output:["_col0"]
-                                            Filter Operator [FIL_90] 
(rows=18262 width=1119)
+                                            Filter Operator [FIL_88] 
(rows=18262 width=1119)
                                               predicate:((d_moy = 4) and 
(d_year = 1999) and d_date_sk is not null)
-                                               Please refer to the previous 
TableScan [TS_12]
-                                      <-Reducer 9 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_24]
+                                               Please refer to the previous 
TableScan [TS_9]
+                                      <-Map 7 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_28]
                                           PartitionCols:_col0
-                                          Merge Join Operator [MERGEJOIN_95] 
(rows=633595212 width=88)
-                                            Conds:RS_21._col1, _col2, 
_col4=RS_22._col1, _col2, 
_col3(Inner),Output:["_col0","_col1","_col3","_col5","_col6","_col7","_col8","_col10"]
-                                          <-Map 13 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_22]
-                                              PartitionCols:_col1, _col2, _col3
-                                              Select Operator [SEL_11] 
(rows=57591150 width=77)
-                                                
Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                Filter Operator [FIL_89] 
(rows=57591150 width=77)
-                                                  predicate:(sr_customer_sk is 
not null and sr_item_sk is not null and sr_ticket_number is not null and 
sr_returned_date_sk is not null)
-                                                  TableScan [TS_9] 
(rows=57591150 width=77)
-                                                    
default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_returned_date_sk","sr_item_sk","sr_customer_sk","sr_ticket_number","sr_return_quantity"]
-                                          <-Map 8 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_21]
-                                              PartitionCols:_col1, _col2, _col4
-                                              Select Operator [SEL_8] 
(rows=575995635 width=88)
-                                                
Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                                Filter Operator [FIL_88] 
(rows=575995635 width=88)
-                                                  predicate:(ss_customer_sk is 
not null and ss_item_sk is not null and ss_ticket_number is not null and 
ss_sold_date_sk is not null and ss_store_sk is not null)
-                                                  TableScan [TS_6] 
(rows=575995635 width=88)
-                                                    
default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_customer_sk","ss_store_sk","ss_ticket_number","ss_quantity"]
-                        <-Reducer 2 [SIMPLE_EDGE]
-                          SHUFFLE [RS_40]
-                            PartitionCols:_col1, _col2
-                            Merge Join Operator [MERGEJOIN_94] (rows=316788826 
width=135)
-                              
Conds:RS_37._col0=RS_38._col0(Inner),Output:["_col1","_col2","_col3"]
-                            <-Map 1 [SIMPLE_EDGE]
-                              SHUFFLE [RS_37]
-                                PartitionCols:_col0
-                                Select Operator [SEL_2] (rows=287989836 
width=135)
-                                  Output:["_col0","_col1","_col2","_col3"]
-                                  Filter Operator [FIL_86] (rows=287989836 
width=135)
-                                    predicate:(cs_bill_customer_sk is not null 
and cs_item_sk is not null and cs_sold_date_sk is not null)
-                                    TableScan [TS_0] (rows=287989836 width=135)
-                                      
default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_quantity"]
-                            <-Map 7 [SIMPLE_EDGE]
-                              SHUFFLE [RS_38]
-                                PartitionCols:_col0
-                                Select Operator [SEL_5] (rows=36525 width=1119)
-                                  Output:["_col0"]
-                                  Filter Operator [FIL_87] (rows=36525 
width=1119)
-                                    predicate:((d_year) IN (1999, 2000, 2001) 
and d_date_sk is not null)
-                                    TableScan [TS_3] (rows=73049 width=1119)
-                                      
default@date_dim,d3,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
+                                          Select Operator [SEL_8] 
(rows=575995635 width=88)
+                                            
Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                                            Filter Operator [FIL_87] 
(rows=575995635 width=88)
+                                              predicate:(ss_customer_sk is not 
null and ss_item_sk is not null and ss_ticket_number is not null and 
ss_sold_date_sk is not null and ss_store_sk is not null)
+                                              TableScan [TS_6] (rows=575995635 
width=88)
+                                                
default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_customer_sk","ss_store_sk","ss_ticket_number","ss_quantity"]
+                    <-Reducer 2 [SIMPLE_EDGE]
+                      SHUFFLE [RS_44]
+                        PartitionCols:_col1, _col2
+                        Merge Join Operator [MERGEJOIN_93] (rows=316788826 
width=135)
+                          
Conds:RS_41._col0=RS_42._col0(Inner),Output:["_col1","_col2","_col3"]
+                        <-Map 1 [SIMPLE_EDGE]
+                          SHUFFLE [RS_41]
+                            PartitionCols:_col0
+                            Select Operator [SEL_2] (rows=287989836 width=135)
+                              Output:["_col0","_col1","_col2","_col3"]
+                              Filter Operator [FIL_85] (rows=287989836 
width=135)
+                                predicate:(cs_bill_customer_sk is not null and 
cs_item_sk is not null and cs_sold_date_sk is not null)
+                                TableScan [TS_0] (rows=287989836 width=135)
+                                  
default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_quantity"]
+                        <-Map 6 [SIMPLE_EDGE]
+                          SHUFFLE [RS_42]
+                            PartitionCols:_col0
+                            Select Operator [SEL_5] (rows=36525 width=1119)
+                              Output:["_col0"]
+                              Filter Operator [FIL_86] (rows=36525 width=1119)
+                                predicate:((d_year) IN (1999, 2000, 2001) and 
d_date_sk is not null)
+                                TableScan [TS_3] (rows=73049 width=1119)
+                                  
default@date_dim,d3,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
 

Reply via email to