http://git-wip-us.apache.org/repos/asf/hive/blob/09b6f9a3/ql/src/test/results/clientpositive/perf/query65.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query65.q.out
b/ql/src/test/results/clientpositive/perf/query65.q.out
new file mode 100644
index 0000000..14596be
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query65.q.out
@@ -0,0 +1,315 @@
+Warning: Shuffle Join MERGEJOIN[81][tables = [$hdt$_0, $hdt$_1]] in Stage
'Reducer 2' is a cross product
+Warning: Shuffle Join MERGEJOIN[84][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in
Stage 'Reducer 3' is a cross product
+PREHOOK: query: explain select
+ s_store_name,
+ i_item_desc,
+ sc.revenue,
+ i_current_price,
+ i_wholesale_cost,
+ i_brand
+from
+ store,
+ item,
+ (select
+ ss_store_sk, avg(revenue) as ave
+ from
+ (select
+ ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue
+ from
+ store_sales, date_dim
+ where
+ ss_sold_date_sk = d_date_sk
+ and d_month_seq between 1212 and 1212 + 11
+ group by ss_store_sk , ss_item_sk) sa
+ group by ss_store_sk) sb,
+ (select
+ ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue
+ from
+ store_sales, date_dim
+ where
+ ss_sold_date_sk = d_date_sk
+ and d_month_seq between 1212 and 1212 + 11
+ group by ss_store_sk , ss_item_sk) sc
+where
+ sb.ss_store_sk = sc.ss_store_sk
+ and sc.revenue <= 0.1 * sb.ave
+ and s_store_sk = sc.ss_store_sk
+ and i_item_sk = sc.ss_item_sk
+order by s_store_name , i_item_desc
+limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select
+ s_store_name,
+ i_item_desc,
+ sc.revenue,
+ i_current_price,
+ i_wholesale_cost,
+ i_brand
+from
+ store,
+ item,
+ (select
+ ss_store_sk, avg(revenue) as ave
+ from
+ (select
+ ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue
+ from
+ store_sales, date_dim
+ where
+ ss_sold_date_sk = d_date_sk
+ and d_month_seq between 1212 and 1212 + 11
+ group by ss_store_sk , ss_item_sk) sa
+ group by ss_store_sk) sb,
+ (select
+ ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue
+ from
+ store_sales, date_dim
+ where
+ ss_sold_date_sk = d_date_sk
+ and d_month_seq between 1212 and 1212 + 11
+ group by ss_store_sk , ss_item_sk) sc
+where
+ sb.ss_store_sk = sc.ss_store_sk
+ and sc.revenue <= 0.1 * sb.ave
+ and s_store_sk = sc.ss_store_sk
+ and i_item_sk = sc.ss_item_sk
+order by s_store_name , i_item_desc
+limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 10 <- Reducer 9 (SIMPLE_EDGE)
+Reducer 13 <- Map 12 (SIMPLE_EDGE), Map 15 (SIMPLE_EDGE)
+Reducer 14 <- Reducer 13 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 10 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 14 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 8 <- Map 11 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 5
+ File Output Operator [FS_61]
+ 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_60]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats:
COMPLETE Column stats: NONE
+ Select Operator [SEL_59]
+ |
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 204974 Data size: 294399674 Basic
stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_58]
+ key expressions:_col0 (type: string), _col1 (type: string)
+ sort order:++
+ Statistics:Num rows: 204974 Data size: 294399674 Basic
stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(17,2)), _col3
(type: decimal(7,2)), _col4 (type: decimal(7,2)), _col5 (type: string)
+ Select Operator [SEL_57]
+
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 204974 Data size: 294399674 Basic
stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_74]
+ predicate:(_col11 <= CAST( (0.1 *
UDFToDouble(_col8)) AS decimal(30,15))) (type: boolean)
+ Statistics:Num rows: 204974 Data size: 294399674
Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_85]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col7 (type: int), _col0 (type: int),
_col2 (type: int)","1":"_col0 (type: int), _col0 (type: int), _col1 (type:
int)"}
+ |
outputColumnNames:["_col1","_col3","_col4","_col5","_col6","_col8","_col11"]
+ | Statistics:Num rows: 614922 Data size: 883199024
Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_54]
+ | key expressions:_col0 (type: int), _col0
(type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col0 (type:
int), _col0 (type: int), _col1 (type: int)
+ | sort order:+++
+ | Statistics:Num rows: 20088 Data size:
22478696 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: decimal(17,2))
+ | Select Operator [SEL_42]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 20088 Data size:
22478696 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_41]
+ | | aggregations:["sum(VALUE._col0)"]
+ | | keys:KEY._col0 (type: int), KEY._col1
(type: int)
+ | |
outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 20088 Data size:
22478696 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_40]
+ | key expressions:_col0 (type: int),
_col1 (type: int)
+ | Map-reduce partition columns:_col0
(type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 40176 Data
size: 44957392 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type:
decimal(17,2))
+ | Group By Operator [GBY_39]
+ | aggregations:["sum(_col3)"]
+ | keys:_col1 (type: int), _col2
(type: int)
+ |
outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 40176 Data
size: 44957392 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_83]
+ | | condition map:[{"":"Inner Join
0 to 1"}]
+ | | keys:{"0":"_col0 (type:
int)","1":"_col0 (type: int)"}
+ | |
outputColumnNames:["_col1","_col2","_col3"]
+ | | Statistics:Num rows: 40176
Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 12 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_34]
+ | | key expressions:_col0
(type: int)
+ | | Map-reduce partition
columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data
size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col1
(type: int), _col2 (type: int), _col3 (type: decimal(7,2))
+ | | Select Operator [SEL_29]
+ | |
outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | Statistics:Num rows: 1
Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_79]
+ | |
predicate:((ss_sold_date_sk is not null and ss_item_sk is not null) and
ss_store_sk is not null) (type: boolean)
+ | | Statistics:Num rows:
1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_27]
+ | | alias:store_sales
+ | | Statistics:Num
rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_36]
+ | 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_32]
+ |
outputColumnNames:["_col0"]
+ | Statistics:Num rows:
36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_80]
+ |
predicate:(d_month_seq BETWEEN 1212 AND 1223 and d_date_sk is not null) (type:
boolean)
+ | Statistics:Num rows:
36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_30]
+ | alias:date_dim
+ | Statistics:Num
rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_52]
+ key expressions:_col7 (type: int), _col0
(type: int), _col2 (type: int)
+ Map-reduce partition columns:_col7 (type:
int), _col0 (type: int), _col2 (type: int)
+ sort order:+++
+ Statistics:Num rows: 559020 Data size:
802908187 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col3
(type: string), _col4 (type: decimal(7,2)), _col5 (type: decimal(7,2)), _col6
(type: string), _col8 (type: decimal(21,6))
+ Merge Join Operator [MERGEJOIN_84]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{}
+ |
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
+ | Statistics:Num rows: 559020 Data size:
802908187 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_49]
+ | sort order:
+ | Statistics:Num rows: 10044 Data size:
11239348 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: int),
_col1 (type: decimal(21,6))
+ | Group By Operator [GBY_25]
+ | | aggregations:["avg(VALUE._col0)"]
+ | | keys:KEY._col0 (type: int)
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 10044 Data
size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_24]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition
columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20088 Data
size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type:
struct<count:bigint,sum:decimal(27,2),input:decimal(17,2)>)
+ | Group By Operator [GBY_23]
+ | aggregations:["avg(_col2)"]
+ | keys:_col1 (type: int)
+ |
outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 20088
Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_21]
+ |
outputColumnNames:["_col1","_col2"]
+ | Statistics:Num rows: 20088
Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_20]
+ | |
aggregations:["sum(VALUE._col0)"]
+ | | keys:KEY._col0 (type:
int), KEY._col1 (type: int)
+ | |
outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows:
20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 8 [SIMPLE_EDGE]
+ | Reduce Output Operator
[RS_19]
+ | key expressions:_col0
(type: int), _col1 (type: int)
+ | Map-reduce partition
columns:_col0 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows:
40176 Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
+ | value
expressions:_col2 (type: decimal(17,2))
+ | Group By Operator
[GBY_18]
+ |
aggregations:["sum(_col3)"]
+ | keys:_col1 (type:
int), _col2 (type: int)
+ |
outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num
rows: 40176 Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join
Operator [MERGEJOIN_82]
+ | | condition
map:[{"":"Inner Join 0 to 1"}]
+ | |
keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | |
outputColumnNames:["_col1","_col2","_col3"]
+ | | Statistics:Num
rows: 40176 Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 11
[SIMPLE_EDGE]
+ | | Reduce Output
Operator [RS_15]
+ | | 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_11]
+ | |
outputColumnNames:["_col0"]
+ | |
Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column
stats: NONE
+ | | Filter
Operator [FIL_78]
+ | |
predicate:(d_month_seq BETWEEN 1212 AND 1223 and d_date_sk is not null) (type:
boolean)
+ | |
Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column
stats: NONE
+ | |
TableScan [TS_9]
+ | |
alias:date_dim
+ | |
Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column
stats: NONE
+ | |<-Map 7
[SIMPLE_EDGE]
+ | Reduce Output
Operator [RS_13]
+ | key
expressions:_col0 (type: int)
+ | Map-reduce
partition columns:_col0 (type: int)
+ | sort order:+
+ |
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value
expressions:_col1 (type: int), _col2 (type: int), _col3 (type: decimal(7,2))
+ | Select
Operator [SEL_8]
+ |
outputColumnNames:["_col0","_col1","_col2","_col3"]
+ |
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter
Operator [FIL_77]
+ |
predicate:(ss_sold_date_sk is not null and ss_store_sk is not null) (type:
boolean)
+ |
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |
TableScan [TS_6]
+ |
alias:store_sales
+ |
Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_48]
+ sort order:
+ Statistics:Num rows: 508200 Data size:
729916518 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int),
_col1 (type: string), _col2 (type: int), _col3 (type: string), _col4 (type:
decimal(7,2)), _col5 (type: decimal(7,2)), _col6 (type: string)
+ Merge Join Operator [MERGEJOIN_81]
+ | condition map:[{"":"Inner Join 0 to
1"}]
+ | keys:{}
+ |
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 508200 Data
size: 729916518 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_45]
+ | sort order:
+ | Statistics:Num rows: 1704 Data
size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type:
int), _col1 (type: string)
+ | Select Operator [SEL_2]
+ |
outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 1704 Data
size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_75]
+ | predicate:s_store_sk is not
null (type: boolean)
+ | Statistics:Num rows: 1704
Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store
+ | Statistics:Num rows:
1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_46]
+ sort order:
+ Statistics:Num rows: 462000 Data
size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type:
int), _col1 (type: string), _col2 (type: decimal(7,2)), _col3 (type:
decimal(7,2)), _col4 (type: string)
+ Select Operator [SEL_5]
+
outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 462000
Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_76]
+ predicate:i_item_sk is not
null (type: boolean)
+ Statistics:Num rows: 462000
Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_3]
+ alias:item
+ Statistics:Num rows:
462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+