You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jc...@apache.org on 2018/10/22 02:10:19 UTC
[14/51] [partial] hive git commit: HIVE-20718: Add perf cli driver
with constraints (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)
http://git-wip-us.apache.org/repos/asf/hive/blob/b8299551/ql/src/test/results/clientpositive/perf/tez/constraints/query56.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query56.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query56.q.out
new file mode 100644
index 0000000..b57ded3
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query56.q.out
@@ -0,0 +1,470 @@
+PREHOOK: query: explain
+with ss as (
+ select i_item_id,sum(ss_ext_sales_price) total_sales
+ from
+ store_sales,
+ date_dim,
+ customer_address,
+ item
+ where i_item_id in (select
+ i_item_id
+from item
+where i_color in ('orchid','chiffon','lace'))
+ and ss_item_sk = i_item_sk
+ and ss_sold_date_sk = d_date_sk
+ and d_year = 2000
+ and d_moy = 1
+ and ss_addr_sk = ca_address_sk
+ and ca_gmt_offset = -8
+ group by i_item_id),
+ cs as (
+ select i_item_id,sum(cs_ext_sales_price) total_sales
+ from
+ catalog_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ i_item_id in (select
+ i_item_id
+from item
+where i_color in ('orchid','chiffon','lace'))
+ and cs_item_sk = i_item_sk
+ and cs_sold_date_sk = d_date_sk
+ and d_year = 2000
+ and d_moy = 1
+ and cs_bill_addr_sk = ca_address_sk
+ and ca_gmt_offset = -8
+ group by i_item_id),
+ ws as (
+ select i_item_id,sum(ws_ext_sales_price) total_sales
+ from
+ web_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ i_item_id in (select
+ i_item_id
+from item
+where i_color in ('orchid','chiffon','lace'))
+ and ws_item_sk = i_item_sk
+ and ws_sold_date_sk = d_date_sk
+ and d_year = 2000
+ and d_moy = 1
+ and ws_bill_addr_sk = ca_address_sk
+ and ca_gmt_offset = -8
+ group by i_item_id)
+ select i_item_id ,sum(total_sales) total_sales
+ from (select * from ss
+ union all
+ select * from cs
+ union all
+ select * from ws) tmp1
+ group by i_item_id
+ order by total_sales
+ limit 100
+PREHOOK: type: QUERY
+PREHOOK: Input: default@catalog_sales
+PREHOOK: Input: default@customer_address
+PREHOOK: Input: default@date_dim
+PREHOOK: Input: default@item
+PREHOOK: Input: default@store_sales
+PREHOOK: Input: default@web_sales
+PREHOOK: Output: hdfs://### HDFS PATH ###
+POSTHOOK: query: explain
+with ss as (
+ select i_item_id,sum(ss_ext_sales_price) total_sales
+ from
+ store_sales,
+ date_dim,
+ customer_address,
+ item
+ where i_item_id in (select
+ i_item_id
+from item
+where i_color in ('orchid','chiffon','lace'))
+ and ss_item_sk = i_item_sk
+ and ss_sold_date_sk = d_date_sk
+ and d_year = 2000
+ and d_moy = 1
+ and ss_addr_sk = ca_address_sk
+ and ca_gmt_offset = -8
+ group by i_item_id),
+ cs as (
+ select i_item_id,sum(cs_ext_sales_price) total_sales
+ from
+ catalog_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ i_item_id in (select
+ i_item_id
+from item
+where i_color in ('orchid','chiffon','lace'))
+ and cs_item_sk = i_item_sk
+ and cs_sold_date_sk = d_date_sk
+ and d_year = 2000
+ and d_moy = 1
+ and cs_bill_addr_sk = ca_address_sk
+ and ca_gmt_offset = -8
+ group by i_item_id),
+ ws as (
+ select i_item_id,sum(ws_ext_sales_price) total_sales
+ from
+ web_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ i_item_id in (select
+ i_item_id
+from item
+where i_color in ('orchid','chiffon','lace'))
+ and ws_item_sk = i_item_sk
+ and ws_sold_date_sk = d_date_sk
+ and d_year = 2000
+ and d_moy = 1
+ and ws_bill_addr_sk = ca_address_sk
+ and ca_gmt_offset = -8
+ group by i_item_id)
+ select i_item_id ,sum(total_sales) total_sales
+ from (select * from ss
+ union all
+ select * from cs
+ union all
+ select * from ws) tmp1
+ group by i_item_id
+ order by total_sales
+ limit 100
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@catalog_sales
+POSTHOOK: Input: default@customer_address
+POSTHOOK: Input: default@date_dim
+POSTHOOK: Input: default@item
+POSTHOOK: Input: default@store_sales
+POSTHOOK: Input: default@web_sales
+POSTHOOK: Output: hdfs://### HDFS PATH ###
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Map 17 <- Reducer 21 (BROADCAST_EDGE), Reducer 29 (BROADCAST_EDGE), Reducer 8 (BROADCAST_EDGE)
+Map 32 <- Reducer 11 (BROADCAST_EDGE), Reducer 24 (BROADCAST_EDGE), Reducer 30 (BROADCAST_EDGE)
+Map 33 <- Reducer 14 (BROADCAST_EDGE), Reducer 27 (BROADCAST_EDGE), Reducer 31 (BROADCAST_EDGE)
+Reducer 10 <- Reducer 9 (SIMPLE_EDGE), Union 5 (CONTAINS)
+Reducer 11 <- Reducer 2 (CUSTOM_SIMPLE_EDGE)
+Reducer 12 <- Reducer 2 (SIMPLE_EDGE), Reducer 26 (SIMPLE_EDGE)
+Reducer 13 <- Reducer 12 (SIMPLE_EDGE), Union 5 (CONTAINS)
+Reducer 14 <- Reducer 2 (CUSTOM_SIMPLE_EDGE)
+Reducer 16 <- Map 15 (SIMPLE_EDGE)
+Reducer 18 <- Map 17 (SIMPLE_EDGE), Map 20 (SIMPLE_EDGE)
+Reducer 19 <- Map 28 (SIMPLE_EDGE), Reducer 18 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 16 (ONE_TO_ONE_EDGE)
+Reducer 21 <- Map 20 (CUSTOM_SIMPLE_EDGE)
+Reducer 22 <- Map 20 (SIMPLE_EDGE), Map 32 (SIMPLE_EDGE)
+Reducer 23 <- Map 28 (SIMPLE_EDGE), Reducer 22 (SIMPLE_EDGE)
+Reducer 24 <- Map 20 (CUSTOM_SIMPLE_EDGE)
+Reducer 25 <- Map 20 (SIMPLE_EDGE), Map 33 (SIMPLE_EDGE)
+Reducer 26 <- Map 28 (SIMPLE_EDGE), Reducer 25 (SIMPLE_EDGE)
+Reducer 27 <- Map 20 (CUSTOM_SIMPLE_EDGE)
+Reducer 29 <- Map 28 (CUSTOM_SIMPLE_EDGE)
+Reducer 3 <- Reducer 19 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 30 <- Map 28 (CUSTOM_SIMPLE_EDGE)
+Reducer 31 <- Map 28 (CUSTOM_SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE), Union 5 (CONTAINS)
+Reducer 6 <- Union 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Reducer 2 (CUSTOM_SIMPLE_EDGE)
+Reducer 9 <- Reducer 2 (SIMPLE_EDGE), Reducer 23 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 7 vectorized
+ File Output Operator [FS_370]
+ Limit [LIM_369] (rows=100 width=212)
+ Number of rows:100
+ Select Operator [SEL_368] (rows=430 width=212)
+ Output:["_col0","_col1"]
+ <-Reducer 6 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_367]
+ Group By Operator [GBY_366] (rows=430 width=212)
+ Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
+ <-Union 5 [SIMPLE_EDGE]
+ <-Reducer 10 [CONTAINS] vectorized
+ Reduce Output Operator [RS_382]
+ PartitionCols:_col0
+ Group By Operator [GBY_381] (rows=430 width=212)
+ Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
+ Group By Operator [GBY_380] (rows=430 width=212)
+ Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
+ <-Reducer 9 [SIMPLE_EDGE]
+ SHUFFLE [RS_69]
+ PartitionCols:_col0
+ Group By Operator [GBY_68] (rows=430 width=212)
+ Output:["_col0","_col1"],aggregations:["sum(_col7)"],keys:_col1
+ Merge Join Operator [MERGEJOIN_304] (rows=373066 width=100)
+ Conds:RS_64._col0=RS_65._col3(Inner),Output:["_col1","_col7"]
+ <-Reducer 2 [SIMPLE_EDGE]
+ SHUFFLE [RS_64]
+ PartitionCols:_col0
+ Merge Join Operator [MERGEJOIN_294] (rows=17170 width=104)
+ Conds:RS_319._col1=RS_325._col0(Inner),Output:["_col0","_col1"]
+ <-Map 1 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_319]
+ PartitionCols:_col1
+ Select Operator [SEL_318] (rows=462000 width=104)
+ Output:["_col0","_col1"]
+ TableScan [TS_0] (rows=462000 width=104)
+ default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_item_id"]
+ <-Reducer 16 [ONE_TO_ONE_EDGE] vectorized
+ FORWARD [RS_325]
+ PartitionCols:_col0
+ Group By Operator [GBY_324] (rows=11550 width=100)
+ Output:["_col0"],keys:KEY._col0
+ <-Map 15 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_323]
+ PartitionCols:_col0
+ Group By Operator [GBY_322] (rows=11550 width=100)
+ Output:["_col0"],keys:i_item_id
+ Select Operator [SEL_321] (rows=23100 width=189)
+ Output:["i_item_id"]
+ Filter Operator [FIL_320] (rows=23100 width=189)
+ predicate:(i_color) IN ('orchid', 'chiffon', 'lace')
+ TableScan [TS_2] (rows=462000 width=189)
+ default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_id","i_color"]
+ <-Reducer 23 [SIMPLE_EDGE]
+ SHUFFLE [RS_65]
+ PartitionCols:_col3
+ Select Operator [SEL_60] (rows=1550375 width=13)
+ Output:["_col3","_col4"]
+ Merge Join Operator [MERGEJOIN_299] (rows=1550375 width=13)
+ Conds:RS_57._col1=RS_346._col0(Inner),Output:["_col2","_col3"]
+ <-Map 28 [SIMPLE_EDGE] vectorized
+ PARTITION_ONLY_SHUFFLE [RS_346]
+ PartitionCols:_col0
+ Select Operator [SEL_343] (rows=8000000 width=4)
+ Output:["_col0"]
+ Filter Operator [FIL_342] (rows=8000000 width=112)
+ predicate:(ca_gmt_offset = -8)
+ TableScan [TS_15] (rows=40000000 width=112)
+ default@customer_address,customer_address,Tbl:COMPLETE,Col:COMPLETE,Output:["ca_address_sk","ca_gmt_offset"]
+ <-Reducer 22 [SIMPLE_EDGE]
+ SHUFFLE [RS_57]
+ PartitionCols:_col1
+ Merge Join Operator [MERGEJOIN_298] (rows=7751872 width=98)
+ Conds:RS_379._col0=RS_330._col0(Inner),Output:["_col1","_col2","_col3"]
+ <-Map 20 [SIMPLE_EDGE] vectorized
+ PARTITION_ONLY_SHUFFLE [RS_330]
+ PartitionCols:_col0
+ Select Operator [SEL_327] (rows=50 width=4)
+ Output:["_col0"]
+ Filter Operator [FIL_326] (rows=50 width=12)
+ predicate:((d_moy = 1) and (d_year = 2000))
+ TableScan [TS_12] (rows=73049 width=12)
+ default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year","d_moy"]
+ <-Map 32 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_379]
+ PartitionCols:_col0
+ Select Operator [SEL_378] (rows=285117733 width=123)
+ Output:["_col0","_col1","_col2","_col3"]
+ Filter Operator [FIL_377] (rows=285117733 width=123)
+ predicate:((cs_bill_addr_sk BETWEEN DynamicValue(RS_58_customer_address_ca_address_sk_min) AND DynamicValue(RS_58_customer_address_ca_address_sk_max) and in_bloom_filter(cs_bill_addr_sk, DynamicValue(RS_58_customer_address_ca_address_sk_bloom_filter))) and (cs_item_sk BETWEEN DynamicValue(RS_64_item_i_item_sk_min) AND DynamicValue(RS_64_item_i_item_sk_max) and in_bloom_filter(cs_item_sk, DynamicValue(RS_64_item_i_item_sk_bloom_filter))) and (cs_sold_date_sk BETWEEN DynamicValue(RS_55_date_dim_d_date_sk_min) AND DynamicValue(RS_55_date_dim_d_date_sk_max) and in_bloom_filter(cs_sold_date_sk, DynamicValue(RS_55_date_dim_d_date_sk_bloom_filter))) and cs_bill_addr_sk is not null and cs_sold_date_sk is not null)
+ TableScan [TS_45] (rows=287989836 width=123)
+ default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["cs_sold_date_sk","cs_bill_addr_sk","cs_item_sk","cs_ext_sales_price"]
+ <-Reducer 11 [BROADCAST_EDGE] vectorized
+ BROADCAST [RS_376]
+ Group By Operator [GBY_375] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+ <-Reducer 2 [CUSTOM_SIMPLE_EDGE]
+ SHUFFLE [RS_239]
+ Group By Operator [GBY_238] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+ Select Operator [SEL_237] (rows=17170 width=4)
+ Output:["_col0"]
+ Please refer to the previous Merge Join Operator [MERGEJOIN_294]
+ <-Reducer 24 [BROADCAST_EDGE] vectorized
+ BROADCAST [RS_372]
+ Group By Operator [GBY_371] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+ <-Map 20 [CUSTOM_SIMPLE_EDGE] vectorized
+ PARTITION_ONLY_SHUFFLE [RS_338]
+ Group By Operator [GBY_335] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+ Select Operator [SEL_331] (rows=50 width=4)
+ Output:["_col0"]
+ Please refer to the previous Select Operator [SEL_327]
+ <-Reducer 30 [BROADCAST_EDGE] vectorized
+ BROADCAST [RS_374]
+ Group By Operator [GBY_373] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=8000000)"]
+ <-Map 28 [CUSTOM_SIMPLE_EDGE] vectorized
+ PARTITION_ONLY_SHUFFLE [RS_354]
+ Group By Operator [GBY_351] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=8000000)"]
+ Select Operator [SEL_347] (rows=8000000 width=4)
+ Output:["_col0"]
+ Please refer to the previous Select Operator [SEL_343]
+ <-Reducer 13 [CONTAINS] vectorized
+ Reduce Output Operator [RS_394]
+ PartitionCols:_col0
+ Group By Operator [GBY_393] (rows=430 width=212)
+ Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
+ Group By Operator [GBY_392] (rows=430 width=212)
+ Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
+ <-Reducer 12 [SIMPLE_EDGE]
+ SHUFFLE [RS_106]
+ PartitionCols:_col0
+ Group By Operator [GBY_105] (rows=430 width=212)
+ Output:["_col0","_col1"],aggregations:["sum(_col7)"],keys:_col1
+ Merge Join Operator [MERGEJOIN_305] (rows=189670 width=190)
+ Conds:RS_101._col0=RS_102._col2(Inner),Output:["_col1","_col7"]
+ <-Reducer 2 [SIMPLE_EDGE]
+ SHUFFLE [RS_101]
+ PartitionCols:_col0
+ Please refer to the previous Merge Join Operator [MERGEJOIN_294]
+ <-Reducer 26 [SIMPLE_EDGE]
+ SHUFFLE [RS_102]
+ PartitionCols:_col2
+ Select Operator [SEL_97] (rows=788222 width=110)
+ Output:["_col2","_col4"]
+ Merge Join Operator [MERGEJOIN_302] (rows=788222 width=110)
+ Conds:RS_94._col2=RS_348._col0(Inner),Output:["_col1","_col3"]
+ <-Map 28 [SIMPLE_EDGE] vectorized
+ PARTITION_ONLY_SHUFFLE [RS_348]
+ PartitionCols:_col0
+ Please refer to the previous Select Operator [SEL_343]
+ <-Reducer 25 [SIMPLE_EDGE]
+ SHUFFLE [RS_94]
+ PartitionCols:_col2
+ Merge Join Operator [MERGEJOIN_301] (rows=3941109 width=118)
+ Conds:RS_391._col0=RS_332._col0(Inner),Output:["_col1","_col2","_col3"]
+ <-Map 20 [SIMPLE_EDGE] vectorized
+ PARTITION_ONLY_SHUFFLE [RS_332]
+ PartitionCols:_col0
+ Please refer to the previous Select Operator [SEL_327]
+ <-Map 33 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_391]
+ PartitionCols:_col0
+ Select Operator [SEL_390] (rows=143931246 width=123)
+ Output:["_col0","_col1","_col2","_col3"]
+ Filter Operator [FIL_389] (rows=143931246 width=123)
+ predicate:((ws_bill_addr_sk BETWEEN DynamicValue(RS_95_customer_address_ca_address_sk_min) AND DynamicValue(RS_95_customer_address_ca_address_sk_max) and in_bloom_filter(ws_bill_addr_sk, DynamicValue(RS_95_customer_address_ca_address_sk_bloom_filter))) and (ws_item_sk BETWEEN DynamicValue(RS_101_item_i_item_sk_min) AND DynamicValue(RS_101_item_i_item_sk_max) and in_bloom_filter(ws_item_sk, DynamicValue(RS_101_item_i_item_sk_bloom_filter))) and (ws_sold_date_sk BETWEEN DynamicValue(RS_92_date_dim_d_date_sk_min) AND DynamicValue(RS_92_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_92_date_dim_d_date_sk_bloom_filter))) and ws_bill_addr_sk is not null and ws_sold_date_sk is not null)
+ TableScan [TS_82] (rows=144002668 width=123)
+ default@web_sales,web_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ws_sold_date_sk","ws_item_sk","ws_bill_addr_sk","ws_ext_sales_price"]
+ <-Reducer 14 [BROADCAST_EDGE] vectorized
+ BROADCAST [RS_388]
+ Group By Operator [GBY_387] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+ <-Reducer 2 [CUSTOM_SIMPLE_EDGE]
+ SHUFFLE [RS_285]
+ Group By Operator [GBY_284] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+ Select Operator [SEL_283] (rows=17170 width=4)
+ Output:["_col0"]
+ Please refer to the previous Merge Join Operator [MERGEJOIN_294]
+ <-Reducer 27 [BROADCAST_EDGE] vectorized
+ BROADCAST [RS_384]
+ Group By Operator [GBY_383] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+ <-Map 20 [CUSTOM_SIMPLE_EDGE] vectorized
+ PARTITION_ONLY_SHUFFLE [RS_339]
+ Group By Operator [GBY_336] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+ Select Operator [SEL_333] (rows=50 width=4)
+ Output:["_col0"]
+ Please refer to the previous Select Operator [SEL_327]
+ <-Reducer 31 [BROADCAST_EDGE] vectorized
+ BROADCAST [RS_386]
+ Group By Operator [GBY_385] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=8000000)"]
+ <-Map 28 [CUSTOM_SIMPLE_EDGE] vectorized
+ PARTITION_ONLY_SHUFFLE [RS_355]
+ Group By Operator [GBY_352] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=8000000)"]
+ Select Operator [SEL_349] (rows=8000000 width=4)
+ Output:["_col0"]
+ Please refer to the previous Select Operator [SEL_343]
+ <-Reducer 4 [CONTAINS] vectorized
+ Reduce Output Operator [RS_365]
+ PartitionCols:_col0
+ Group By Operator [GBY_364] (rows=430 width=212)
+ Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
+ Group By Operator [GBY_363] (rows=430 width=212)
+ Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
+ <-Reducer 3 [SIMPLE_EDGE]
+ SHUFFLE [RS_33]
+ PartitionCols:_col0
+ Group By Operator [GBY_32] (rows=430 width=212)
+ Output:["_col0","_col1"],aggregations:["sum(_col7)"],keys:_col1
+ Merge Join Operator [MERGEJOIN_303] (rows=692265 width=100)
+ Conds:RS_28._col0=RS_29._col2(Inner),Output:["_col1","_col7"]
+ <-Reducer 2 [SIMPLE_EDGE]
+ SHUFFLE [RS_28]
+ PartitionCols:_col0
+ Please refer to the previous Merge Join Operator [MERGEJOIN_294]
+ <-Reducer 19 [SIMPLE_EDGE]
+ SHUFFLE [RS_29]
+ PartitionCols:_col2
+ Select Operator [SEL_24] (rows=2876890 width=4)
+ Output:["_col2","_col4"]
+ Merge Join Operator [MERGEJOIN_296] (rows=2876890 width=4)
+ Conds:RS_21._col2=RS_344._col0(Inner),Output:["_col1","_col3"]
+ <-Map 28 [SIMPLE_EDGE] vectorized
+ PARTITION_ONLY_SHUFFLE [RS_344]
+ PartitionCols:_col0
+ Please refer to the previous Select Operator [SEL_343]
+ <-Reducer 18 [SIMPLE_EDGE]
+ SHUFFLE [RS_21]
+ PartitionCols:_col2
+ Merge Join Operator [MERGEJOIN_295] (rows=14384447 width=4)
+ Conds:RS_362._col0=RS_328._col0(Inner),Output:["_col1","_col2","_col3"]
+ <-Map 20 [SIMPLE_EDGE] vectorized
+ PARTITION_ONLY_SHUFFLE [RS_328]
+ PartitionCols:_col0
+ Please refer to the previous Select Operator [SEL_327]
+ <-Map 17 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_362]
+ PartitionCols:_col0
+ Select Operator [SEL_361] (rows=525327191 width=118)
+ Output:["_col0","_col1","_col2","_col3"]
+ Filter Operator [FIL_360] (rows=525327191 width=118)
+ predicate:((ss_addr_sk BETWEEN DynamicValue(RS_22_customer_address_ca_address_sk_min) AND DynamicValue(RS_22_customer_address_ca_address_sk_max) and in_bloom_filter(ss_addr_sk, DynamicValue(RS_22_customer_address_ca_address_sk_bloom_filter))) and (ss_item_sk BETWEEN DynamicValue(RS_28_item_i_item_sk_min) AND DynamicValue(RS_28_item_i_item_sk_max) and in_bloom_filter(ss_item_sk, DynamicValue(RS_28_item_i_item_sk_bloom_filter))) and (ss_sold_date_sk BETWEEN DynamicValue(RS_19_date_dim_d_date_sk_min) AND DynamicValue(RS_19_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_19_date_dim_d_date_sk_bloom_filter))) and ss_addr_sk is not null and ss_sold_date_sk is not null)
+ TableScan [TS_9] (rows=575995635 width=118)
+ default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_item_sk","ss_addr_sk","ss_ext_sales_price"]
+ <-Reducer 21 [BROADCAST_EDGE] vectorized
+ BROADCAST [RS_341]
+ Group By Operator [GBY_340] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+ <-Map 20 [CUSTOM_SIMPLE_EDGE] vectorized
+ PARTITION_ONLY_SHUFFLE [RS_337]
+ Group By Operator [GBY_334] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+ Select Operator [SEL_329] (rows=50 width=4)
+ Output:["_col0"]
+ Please refer to the previous Select Operator [SEL_327]
+ <-Reducer 29 [BROADCAST_EDGE] vectorized
+ BROADCAST [RS_357]
+ Group By Operator [GBY_356] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=8000000)"]
+ <-Map 28 [CUSTOM_SIMPLE_EDGE] vectorized
+ PARTITION_ONLY_SHUFFLE [RS_353]
+ Group By Operator [GBY_350] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=8000000)"]
+ Select Operator [SEL_345] (rows=8000000 width=4)
+ Output:["_col0"]
+ Please refer to the previous Select Operator [SEL_343]
+ <-Reducer 8 [BROADCAST_EDGE] vectorized
+ BROADCAST [RS_359]
+ Group By Operator [GBY_358] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+ <-Reducer 2 [CUSTOM_SIMPLE_EDGE]
+ SHUFFLE [RS_203]
+ Group By Operator [GBY_202] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+ Select Operator [SEL_201] (rows=17170 width=4)
+ Output:["_col0"]
+ Please refer to the previous Merge Join Operator [MERGEJOIN_294]
+
http://git-wip-us.apache.org/repos/asf/hive/blob/b8299551/ql/src/test/results/clientpositive/perf/tez/constraints/query57.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query57.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query57.q.out
new file mode 100644
index 0000000..484a302
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query57.q.out
@@ -0,0 +1,260 @@
+PREHOOK: query: explain
+with v1 as(
+ select i_category, i_brand,
+ cc_name,
+ d_year, d_moy,
+ sum(cs_sales_price) sum_sales,
+ avg(sum(cs_sales_price)) over
+ (partition by i_category, i_brand,
+ cc_name, d_year)
+ avg_monthly_sales,
+ rank() over
+ (partition by i_category, i_brand,
+ cc_name
+ order by d_year, d_moy) rn
+ from item, catalog_sales, date_dim, call_center
+ where cs_item_sk = i_item_sk and
+ cs_sold_date_sk = d_date_sk and
+ cc_call_center_sk= cs_call_center_sk and
+ (
+ d_year = 2000 or
+ ( d_year = 2000-1 and d_moy =12) or
+ ( d_year = 2000+1 and d_moy =1)
+ )
+ group by i_category, i_brand,
+ cc_name , d_year, d_moy),
+ v2 as(
+ select v1.i_category, v1.i_brand
+ ,v1.d_year, v1.d_moy
+ ,v1.avg_monthly_sales
+ ,v1.sum_sales, v1_lag.sum_sales psum, v1_lead.sum_sales nsum
+ from v1, v1 v1_lag, v1 v1_lead
+ where v1.i_category = v1_lag.i_category and
+ v1.i_category = v1_lead.i_category and
+ v1.i_brand = v1_lag.i_brand and
+ v1.i_brand = v1_lead.i_brand and
+ v1. cc_name = v1_lag. cc_name and
+ v1. cc_name = v1_lead. cc_name and
+ v1.rn = v1_lag.rn + 1 and
+ v1.rn = v1_lead.rn - 1)
+ select *
+ from v2
+ where d_year = 2000 and
+ avg_monthly_sales > 0 and
+ case when avg_monthly_sales > 0 then abs(sum_sales - avg_monthly_sales) / avg_monthly_sales else null end > 0.1
+ order by sum_sales - avg_monthly_sales, 3
+ limit 100
+PREHOOK: type: QUERY
+PREHOOK: Input: default@call_center
+PREHOOK: Input: default@catalog_sales
+PREHOOK: Input: default@date_dim
+PREHOOK: Input: default@item
+PREHOOK: Output: hdfs://### HDFS PATH ###
+POSTHOOK: query: explain
+with v1 as(
+ select i_category, i_brand,
+ cc_name,
+ d_year, d_moy,
+ sum(cs_sales_price) sum_sales,
+ avg(sum(cs_sales_price)) over
+ (partition by i_category, i_brand,
+ cc_name, d_year)
+ avg_monthly_sales,
+ rank() over
+ (partition by i_category, i_brand,
+ cc_name
+ order by d_year, d_moy) rn
+ from item, catalog_sales, date_dim, call_center
+ where cs_item_sk = i_item_sk and
+ cs_sold_date_sk = d_date_sk and
+ cc_call_center_sk= cs_call_center_sk and
+ (
+ d_year = 2000 or
+ ( d_year = 2000-1 and d_moy =12) or
+ ( d_year = 2000+1 and d_moy =1)
+ )
+ group by i_category, i_brand,
+ cc_name , d_year, d_moy),
+ v2 as(
+ select v1.i_category, v1.i_brand
+ ,v1.d_year, v1.d_moy
+ ,v1.avg_monthly_sales
+ ,v1.sum_sales, v1_lag.sum_sales psum, v1_lead.sum_sales nsum
+ from v1, v1 v1_lag, v1 v1_lead
+ where v1.i_category = v1_lag.i_category and
+ v1.i_category = v1_lead.i_category and
+ v1.i_brand = v1_lag.i_brand and
+ v1.i_brand = v1_lead.i_brand and
+ v1. cc_name = v1_lag. cc_name and
+ v1. cc_name = v1_lead. cc_name and
+ v1.rn = v1_lag.rn + 1 and
+ v1.rn = v1_lead.rn - 1)
+ select *
+ from v2
+ where d_year = 2000 and
+ avg_monthly_sales > 0 and
+ case when avg_monthly_sales > 0 then abs(sum_sales - avg_monthly_sales) / avg_monthly_sales else null end > 0.1
+ order by sum_sales - avg_monthly_sales, 3
+ limit 100
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@call_center
+POSTHOOK: Input: default@catalog_sales
+POSTHOOK: Input: default@date_dim
+POSTHOOK: Input: default@item
+POSTHOOK: Output: hdfs://### HDFS PATH ###
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Map 1 <- Reducer 13 (BROADCAST_EDGE)
+Reducer 10 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 11 <- Reducer 10 (SIMPLE_EDGE)
+Reducer 13 <- Map 12 (CUSTOM_SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 12 (SIMPLE_EDGE)
+Reducer 3 <- Map 14 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 15 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE), Reducer 9 (ONE_TO_ONE_EDGE)
+Reducer 8 <- Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 11 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:-1
+ Stage-1
+ Reducer 8 vectorized
+ File Output Operator [FS_321]
+ Limit [LIM_320] (rows=100 width=758)
+ Number of rows:100
+ Select Operator [SEL_319] (rows=130121 width=758)
+ Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ <-Reducer 7 [SIMPLE_EDGE]
+ SHUFFLE [RS_110]
+ Select Operator [SEL_109] (rows=130121 width=758)
+ Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
+ Merge Join Operator [MERGEJOIN_278] (rows=130121 width=646)
+ Conds:RS_106._col5, _col6, _col12, _col7=RS_306._col0, _col1, _col4, _col2(Inner),Output:["_col3","_col5","_col6","_col8","_col9","_col10","_col11","_col16"]
+ <-Reducer 6 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_306]
+ PartitionCols:_col0, _col1, _col4, _col2
+ Select Operator [SEL_304] (rows=87441185 width=404)
+ Output:["_col0","_col1","_col2","_col3","_col4"]
+ Filter Operator [FIL_302] (rows=87441185 width=408)
+ predicate:rank_window_0 is not null
+ PTF Operator [PTF_300] (rows=87441185 width=408)
+ Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 ASC NULLS LAST, _col3 ASC NULLS LAST","partition by:":"_col1, _col0, _col4"}]
+ Select Operator [SEL_299] (rows=87441185 width=408)
+ Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ <-Reducer 5 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_297]
+ PartitionCols:_col1, _col0, _col4
+ Group By Operator [GBY_296] (rows=87441185 width=408)
+ Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4
+ <-Reducer 4 [SIMPLE_EDGE]
+ SHUFFLE [RS_93]
+ PartitionCols:_col0, _col1, _col2, _col3, _col4
+ Group By Operator [GBY_92] (rows=87441185 width=408)
+ Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col3)"],keys:_col10, _col11, _col5, _col6, _col8
+ Merge Join Operator [MERGEJOIN_276] (rows=87441185 width=406)
+ Conds:RS_88._col2=RS_295._col0(Inner),Output:["_col3","_col5","_col6","_col8","_col10","_col11"]
+ <-Map 15 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_295]
+ PartitionCols:_col0
+ Select Operator [SEL_294] (rows=462000 width=194)
+ Output:["_col0","_col1","_col2"]
+ Filter Operator [FIL_293] (rows=462000 width=194)
+ predicate:(i_brand is not null and i_category is not null)
+ TableScan [TS_79] (rows=462000 width=194)
+ default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_brand","i_category"]
+ <-Reducer 3 [SIMPLE_EDGE]
+ SHUFFLE [RS_88]
+ PartitionCols:_col2
+ Merge Join Operator [MERGEJOIN_275] (rows=87441185 width=220)
+ Conds:RS_85._col1=RS_292._col0(Inner),Output:["_col2","_col3","_col5","_col6","_col8"]
+ <-Map 14 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_292]
+ PartitionCols:_col0
+ Select Operator [SEL_291] (rows=60 width=102)
+ Output:["_col0","_col1"]
+ Filter Operator [FIL_290] (rows=60 width=102)
+ predicate:cc_name is not null
+ TableScan [TS_76] (rows=60 width=102)
+ default@call_center,call_center,Tbl:COMPLETE,Col:COMPLETE,Output:["cc_call_center_sk","cc_name"]
+ <-Reducer 2 [SIMPLE_EDGE]
+ SHUFFLE [RS_85]
+ PartitionCols:_col1
+ Merge Join Operator [MERGEJOIN_274] (rows=87441185 width=126)
+ Conds:RS_289._col0=RS_281._col0(Inner),Output:["_col1","_col2","_col3","_col5","_col6"]
+ <-Map 12 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_281]
+ PartitionCols:_col0
+ Select Operator [SEL_280] (rows=564 width=12)
+ Output:["_col0","_col1","_col2"]
+ Filter Operator [FIL_279] (rows=564 width=12)
+ predicate:(((d_year = 2000) or (struct(d_year,d_moy)) IN (const struct(1999,12), const struct(2001,1))) and (d_year) IN (2000, 1999, 2001))
+ TableScan [TS_73] (rows=73049 width=12)
+ default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year","d_moy"]
+ <-Map 1 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_289]
+ PartitionCols:_col0
+ Select Operator [SEL_288] (rows=285117980 width=123)
+ Output:["_col0","_col1","_col2","_col3"]
+ Filter Operator [FIL_287] (rows=285117980 width=123)
+ predicate:((cs_sold_date_sk BETWEEN DynamicValue(RS_83_date_dim_d_date_sk_min) AND DynamicValue(RS_83_date_dim_d_date_sk_max) and in_bloom_filter(cs_sold_date_sk, DynamicValue(RS_83_date_dim_d_date_sk_bloom_filter))) and cs_call_center_sk is not null and cs_sold_date_sk is not null)
+ TableScan [TS_70] (rows=287989836 width=123)
+ default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["cs_sold_date_sk","cs_call_center_sk","cs_item_sk","cs_sales_price"]
+ <-Reducer 13 [BROADCAST_EDGE] vectorized
+ BROADCAST [RS_286]
+ Group By Operator [GBY_285] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+ <-Map 12 [CUSTOM_SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_284]
+ Group By Operator [GBY_283] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+ Select Operator [SEL_282] (rows=564 width=4)
+ Output:["_col0"]
+ Please refer to the previous Select Operator [SEL_280]
+ <-Reducer 9 [ONE_TO_ONE_EDGE]
+ FORWARD [RS_106]
+ PartitionCols:_col5, _col6, _col12, _col7
+ Merge Join Operator [MERGEJOIN_277] (rows=130121 width=636)
+ Conds:RS_307._col0, _col1, _col4, _col2=RS_318._col0, _col1, _col7, _col2(Inner),Output:["_col3","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12"]
+ <-Reducer 6 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_307]
+ PartitionCols:_col0, _col1, _col4, _col2
+ Select Operator [SEL_305] (rows=87441185 width=404)
+ Output:["_col0","_col1","_col2","_col3","_col4"]
+ Filter Operator [FIL_303] (rows=87441185 width=408)
+ predicate:rank_window_0 is not null
+ PTF Operator [PTF_301] (rows=87441185 width=408)
+ Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 ASC NULLS LAST, _col3 ASC NULLS LAST","partition by:":"_col1, _col0, _col4"}]
+ Please refer to the previous Select Operator [SEL_299]
+ <-Reducer 11 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_318]
+ PartitionCols:_col0, _col1, _col7, _col2
+ Select Operator [SEL_317] (rows=130121 width=524)
+ Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ Filter Operator [FIL_316] (rows=130121 width=524)
+ predicate:CASE WHEN ((_col0 > 0)) THEN (((abs((_col6 - _col0)) / _col0) > 0.1)) ELSE (null) END
+ Select Operator [SEL_315] (rows=260242 width=520)
+ Output:["rank_window_1","_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ Filter Operator [FIL_314] (rows=260242 width=520)
+ predicate:((_col0 > 0) and (_col3 = 2000) and rank_window_1 is not null)
+ PTF Operator [PTF_313] (rows=87441185 width=520)
+ Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col3 ASC NULLS LAST, _col4 ASC NULLS LAST","partition by:":"_col2, _col1, _col5"}]
+ Select Operator [SEL_312] (rows=87441185 width=520)
+ Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ <-Reducer 10 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_311]
+ PartitionCols:_col1, _col0, _col4
+ Select Operator [SEL_310] (rows=87441185 width=408)
+ Output:["avg_window_0","_col0","_col1","_col2","_col3","_col4","_col5"]
+ PTF Operator [PTF_309] (rows=87441185 width=408)
+ Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST, _col0 ASC NULLS FIRST, _col4 ASC NULLS FIRST, _col2 ASC NULLS FIRST","partition by:":"_col1, _col0, _col4, _col2"}]
+ Select Operator [SEL_308] (rows=87441185 width=408)
+ Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ <-Reducer 5 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_298]
+ PartitionCols:_col1, _col0, _col4, _col2
+ Please refer to the previous Group By Operator [GBY_296]
+
http://git-wip-us.apache.org/repos/asf/hive/blob/b8299551/ql/src/test/results/clientpositive/perf/tez/constraints/query58.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query58.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query58.q.out
new file mode 100644
index 0000000..ac9e412
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query58.q.out
@@ -0,0 +1,397 @@
+Warning: Shuffle Join MERGEJOIN[401][tables = [$hdt$_4, $hdt$_5]] in Stage 'Reducer 22' is a cross product
+PREHOOK: query: explain
+with ss_items as
+ (select i_item_id item_id
+ ,sum(ss_ext_sales_price) ss_item_rev
+ from store_sales
+ ,item
+ ,date_dim
+ where ss_item_sk = i_item_sk
+ and d_date in (select d_date
+ from date_dim
+ where d_week_seq = (select d_week_seq
+ from date_dim
+ where d_date = '1998-02-19'))
+ and ss_sold_date_sk = d_date_sk
+ group by i_item_id),
+ cs_items as
+ (select i_item_id item_id
+ ,sum(cs_ext_sales_price) cs_item_rev
+ from catalog_sales
+ ,item
+ ,date_dim
+ where cs_item_sk = i_item_sk
+ and d_date in (select d_date
+ from date_dim
+ where d_week_seq = (select d_week_seq
+ from date_dim
+ where d_date = '1998-02-19'))
+ and cs_sold_date_sk = d_date_sk
+ group by i_item_id),
+ ws_items as
+ (select i_item_id item_id
+ ,sum(ws_ext_sales_price) ws_item_rev
+ from web_sales
+ ,item
+ ,date_dim
+ where ws_item_sk = i_item_sk
+ and d_date in (select d_date
+ from date_dim
+ where d_week_seq =(select d_week_seq
+ from date_dim
+ where d_date = '1998-02-19'))
+ and ws_sold_date_sk = d_date_sk
+ group by i_item_id)
+ select ss_items.item_id
+ ,ss_item_rev
+ ,ss_item_rev/(ss_item_rev+cs_item_rev+ws_item_rev)/3 * 100 ss_dev
+ ,cs_item_rev
+ ,cs_item_rev/(ss_item_rev+cs_item_rev+ws_item_rev)/3 * 100 cs_dev
+ ,ws_item_rev
+ ,ws_item_rev/(ss_item_rev+cs_item_rev+ws_item_rev)/3 * 100 ws_dev
+ ,(ss_item_rev+cs_item_rev+ws_item_rev)/3 average
+ from ss_items,cs_items,ws_items
+ where ss_items.item_id=cs_items.item_id
+ and ss_items.item_id=ws_items.item_id
+ and ss_item_rev between 0.9 * cs_item_rev and 1.1 * cs_item_rev
+ and ss_item_rev between 0.9 * ws_item_rev and 1.1 * ws_item_rev
+ and cs_item_rev between 0.9 * ss_item_rev and 1.1 * ss_item_rev
+ and cs_item_rev between 0.9 * ws_item_rev and 1.1 * ws_item_rev
+ and ws_item_rev between 0.9 * ss_item_rev and 1.1 * ss_item_rev
+ and ws_item_rev between 0.9 * cs_item_rev and 1.1 * cs_item_rev
+ order by item_id
+ ,ss_item_rev
+ limit 100
+PREHOOK: type: QUERY
+PREHOOK: Input: default@catalog_sales
+PREHOOK: Input: default@date_dim
+PREHOOK: Input: default@item
+PREHOOK: Input: default@store_sales
+PREHOOK: Input: default@web_sales
+PREHOOK: Output: hdfs://### HDFS PATH ###
+POSTHOOK: query: explain
+with ss_items as
+ (select i_item_id item_id
+ ,sum(ss_ext_sales_price) ss_item_rev
+ from store_sales
+ ,item
+ ,date_dim
+ where ss_item_sk = i_item_sk
+ and d_date in (select d_date
+ from date_dim
+ where d_week_seq = (select d_week_seq
+ from date_dim
+ where d_date = '1998-02-19'))
+ and ss_sold_date_sk = d_date_sk
+ group by i_item_id),
+ cs_items as
+ (select i_item_id item_id
+ ,sum(cs_ext_sales_price) cs_item_rev
+ from catalog_sales
+ ,item
+ ,date_dim
+ where cs_item_sk = i_item_sk
+ and d_date in (select d_date
+ from date_dim
+ where d_week_seq = (select d_week_seq
+ from date_dim
+ where d_date = '1998-02-19'))
+ and cs_sold_date_sk = d_date_sk
+ group by i_item_id),
+ ws_items as
+ (select i_item_id item_id
+ ,sum(ws_ext_sales_price) ws_item_rev
+ from web_sales
+ ,item
+ ,date_dim
+ where ws_item_sk = i_item_sk
+ and d_date in (select d_date
+ from date_dim
+ where d_week_seq =(select d_week_seq
+ from date_dim
+ where d_date = '1998-02-19'))
+ and ws_sold_date_sk = d_date_sk
+ group by i_item_id)
+ select ss_items.item_id
+ ,ss_item_rev
+ ,ss_item_rev/(ss_item_rev+cs_item_rev+ws_item_rev)/3 * 100 ss_dev
+ ,cs_item_rev
+ ,cs_item_rev/(ss_item_rev+cs_item_rev+ws_item_rev)/3 * 100 cs_dev
+ ,ws_item_rev
+ ,ws_item_rev/(ss_item_rev+cs_item_rev+ws_item_rev)/3 * 100 ws_dev
+ ,(ss_item_rev+cs_item_rev+ws_item_rev)/3 average
+ from ss_items,cs_items,ws_items
+ where ss_items.item_id=cs_items.item_id
+ and ss_items.item_id=ws_items.item_id
+ and ss_item_rev between 0.9 * cs_item_rev and 1.1 * cs_item_rev
+ and ss_item_rev between 0.9 * ws_item_rev and 1.1 * ws_item_rev
+ and cs_item_rev between 0.9 * ss_item_rev and 1.1 * ss_item_rev
+ and cs_item_rev between 0.9 * ws_item_rev and 1.1 * ws_item_rev
+ and ws_item_rev between 0.9 * ss_item_rev and 1.1 * ss_item_rev
+ and ws_item_rev between 0.9 * cs_item_rev and 1.1 * cs_item_rev
+ order by item_id
+ ,ss_item_rev
+ limit 100
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@catalog_sales
+POSTHOOK: Input: default@date_dim
+POSTHOOK: Input: default@item
+POSTHOOK: Input: default@store_sales
+POSTHOOK: Input: default@web_sales
+POSTHOOK: Output: hdfs://### HDFS PATH ###
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Map 1 <- Reducer 17 (BROADCAST_EDGE)
+Map 26 <- Reducer 18 (BROADCAST_EDGE)
+Map 27 <- Reducer 19 (BROADCAST_EDGE)
+Reducer 10 <- Reducer 16 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Reducer 10 (SIMPLE_EDGE)
+Reducer 12 <- Map 27 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 13 <- Reducer 12 (SIMPLE_EDGE), Reducer 16 (SIMPLE_EDGE)
+Reducer 14 <- Reducer 13 (SIMPLE_EDGE)
+Reducer 16 <- Map 15 (SIMPLE_EDGE), Reducer 24 (ONE_TO_ONE_EDGE)
+Reducer 17 <- Reducer 16 (CUSTOM_SIMPLE_EDGE)
+Reducer 18 <- Reducer 16 (CUSTOM_SIMPLE_EDGE)
+Reducer 19 <- Reducer 16 (CUSTOM_SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 21 <- Map 20 (CUSTOM_SIMPLE_EDGE)
+Reducer 22 <- Map 25 (CUSTOM_SIMPLE_EDGE), Reducer 21 (CUSTOM_SIMPLE_EDGE)
+Reducer 23 <- Map 25 (SIMPLE_EDGE), Reducer 22 (SIMPLE_EDGE)
+Reducer 24 <- Reducer 23 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 16 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 11 (ONE_TO_ONE_EDGE), Reducer 4 (ONE_TO_ONE_EDGE)
+Reducer 6 <- Reducer 14 (ONE_TO_ONE_EDGE), Reducer 5 (ONE_TO_ONE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+Reducer 9 <- Map 26 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 7 vectorized
+ File Output Operator [FS_466]
+ Limit [LIM_465] (rows=1 width=884)
+ Number of rows:100
+ Select Operator [SEL_464] (rows=1 width=884)
+ Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ <-Reducer 6 [SIMPLE_EDGE]
+ SHUFFLE [RS_160]
+ Select Operator [SEL_159] (rows=1 width=884)
+ Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ Filter Operator [FIL_155] (rows=1 width=1108)
+ predicate:(_col1 BETWEEN _col10 AND _col11 and _col5 BETWEEN _col10 AND _col11 and _col9 BETWEEN _col2 AND _col3 and _col9 BETWEEN _col6 AND _col7)
+ Merge Join Operator [MERGEJOIN_416] (rows=1 width=1108)
+ Conds:RS_152._col0=RS_463._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col5","_col6","_col7","_col9","_col10","_col11"]
+ <-Reducer 14 [ONE_TO_ONE_EDGE] vectorized
+ FORWARD [RS_463]
+ PartitionCols:_col0
+ Select Operator [SEL_462] (rows=69 width=436)
+ Output:["_col0","_col1","_col2","_col3"]
+ Group By Operator [GBY_461] (rows=69 width=212)
+ Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
+ <-Reducer 13 [SIMPLE_EDGE]
+ SHUFFLE [RS_144]
+ PartitionCols:_col0
+ Group By Operator [GBY_143] (rows=69 width=212)
+ Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col4
+ Merge Join Operator [MERGEJOIN_414] (rows=31537 width=100)
+ Conds:RS_139._col0=RS_140._col0(Inner),Output:["_col2","_col4"]
+ <-Reducer 16 [SIMPLE_EDGE]
+ SHUFFLE [RS_140]
+ PartitionCols:_col0
+ Merge Join Operator [MERGEJOIN_403] (rows=2 width=4)
+ Conds:RS_419._col1=RS_435._col0(Inner),Output:["_col0"]
+ <-Map 15 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_419]
+ PartitionCols:_col1
+ Select Operator [SEL_418] (rows=73049 width=98)
+ Output:["_col0","_col1"]
+ Filter Operator [FIL_417] (rows=73049 width=98)
+ predicate:d_date is not null
+ TableScan [TS_5] (rows=73049 width=98)
+ default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_date"]
+ <-Reducer 24 [ONE_TO_ONE_EDGE] vectorized
+ FORWARD [RS_435]
+ PartitionCols:_col0
+ Group By Operator [GBY_434] (rows=2 width=94)
+ Output:["_col0"],keys:KEY._col0
+ <-Reducer 23 [SIMPLE_EDGE]
+ SHUFFLE [RS_31]
+ PartitionCols:_col0
+ Group By Operator [GBY_30] (rows=2 width=94)
+ Output:["_col0"],keys:_col2
+ Merge Join Operator [MERGEJOIN_402] (rows=5 width=94)
+ Conds:RS_26._col1=RS_432._col1(Inner),Output:["_col2"]
+ <-Map 25 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_432]
+ PartitionCols:_col1
+ Select Operator [SEL_430] (rows=73049 width=98)
+ Output:["_col0","_col1"]
+ Filter Operator [FIL_428] (rows=73049 width=98)
+ predicate:(d_date is not null and d_week_seq is not null)
+ TableScan [TS_20] (rows=73049 width=98)
+ default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date","d_week_seq"]
+ <-Reducer 22 [SIMPLE_EDGE]
+ SHUFFLE [RS_26]
+ PartitionCols:_col1
+ Merge Join Operator [MERGEJOIN_401] (rows=1 width=4)
+ Conds:(Inner),Output:["_col1"]
+ <-Map 25 [CUSTOM_SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_433]
+ Select Operator [SEL_431] (rows=1 width=4)
+ Output:["_col0"]
+ Filter Operator [FIL_429] (rows=1 width=98)
+ predicate:((d_date = '1998-02-19') and d_week_seq is not null)
+ Please refer to the previous TableScan [TS_20]
+ <-Reducer 21 [CUSTOM_SIMPLE_EDGE] vectorized
+ PARTITION_ONLY_SHUFFLE [RS_427]
+ Select Operator [SEL_426] (rows=1 width=8)
+ Filter Operator [FIL_425] (rows=1 width=8)
+ predicate:(sq_count_check(_col0) <= 1)
+ Group By Operator [GBY_424] (rows=1 width=8)
+ Output:["_col0"],aggregations:["count(VALUE._col0)"]
+ <-Map 20 [CUSTOM_SIMPLE_EDGE] vectorized
+ PARTITION_ONLY_SHUFFLE [RS_423]
+ Group By Operator [GBY_422] (rows=1 width=8)
+ Output:["_col0"],aggregations:["count()"]
+ Select Operator [SEL_421] (rows=1 width=94)
+ Filter Operator [FIL_420] (rows=1 width=94)
+ predicate:(d_date = '1998-02-19')
+ TableScan [TS_8] (rows=73049 width=94)
+ default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date"]
+ <-Reducer 12 [SIMPLE_EDGE]
+ SHUFFLE [RS_139]
+ PartitionCols:_col0
+ Merge Join Operator [MERGEJOIN_408] (rows=143966864 width=215)
+ Conds:RS_460._col1=RS_444._col0(Inner),Output:["_col0","_col2","_col4"]
+ <-Map 8 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_444]
+ PartitionCols:_col0
+ Select Operator [SEL_441] (rows=462000 width=104)
+ Output:["_col0","_col1"]
+ TableScan [TS_3] (rows=462000 width=104)
+ default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_item_id"]
+ <-Map 27 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_460]
+ PartitionCols:_col1
+ Select Operator [SEL_459] (rows=143966864 width=119)
+ Output:["_col0","_col1","_col2"]
+ Filter Operator [FIL_458] (rows=143966864 width=119)
+ predicate:((ws_sold_date_sk BETWEEN DynamicValue(RS_140_date_dim_d_date_sk_min) AND DynamicValue(RS_140_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_140_date_dim_d_date_sk_bloom_filter))) and ws_sold_date_sk is not null)
+ TableScan [TS_98] (rows=144002668 width=119)
+ default@web_sales,web_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ws_sold_date_sk","ws_item_sk","ws_ext_sales_price"]
+ <-Reducer 19 [BROADCAST_EDGE] vectorized
+ BROADCAST [RS_457]
+ Group By Operator [GBY_456] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+ <-Reducer 16 [CUSTOM_SIMPLE_EDGE]
+ SHUFFLE [RS_360]
+ Group By Operator [GBY_359] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+ Select Operator [SEL_358] (rows=2 width=4)
+ Output:["_col0"]
+ Please refer to the previous Merge Join Operator [MERGEJOIN_403]
+ <-Reducer 5 [ONE_TO_ONE_EDGE]
+ FORWARD [RS_152]
+ PartitionCols:_col0
+ Filter Operator [FIL_150] (rows=1 width=772)
+ predicate:(_col1 BETWEEN _col6 AND _col7 and _col5 BETWEEN _col2 AND _col3)
+ Merge Join Operator [MERGEJOIN_415] (rows=68 width=772)
+ Conds:RS_447._col0=RS_455._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col5","_col6","_col7"]
+ <-Reducer 11 [ONE_TO_ONE_EDGE] vectorized
+ FORWARD [RS_455]
+ PartitionCols:_col0
+ Select Operator [SEL_454] (rows=69 width=436)
+ Output:["_col0","_col1","_col2","_col3"]
+ Group By Operator [GBY_453] (rows=69 width=212)
+ Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
+ <-Reducer 10 [SIMPLE_EDGE]
+ SHUFFLE [RS_95]
+ PartitionCols:_col0
+ Group By Operator [GBY_94] (rows=69 width=212)
+ Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col4
+ Merge Join Operator [MERGEJOIN_413] (rows=120498 width=100)
+ Conds:RS_90._col0=RS_91._col0(Inner),Output:["_col2","_col4"]
+ <-Reducer 16 [SIMPLE_EDGE]
+ SHUFFLE [RS_91]
+ PartitionCols:_col0
+ Please refer to the previous Merge Join Operator [MERGEJOIN_403]
+ <-Reducer 9 [SIMPLE_EDGE]
+ SHUFFLE [RS_90]
+ PartitionCols:_col0
+ Merge Join Operator [MERGEJOIN_404] (rows=550076554 width=210)
+ Conds:RS_452._col1=RS_443._col0(Inner),Output:["_col0","_col2","_col4"]
+ <-Map 8 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_443]
+ PartitionCols:_col0
+ Please refer to the previous Select Operator [SEL_441]
+ <-Map 26 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_452]
+ PartitionCols:_col1
+ Select Operator [SEL_451] (rows=550076554 width=114)
+ Output:["_col0","_col1","_col2"]
+ Filter Operator [FIL_450] (rows=550076554 width=114)
+ predicate:((ss_sold_date_sk BETWEEN DynamicValue(RS_91_date_dim_d_date_sk_min) AND DynamicValue(RS_91_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_91_date_dim_d_date_sk_bloom_filter))) and ss_sold_date_sk is not null)
+ TableScan [TS_49] (rows=575995635 width=114)
+ default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_item_sk","ss_ext_sales_price"]
+ <-Reducer 18 [BROADCAST_EDGE] vectorized
+ BROADCAST [RS_449]
+ Group By Operator [GBY_448] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+ <-Reducer 16 [CUSTOM_SIMPLE_EDGE]
+ SHUFFLE [RS_314]
+ Group By Operator [GBY_313] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+ Select Operator [SEL_312] (rows=2 width=4)
+ Output:["_col0"]
+ Please refer to the previous Merge Join Operator [MERGEJOIN_403]
+ <-Reducer 4 [ONE_TO_ONE_EDGE] vectorized
+ FORWARD [RS_447]
+ PartitionCols:_col0
+ Select Operator [SEL_446] (rows=68 width=436)
+ Output:["_col0","_col1","_col2","_col3"]
+ Group By Operator [GBY_445] (rows=68 width=212)
+ Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
+ <-Reducer 3 [SIMPLE_EDGE]
+ SHUFFLE [RS_46]
+ PartitionCols:_col0
+ Group By Operator [GBY_45] (rows=68 width=212)
+ Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col4
+ Merge Join Operator [MERGEJOIN_412] (rows=62327 width=100)
+ Conds:RS_41._col0=RS_42._col0(Inner),Output:["_col2","_col4"]
+ <-Reducer 16 [SIMPLE_EDGE]
+ SHUFFLE [RS_42]
+ PartitionCols:_col0
+ Please refer to the previous Merge Join Operator [MERGEJOIN_403]
+ <-Reducer 2 [SIMPLE_EDGE]
+ SHUFFLE [RS_41]
+ PartitionCols:_col0
+ Merge Join Operator [MERGEJOIN_400] (rows=286549727 width=215)
+ Conds:RS_440._col1=RS_442._col0(Inner),Output:["_col0","_col2","_col4"]
+ <-Map 8 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_442]
+ PartitionCols:_col0
+ Please refer to the previous Select Operator [SEL_441]
+ <-Map 1 [SIMPLE_EDGE] vectorized
+ SHUFFLE [RS_440]
+ PartitionCols:_col1
+ Select Operator [SEL_439] (rows=286549727 width=119)
+ Output:["_col0","_col1","_col2"]
+ Filter Operator [FIL_438] (rows=286549727 width=119)
+ predicate:((cs_sold_date_sk BETWEEN DynamicValue(RS_42_date_dim_d_date_sk_min) AND DynamicValue(RS_42_date_dim_d_date_sk_max) and in_bloom_filter(cs_sold_date_sk, DynamicValue(RS_42_date_dim_d_date_sk_bloom_filter))) and cs_sold_date_sk is not null)
+ TableScan [TS_0] (rows=287989836 width=119)
+ default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["cs_sold_date_sk","cs_item_sk","cs_ext_sales_price"]
+ <-Reducer 17 [BROADCAST_EDGE] vectorized
+ BROADCAST [RS_437]
+ Group By Operator [GBY_436] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+ <-Reducer 16 [CUSTOM_SIMPLE_EDGE]
+ SHUFFLE [RS_264]
+ Group By Operator [GBY_263] (rows=1 width=12)
+ Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+ Select Operator [SEL_262] (rows=2 width=4)
+ Output:["_col0"]
+ Please refer to the previous Merge Join Operator [MERGEJOIN_403]
+