http://git-wip-us.apache.org/repos/asf/hive/blob/09b6f9a3/ql/src/test/results/clientpositive/perf/query54.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query54.q.out 
b/ql/src/test/results/clientpositive/perf/query54.q.out
new file mode 100644
index 0000000..8ccb868
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query54.q.out
@@ -0,0 +1,314 @@
+PREHOOK: query: explain with my_customers as ( select c_customer_sk , 
c_current_addr_sk from ( select cs_sold_date_sk sold_date_sk, 
cs_bill_customer_sk customer_sk, cs_item_sk item_sk from catalog_sales union 
all select ws_sold_date_sk sold_date_sk, ws_bill_customer_sk customer_sk, 
ws_item_sk item_sk from web_sales ) cs_or_ws_sales, item, date_dim, customer 
where sold_date_sk = d_date_sk and item_sk = i_item_sk and i_category = 
'Jewelry' and i_class = 'football' and c_customer_sk = 
cs_or_ws_sales.customer_sk and d_moy = 3 and d_year = 2000 group by 
c_customer_sk , c_current_addr_sk ) , my_revenue as ( select c_customer_sk, 
sum(ss_ext_sales_price) as revenue from my_customers, store_sales, 
customer_address, store, date_dim where c_current_addr_sk = ca_address_sk and 
ca_county = s_county and ca_state = s_state and ss_sold_date_sk = d_date_sk and 
c_customer_sk = ss_customer_sk and d_month_seq between (1203) and (1205) group 
by c_customer_sk ) , segments as (select cast((revenue/50) as 
 int) as segment from my_revenue ) select segment, count(*) as num_customers, 
segment*50 as segment_base from segments group by segment order by segment, 
num_customers limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain with my_customers as ( select c_customer_sk , 
c_current_addr_sk from ( select cs_sold_date_sk sold_date_sk, 
cs_bill_customer_sk customer_sk, cs_item_sk item_sk from catalog_sales union 
all select ws_sold_date_sk sold_date_sk, ws_bill_customer_sk customer_sk, 
ws_item_sk item_sk from web_sales ) cs_or_ws_sales, item, date_dim, customer 
where sold_date_sk = d_date_sk and item_sk = i_item_sk and i_category = 
'Jewelry' and i_class = 'football' and c_customer_sk = 
cs_or_ws_sales.customer_sk and d_moy = 3 and d_year = 2000 group by 
c_customer_sk , c_current_addr_sk ) , my_revenue as ( select c_customer_sk, 
sum(ss_ext_sales_price) as revenue from my_customers, store_sales, 
customer_address, store, date_dim where c_current_addr_sk = ca_address_sk and 
ca_county = s_county and ca_state = s_state and ss_sold_date_sk = d_date_sk and 
c_customer_sk = ss_customer_sk and d_month_seq between (1203) and (1205) group 
by c_customer_sk ) , segments as (select cast((revenue/50) as
  int) as segment from my_revenue ) select segment, count(*) as num_customers, 
segment*50 as segment_base from segments group by segment order by segment, 
num_customers limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Map 1 <- Union 2 (CONTAINS)
+Map 14 <- Union 2 (CONTAINS)
+Reducer 10 <- Map 21 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Reducer 10 (SIMPLE_EDGE)
+Reducer 12 <- Reducer 11 (SIMPLE_EDGE)
+Reducer 13 <- Reducer 12 (SIMPLE_EDGE)
+Reducer 3 <- Map 15 (SIMPLE_EDGE), Union 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 16 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 17 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Map 18 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Map 19 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Map 20 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+   Fetch Operator
+      limit:100
+      Stage-1
+         Reducer 13
+         File Output Operator [FS_82]
+            compressed:false
+            Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE 
Column stats: NONE
+            table:{"input 
format:":"org.apache.hadoop.mapred.TextInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+            Limit [LIM_81]
+               Number of rows:100
+               Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE 
Column stats: NONE
+               Select Operator [SEL_80]
+               |  outputColumnNames:["_col0","_col1","_col2"]
+               |  Statistics:Num rows: 16105101 Data size: 13850712636 Basic 
stats: COMPLETE Column stats: NONE
+               |<-Reducer 12 [SIMPLE_EDGE]
+                  Reduce Output Operator [RS_79]
+                     key expressions:_col0 (type: int), _col1 (type: bigint)
+                     sort order:++
+                     Statistics:Num rows: 16105101 Data size: 13850712636 
Basic stats: COMPLETE Column stats: NONE
+                     value expressions:_col2 (type: int)
+                     Select Operator [SEL_78]
+                        outputColumnNames:["_col0","_col1","_col2"]
+                        Statistics:Num rows: 16105101 Data size: 13850712636 
Basic stats: COMPLETE Column stats: NONE
+                        Group By Operator [GBY_77]
+                        |  aggregations:["count(VALUE._col0)"]
+                        |  keys:KEY._col0 (type: int)
+                        |  outputColumnNames:["_col0","_col1"]
+                        |  Statistics:Num rows: 16105101 Data size: 
13850712636 Basic stats: COMPLETE Column stats: NONE
+                        |<-Reducer 11 [SIMPLE_EDGE]
+                           Reduce Output Operator [RS_76]
+                              key expressions:_col0 (type: int)
+                              Map-reduce partition columns:_col0 (type: int)
+                              sort order:+
+                              Statistics:Num rows: 32210202 Data size: 
27701425272 Basic stats: COMPLETE Column stats: NONE
+                              value expressions:_col1 (type: bigint)
+                              Group By Operator [GBY_75]
+                                 aggregations:["count()"]
+                                 keys:_col0 (type: int)
+                                 outputColumnNames:["_col0","_col1"]
+                                 Statistics:Num rows: 32210202 Data size: 
27701425272 Basic stats: COMPLETE Column stats: NONE
+                                 Select Operator [SEL_73]
+                                    outputColumnNames:["_col0"]
+                                    Statistics:Num rows: 32210202 Data size: 
27701425272 Basic stats: COMPLETE Column stats: NONE
+                                    Group By Operator [GBY_72]
+                                    |  aggregations:["sum(VALUE._col0)"]
+                                    |  keys:KEY._col0 (type: int)
+                                    |  outputColumnNames:["_col0","_col1"]
+                                    |  Statistics:Num rows: 32210202 Data 
size: 27701425272 Basic stats: COMPLETE Column stats: NONE
+                                    |<-Reducer 10 [SIMPLE_EDGE]
+                                       Reduce Output Operator [RS_71]
+                                          key expressions:_col0 (type: int)
+                                          Map-reduce partition columns:_col0 
(type: int)
+                                          sort order:+
+                                          Statistics:Num rows: 64420404 Data 
size: 55402850544 Basic stats: COMPLETE Column stats: NONE
+                                          value expressions:_col1 (type: 
decimal(17,2))
+                                          Group By Operator [GBY_70]
+                                             aggregations:["sum(_col4)"]
+                                             keys:_col0 (type: int)
+                                             
outputColumnNames:["_col0","_col1"]
+                                             Statistics:Num rows: 64420404 
Data size: 55402850544 Basic stats: COMPLETE Column stats: NONE
+                                             Merge Join Operator 
[MERGEJOIN_140]
+                                             |  condition map:[{"":"Inner Join 
0 to 1"}]
+                                             |  keys:{"0":"_col2 (type: 
int)","1":"_col0 (type: int)"}
+                                             |  
outputColumnNames:["_col0","_col4"]
+                                             |  Statistics:Num rows: 64420404 
Data size: 55402850544 Basic stats: COMPLETE Column stats: NONE
+                                             |<-Map 21 [SIMPLE_EDGE]
+                                             |  Reduce Output Operator [RS_67]
+                                             |     key expressions:_col0 
(type: int)
+                                             |     Map-reduce partition 
columns:_col0 (type: int)
+                                             |     sort order:+
+                                             |     Statistics:Num rows: 36524 
Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
+                                             |     Select Operator [SEL_48]
+                                             |        
outputColumnNames:["_col0"]
+                                             |        Statistics:Num rows: 
36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
+                                             |        Filter Operator [FIL_133]
+                                             |           
predicate:(d_month_seq BETWEEN 1203 AND 1205 and d_date_sk is not null) (type: 
boolean)
+                                             |           Statistics:Num rows: 
36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
+                                             |           TableScan [TS_46]
+                                             |              alias:date_dim
+                                             |              Statistics:Num 
rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+                                             |<-Reducer 9 [SIMPLE_EDGE]
+                                                Reduce Output Operator [RS_65]
+                                                   key expressions:_col2 
(type: int)
+                                                   Map-reduce partition 
columns:_col2 (type: int)
+                                                   sort order:+
+                                                   Statistics:Num rows: 
58564003 Data size: 50366226676 Basic stats: COMPLETE Column stats: NONE
+                                                   value expressions:_col0 
(type: int), _col4 (type: decimal(7,2))
+                                                   Merge Join Operator 
[MERGEJOIN_139]
+                                                   |  condition 
map:[{"":"Inner Join 0 to 1"}]
+                                                   |  keys:{"0":"_col6 (type: 
string), _col7 (type: string)","1":"_col0 (type: string), _col1 (type: string)"}
+                                                   |  
outputColumnNames:["_col0","_col2","_col4"]
+                                                   |  Statistics:Num rows: 
58564003 Data size: 50366226676 Basic stats: COMPLETE Column stats: NONE
+                                                   |<-Map 20 [SIMPLE_EDGE]
+                                                   |  Reduce Output Operator 
[RS_62]
+                                                   |     key expressions:_col0 
(type: string), _col1 (type: string)
+                                                   |     Map-reduce partition 
columns:_col0 (type: string), _col1 (type: string)
+                                                   |     sort order:++
+                                                   |     Statistics:Num rows: 
1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+                                                   |     Select Operator 
[SEL_45]
+                                                   |        
outputColumnNames:["_col0","_col1"]
+                                                   |        Statistics:Num 
rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+                                                   |        Filter Operator 
[FIL_132]
+                                                   |           
predicate:(s_county is not null and s_state is not null) (type: boolean)
+                                                   |           Statistics:Num 
rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+                                                   |           TableScan 
[TS_43]
+                                                   |              alias:store
+                                                   |              
Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column 
stats: NONE
+                                                   |<-Reducer 8 [SIMPLE_EDGE]
+                                                      Reduce Output Operator 
[RS_60]
+                                                         key expressions:_col6 
(type: string), _col7 (type: string)
+                                                         Map-reduce partition 
columns:_col6 (type: string), _col7 (type: string)
+                                                         sort order:++
+                                                         Statistics:Num rows: 
53240002 Data size: 45787477804 Basic stats: COMPLETE Column stats: NONE
+                                                         value 
expressions:_col0 (type: int), _col2 (type: int), _col4 (type: decimal(7,2))
+                                                         Merge Join Operator 
[MERGEJOIN_138]
+                                                         |  condition 
map:[{"":"Inner Join 0 to 1"}]
+                                                         |  keys:{"0":"_col1 
(type: int)","1":"_col0 (type: int)"}
+                                                         |  
outputColumnNames:["_col0","_col2","_col4","_col6","_col7"]
+                                                         |  Statistics:Num 
rows: 53240002 Data size: 45787477804 Basic stats: COMPLETE Column stats: NONE
+                                                         |<-Map 19 
[SIMPLE_EDGE]
+                                                         |  Reduce Output 
Operator [RS_57]
+                                                         |     key 
expressions:_col0 (type: int)
+                                                         |     Map-reduce 
partition columns:_col0 (type: int)
+                                                         |     sort order:+
+                                                         |     Statistics:Num 
rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+                                                         |     value 
expressions:_col1 (type: string), _col2 (type: string)
+                                                         |     Select Operator 
[SEL_42]
+                                                         |        
outputColumnNames:["_col0","_col1","_col2"]
+                                                         |        
Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE 
Column stats: NONE
+                                                         |        Filter 
Operator [FIL_131]
+                                                         |           
predicate:((ca_address_sk is not null and ca_state is not null) and ca_county 
is not null) (type: boolean)
+                                                         |           
Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE 
Column stats: NONE
+                                                         |           TableScan 
[TS_40]
+                                                         |              
alias:customer_address
+                                                         |              
Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE 
Column stats: NONE
+                                                         |<-Reducer 7 
[SIMPLE_EDGE]
+                                                            Reduce Output 
Operator [RS_55]
+                                                               key 
expressions:_col1 (type: int)
+                                                               Map-reduce 
partition columns:_col1 (type: int)
+                                                               sort order:+
+                                                               Statistics:Num 
rows: 48400001 Data size: 41624978920 Basic stats: COMPLETE Column stats: NONE
+                                                               value 
expressions:_col0 (type: int), _col2 (type: int), _col4 (type: decimal(7,2))
+                                                               Merge Join 
Operator [MERGEJOIN_137]
+                                                               |  condition 
map:[{"":"Inner Join 0 to 1"}]
+                                                               |  
keys:{"0":"_col0 (type: int)","1":"_col1 (type: int)"}
+                                                               |  
outputColumnNames:["_col0","_col1","_col2","_col4"]
+                                                               |  
Statistics:Num rows: 48400001 Data size: 41624978920 Basic stats: COMPLETE 
Column stats: NONE
+                                                               |<-Map 18 
[SIMPLE_EDGE]
+                                                               |  Reduce 
Output Operator [RS_52]
+                                                               |     key 
expressions:_col1 (type: int)
+                                                               |     
Map-reduce partition columns:_col1 (type: int)
+                                                               |     sort 
order:+
+                                                               |     
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+                                                               |     value 
expressions:_col0 (type: int), _col2 (type: decimal(7,2))
+                                                               |     Select 
Operator [SEL_39]
+                                                               |        
outputColumnNames:["_col0","_col1","_col2"]
+                                                               |        
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+                                                               |        Filter 
Operator [FIL_130]
+                                                               |           
predicate:(ss_customer_sk is not null and ss_sold_date_sk is not null) (type: 
boolean)
+                                                               |           
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+                                                               |           
TableScan [TS_37]
+                                                               |              
alias:store_sales
+                                                               |              
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+                                                               |<-Reducer 6 
[SIMPLE_EDGE]
+                                                                  Reduce 
Output Operator [RS_50]
+                                                                     key 
expressions:_col0 (type: int)
+                                                                     
Map-reduce partition columns:_col0 (type: int)
+                                                                     sort 
order:+
+                                                                     
Statistics:Num rows: 44000000 Data size: 37840889108 Basic stats: COMPLETE 
Column stats: NONE
+                                                                     value 
expressions:_col1 (type: int)
+                                                                     Group By 
Operator [GBY_35]
+                                                                     |  
keys:KEY._col0 (type: int), KEY._col1 (type: int)
+                                                                     |  
outputColumnNames:["_col0","_col1"]
+                                                                     |  
Statistics:Num rows: 44000000 Data size: 37840889108 Basic stats: COMPLETE 
Column stats: NONE
+                                                                     
|<-Reducer 5 [SIMPLE_EDGE]
+                                                                        Reduce 
Output Operator [RS_34]
+                                                                           key 
expressions:_col0 (type: int), _col1 (type: int)
+                                                                           
Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+                                                                           
sort order:++
+                                                                           
Statistics:Num rows: 88000001 Data size: 75681779077 Basic stats: COMPLETE 
Column stats: NONE
+                                                                           
Group By Operator [GBY_33]
+                                                                              
keys:_col9 (type: int), _col10 (type: int)
+                                                                              
outputColumnNames:["_col0","_col1"]
+                                                                              
Statistics:Num rows: 88000001 Data size: 75681779077 Basic stats: COMPLETE 
Column stats: NONE
+                                                                              
Merge Join Operator [MERGEJOIN_136]
+                                                                              
|  condition map:[{"":"Inner Join 0 to 1"}]
+                                                                              
|  keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+                                                                              
|  outputColumnNames:["_col9","_col10"]
+                                                                              
|  Statistics:Num rows: 88000001 Data size: 75681779077 Basic stats: COMPLETE 
Column stats: NONE
+                                                                              
|<-Map 17 [SIMPLE_EDGE]
+                                                                              
|  Reduce Output Operator [RS_30]
+                                                                              
|     key expressions:_col0 (type: int)
+                                                                              
|     Map-reduce partition columns:_col0 (type: int)
+                                                                              
|     sort order:+
+                                                                              
|     Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: 
COMPLETE Column stats: NONE
+                                                                              
|     value expressions:_col1 (type: int)
+                                                                              
|     Select Operator [SEL_16]
+                                                                              
|        outputColumnNames:["_col0","_col1"]
+                                                                              
|        Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: 
COMPLETE Column stats: NONE
+                                                                              
|        Filter Operator [FIL_129]
+                                                                              
|           predicate:(c_customer_sk is not null and c_current_addr_sk is not 
null) (type: boolean)
+                                                                              
|           Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: 
COMPLETE Column stats: NONE
+                                                                              
|           TableScan [TS_14]
+                                                                              
|              alias:customer
+                                                                              
|              Statistics:Num rows: 80000000 Data size: 68801615852 Basic 
stats: COMPLETE Column stats: NONE
+                                                                              
|<-Reducer 4 [SIMPLE_EDGE]
+                                                                               
  Reduce Output Operator [RS_28]
+                                                                               
     key expressions:_col1 (type: int)
+                                                                               
     Map-reduce partition columns:_col1 (type: int)
+                                                                               
     sort order:+
+                                                                               
     Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE 
Column stats: NONE
+                                                                               
     Merge Join Operator [MERGEJOIN_135]
+                                                                               
     |  condition map:[{"":"Inner Join 0 to 1"}]
+                                                                               
     |  keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+                                                                               
     |  outputColumnNames:["_col1"]
+                                                                               
     |  Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE 
Column stats: NONE
+                                                                               
     |<-Map 16 [SIMPLE_EDGE]
+                                                                               
     |  Reduce Output Operator [RS_25]
+                                                                               
     |     key expressions:_col0 (type: int)
+                                                                               
     |     Map-reduce partition columns:_col0 (type: int)
+                                                                               
     |     sort order:+
+                                                                               
     |     Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE 
Column stats: NONE
+                                                                               
     |     Select Operator [SEL_13]
+                                                                               
     |        outputColumnNames:["_col0"]
+                                                                               
     |        Statistics:Num rows: 18262 Data size: 20435178 Basic stats: 
COMPLETE Column stats: NONE
+                                                                               
     |        Filter Operator [FIL_128]
+                                                                               
     |           predicate:(((d_year = 2000) and (d_moy = 3)) and d_date_sk is 
not null) (type: boolean)
+                                                                               
     |           Statistics:Num rows: 18262 Data size: 20435178 Basic stats: 
COMPLETE Column stats: NONE
+                                                                               
     |           TableScan [TS_11]
+                                                                               
     |              alias:date_dim
+                                                                               
     |              Statistics:Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
+                                                                               
     |<-Reducer 3 [SIMPLE_EDGE]
+                                                                               
        Reduce Output Operator [RS_23]
+                                                                               
           key expressions:_col0 (type: int)
+                                                                               
           Map-reduce partition columns:_col0 (type: int)
+                                                                               
           sort order:+
+                                                                               
           Statistics:Num rows: 127050 Data size: 182479129 Basic stats: 
COMPLETE Column stats: NONE
+                                                                               
           value expressions:_col1 (type: int)
+                                                                               
           Merge Join Operator [MERGEJOIN_134]
+                                                                               
           |  condition map:[{"":"Inner Join 0 to 1"}]
+                                                                               
           |  keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+                                                                               
           |  outputColumnNames:["_col0","_col1"]
+                                                                               
           |  Statistics:Num rows: 127050 Data size: 182479129 Basic stats: 
COMPLETE Column stats: NONE
+                                                                               
           |<-Map 15 [SIMPLE_EDGE]
+                                                                               
           |  Reduce Output Operator [RS_20]
+                                                                               
           |     key expressions:_col0 (type: int)
+                                                                               
           |     Map-reduce partition columns:_col0 (type: int)
+                                                                               
           |     sort order:+
+                                                                               
           |     Statistics:Num rows: 115500 Data size: 165890114 Basic stats: 
COMPLETE Column stats: NONE
+                                                                               
           |     Select Operator [SEL_10]
+                                                                               
           |        outputColumnNames:["_col0"]
+                                                                               
           |        Statistics:Num rows: 115500 Data size: 165890114 Basic 
stats: COMPLETE Column stats: NONE
+                                                                               
           |        Filter Operator [FIL_127]
+                                                                               
           |           predicate:(((i_category = 'Jewelry') and (i_class = 
'football')) and i_item_sk is not null) (type: boolean)
+                                                                               
           |           Statistics:Num rows: 115500 Data size: 165890114 Basic 
stats: COMPLETE Column stats: NONE
+                                                                               
           |           TableScan [TS_8]
+                                                                               
           |              alias:item
+                                                                               
           |              Statistics:Num rows: 462000 Data size: 663560457 
Basic stats: COMPLETE Column stats: NONE
+                                                                               
           |<-Union 2 [SIMPLE_EDGE]
+                                                                               
              |<-Map 1 [CONTAINS]
+                                                                               
              |  Reduce Output Operator [RS_18]
+                                                                               
              |     key expressions:_col2 (type: int)
+                                                                               
              |     Map-reduce partition columns:_col2 (type: int)
+                                                                               
              |     sort order:+
+                                                                               
              |     Statistics:Num rows: 2 Data size: 0 Basic stats: PARTIAL 
Column stats: NONE
+                                                                               
              |     value expressions:_col0 (type: int), _col1 (type: int)
+                                                                               
              |     Select Operator [SEL_2]
+                                                                               
              |        outputColumnNames:["_col0","_col1","_col2"]
+                                                                               
              |        Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL 
Column stats: NONE
+                                                                               
              |        Filter Operator [FIL_125]
+                                                                               
              |           predicate:((cs_item_sk is not null and 
cs_sold_date_sk is not null) and cs_bill_customer_sk is not null) (type: 
boolean)
+                                                                               
              |           Statistics:Num rows: 1 Data size: 0 Basic stats: 
PARTIAL Column stats: NONE
+                                                                               
              |           TableScan [TS_0]
+                                                                               
              |              alias:catalog_sales
+                                                                               
              |              Statistics:Num rows: 1 Data size: 0 Basic stats: 
PARTIAL Column stats: NONE
+                                                                               
              |<-Map 14 [CONTAINS]
+                                                                               
                 Reduce Output Operator [RS_18]
+                                                                               
                    key expressions:_col2 (type: int)
+                                                                               
                    Map-reduce partition columns:_col2 (type: int)
+                                                                               
                    sort order:+
+                                                                               
                    Statistics:Num rows: 2 Data size: 0 Basic stats: PARTIAL 
Column stats: NONE
+                                                                               
                    value expressions:_col0 (type: int), _col1 (type: int)
+                                                                               
                    Select Operator [SEL_5]
+                                                                               
                       outputColumnNames:["_col0","_col1","_col2"]
+                                                                               
                       Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL 
Column stats: NONE
+                                                                               
                       Filter Operator [FIL_126]
+                                                                               
                          predicate:((ws_item_sk is not null and 
ws_sold_date_sk is not null) and ws_bill_customer_sk is not null) (type: 
boolean)
+                                                                               
                          Statistics:Num rows: 1 Data size: 0 Basic stats: 
PARTIAL Column stats: NONE
+                                                                               
                          TableScan [TS_3]
+                                                                               
                             alias:web_sales
+                                                                               
                             Statistics:Num rows: 1 Data size: 0 Basic stats: 
PARTIAL Column stats: NONE
+

http://git-wip-us.apache.org/repos/asf/hive/blob/09b6f9a3/ql/src/test/results/clientpositive/perf/query55.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query55.q.out 
b/ql/src/test/results/clientpositive/perf/query55.q.out
new file mode 100644
index 0000000..6b849c6
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query55.q.out
@@ -0,0 +1,118 @@
+PREHOOK: query: explain select i_brand_id brand_id, i_brand brand, 
sum(ss_ext_sales_price) ext_price from date_dim, store_sales, item where 
date_dim.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = 
item.i_item_sk and i_manager_id=36 and d_moy=12 and d_year=2001 group by 
i_brand, i_brand_id order by ext_price desc, i_brand_id limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select i_brand_id brand_id, i_brand brand, 
sum(ss_ext_sales_price) ext_price from date_dim, store_sales, item where 
date_dim.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = 
item.i_item_sk and i_manager_id=36 and d_moy=12 and d_year=2001 group by 
i_brand, i_brand_id order by ext_price desc, i_brand_id limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+Reducer 3 <- Map 7 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+
+Stage-0
+   Fetch Operator
+      limit:100
+      Stage-1
+         Reducer 5
+         File Output Operator [FS_28]
+            compressed:false
+            Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE 
Column stats: NONE
+            table:{"input 
format:":"org.apache.hadoop.mapred.TextInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+            Limit [LIM_27]
+               Number of rows:100
+               Statistics:Num rows: 100 Data size: 143600 Basic stats: 
COMPLETE Column stats: NONE
+               Select Operator [SEL_26]
+               |  outputColumnNames:["_col0","_col1","_col2"]
+               |  Statistics:Num rows: 127050 Data size: 182479129 Basic 
stats: COMPLETE Column stats: NONE
+               |<-Reducer 4 [SIMPLE_EDGE]
+                  Reduce Output Operator [RS_25]
+                     key expressions:_col2 (type: decimal(17,2)), _col0 (type: 
int)
+                     sort order:-+
+                     Statistics:Num rows: 127050 Data size: 182479129 Basic 
stats: COMPLETE Column stats: NONE
+                     value expressions:_col1 (type: string)
+                     Group By Operator [GBY_22]
+                     |  aggregations:["sum(VALUE._col0)"]
+                     |  keys:KEY._col0 (type: int), KEY._col1 (type: string)
+                     |  outputColumnNames:["_col0","_col1","_col2"]
+                     |  Statistics:Num rows: 127050 Data size: 182479129 Basic 
stats: COMPLETE Column stats: NONE
+                     |<-Reducer 3 [SIMPLE_EDGE]
+                        Reduce Output Operator [RS_21]
+                           key expressions:_col0 (type: int), _col1 (type: 
string)
+                           Map-reduce partition columns:_col0 (type: int), 
_col1 (type: string)
+                           sort order:++
+                           Statistics:Num rows: 254100 Data size: 364958258 
Basic stats: COMPLETE Column stats: NONE
+                           value expressions:_col2 (type: decimal(17,2))
+                           Group By Operator [GBY_20]
+                              aggregations:["sum(_col5)"]
+                              keys:_col7 (type: int), _col8 (type: string)
+                              outputColumnNames:["_col0","_col1","_col2"]
+                              Statistics:Num rows: 254100 Data size: 364958258 
Basic stats: COMPLETE Column stats: NONE
+                              Select Operator [SEL_19]
+                                 outputColumnNames:["_col7","_col8","_col5"]
+                                 Statistics:Num rows: 254100 Data size: 
364958258 Basic stats: COMPLETE Column stats: NONE
+                                 Merge Join Operator [MERGEJOIN_38]
+                                 |  condition map:[{"":"Inner Join 0 to 1"}]
+                                 |  keys:{"0":"_col4 (type: int)","1":"_col0 
(type: int)"}
+                                 |  outputColumnNames:["_col5","_col7","_col8"]
+                                 |  Statistics:Num rows: 254100 Data size: 
364958258 Basic stats: COMPLETE Column stats: NONE
+                                 |<-Map 7 [SIMPLE_EDGE]
+                                 |  Reduce Output Operator [RS_17]
+                                 |     key expressions:_col0 (type: int)
+                                 |     Map-reduce partition columns:_col0 
(type: int)
+                                 |     sort order:+
+                                 |     Statistics:Num rows: 231000 Data size: 
331780228 Basic stats: COMPLETE Column stats: NONE
+                                 |     value expressions:_col1 (type: int), 
_col2 (type: string)
+                                 |     Select Operator [SEL_8]
+                                 |        
outputColumnNames:["_col0","_col1","_col2"]
+                                 |        Statistics:Num rows: 231000 Data 
size: 331780228 Basic stats: COMPLETE Column stats: NONE
+                                 |        Filter Operator [FIL_36]
+                                 |           predicate:((i_manager_id = 36) 
and i_item_sk is not null) (type: boolean)
+                                 |           Statistics:Num rows: 231000 Data 
size: 331780228 Basic stats: COMPLETE Column stats: NONE
+                                 |           TableScan [TS_6]
+                                 |              alias:item
+                                 |              Statistics:Num rows: 462000 
Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+                                 |<-Reducer 2 [SIMPLE_EDGE]
+                                    Reduce Output Operator [RS_15]
+                                       key expressions:_col4 (type: int)
+                                       Map-reduce partition columns:_col4 
(type: int)
+                                       sort order:+
+                                       Statistics:Num rows: 20088 Data size: 
22478696 Basic stats: COMPLETE Column stats: NONE
+                                       value expressions:_col5 (type: 
decimal(7,2))
+                                       Merge Join Operator [MERGEJOIN_37]
+                                       |  condition map:[{"":"Inner Join 0 to 
1"}]
+                                       |  keys:{"0":"_col0 (type: 
int)","1":"_col0 (type: int)"}
+                                       |  outputColumnNames:["_col4","_col5"]
+                                       |  Statistics:Num rows: 20088 Data 
size: 22478696 Basic stats: COMPLETE Column stats: NONE
+                                       |<-Map 1 [SIMPLE_EDGE]
+                                       |  Reduce Output Operator [RS_10]
+                                       |     key expressions:_col0 (type: int)
+                                       |     Map-reduce partition 
columns:_col0 (type: int)
+                                       |     sort order:+
+                                       |     Statistics:Num rows: 18262 Data 
size: 20435178 Basic stats: COMPLETE Column stats: NONE
+                                       |     Select Operator [SEL_2]
+                                       |        outputColumnNames:["_col0"]
+                                       |        Statistics:Num rows: 18262 
Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+                                       |        Filter Operator [FIL_34]
+                                       |           predicate:(((d_moy = 12) 
and d_date_sk is not null) and (d_year = 2001)) (type: boolean)
+                                       |           Statistics:Num rows: 18262 
Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+                                       |           TableScan [TS_0]
+                                       |              alias:date_dim
+                                       |              Statistics:Num rows: 
73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+                                       |<-Map 6 [SIMPLE_EDGE]
+                                          Reduce Output Operator [RS_12]
+                                             key expressions:_col0 (type: int)
+                                             Map-reduce partition 
columns:_col0 (type: int)
+                                             sort order:+
+                                             Statistics:Num rows: 1 Data size: 
0 Basic stats: PARTIAL Column stats: NONE
+                                             value expressions:_col1 (type: 
int), _col2 (type: decimal(7,2))
+                                             Select Operator [SEL_5]
+                                                
outputColumnNames:["_col0","_col1","_col2"]
+                                                Statistics:Num rows: 1 Data 
size: 0 Basic stats: PARTIAL Column stats: NONE
+                                                Filter Operator [FIL_35]
+                                                   predicate:(ss_sold_date_sk 
is not null and ss_item_sk is not null) (type: boolean)
+                                                   Statistics:Num rows: 1 Data 
size: 0 Basic stats: PARTIAL Column stats: NONE
+                                                   TableScan [TS_3]
+                                                      alias:store_sales
+                                                      Statistics:Num rows: 1 
Data size: 0 Basic stats: PARTIAL Column stats: NONE
+

Reply via email to