[
https://issues.apache.org/jira/browse/HIVE-7914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14161000#comment-14161000
]
Mostafa Mokhtar commented on HIVE-7914:
---------------------------------------
Issue still exists
{code}
hive> explain select avg(ss_quantity) ,avg(ss_ext_sales_price)
,avg(ss_ext_wholesale_cost) ,sum(ss_ext_wholesale_cost) from store_sales ,store
,customer_demographics ,household_demographics ,customer_address ,date_dim
where store.s_store_sk = store_sales.ss_store_sk and
store_sales.ss_sold_date_sk = date_dim.d_date_sk and date_dim.d_year = 2001
and((store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk and
customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and
customer_demographics.cd_marital_status = 'M' and
customer_demographics.cd_education_status = '4 yr Degree' and
store_sales.ss_sales_price between 100.00 and 150.00 and
household_demographics.hd_dep_count = 3 )or
(store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk and
customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and
customer_demographics.cd_marital_status = 'D' and
customer_demographics.cd_education_status = 'Primary' and
store_sales.ss_sales_price between 50.00 and 100.00 and
household_demographics.hd_dep_count = 1 ) or
(store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk and
customer_demographics.cd_demo_sk = ss_cdemo_sk and
customer_demographics.cd_marital_status = 'U' and
customer_demographics.cd_education_status = 'Advanced Degree' and
store_sales.ss_sales_price between 150.00 and 200.00 and
household_demographics.hd_dep_count = 1 )) and((store_sales.ss_addr_sk =
customer_address.ca_address_sk and customer_address.ca_country = 'United
States' and customer_address.ca_state in ('KY', 'GA', 'NM') and
store_sales.ss_net_profit between 100 and 200 ) or (store_sales.ss_addr_sk =
customer_address.ca_address_sk and customer_address.ca_country = 'United
States' and customer_address.ca_state in ('MT', 'OR', 'IN') and
store_sales.ss_net_profit between 150 and 300 ) or (store_sales.ss_addr_sk =
customer_address.ca_address_sk and customer_address.ca_country = 'United
States' and customer_address.ca_state in ('WI', 'MO', 'WV') and
store_sales.ss_net_profit between 50 and 250 )) ;
Warning: Map Join MAPJOIN[49][bigTable=?] in task 'Map 4' is a cross product
Warning: Map Join MAPJOIN[48][bigTable=?] in task 'Map 4' is a cross product
Warning: Map Join MAPJOIN[47][bigTable=?] in task 'Map 4' is a cross product
OK
STAGE DEPENDENCIES:
Stage-1 is a root stage
Stage-0 depends on stages: Stage-1
STAGE PLANS:
Stage: Stage-1
Tez
Edges:
Map 4 <- Map 1 (BROADCAST_EDGE), Map 2 (BROADCAST_EDGE), Map 3
(BROADCAST_EDGE), Map 6 (BROADCAST_EDGE), Map 7 (BROADCAST_EDGE)
Reducer 5 <- Map 4 (SIMPLE_EDGE)
DagName: mmokhtar_20141006173232_992a372b-cc0e-40d5-b51f-7098561df464:3
Vertices:
Map 1
Map Operator Tree:
TableScan
alias: household_demographics
Statistics: Num rows: 7200 Data size: 770400 Basic stats:
COMPLETE Column stats: NONE
Reduce Output Operator
sort order:
Statistics: Num rows: 7200 Data size: 770400 Basic stats:
COMPLETE Column stats: NONE
value expressions: hd_demo_sk (type: int), hd_dep_count
(type: int)
Execution mode: vectorized
Map 2
Map Operator Tree:
TableScan
alias: store
filterExpr: s_store_sk is not null (type: boolean)
Statistics: Num rows: 212 Data size: 405680 Basic stats:
COMPLETE Column stats: NONE
Filter Operator
predicate: s_store_sk is not null (type: boolean)
Statistics: Num rows: 106 Data size: 202840 Basic stats:
COMPLETE Column stats: NONE
Reduce Output Operator
key expressions: s_store_sk (type: int)
sort order: +
Map-reduce partition columns: s_store_sk (type: int)
Statistics: Num rows: 106 Data size: 202840 Basic stats:
COMPLETE Column stats: NONE
Execution mode: vectorized
Map 3
Map Operator Tree:
TableScan
alias: customer_address
Statistics: Num rows: 800000 Data size: 811903688 Basic
stats: COMPLETE Column stats: NONE
Reduce Output Operator
sort order:
Statistics: Num rows: 800000 Data size: 811903688 Basic
stats: COMPLETE Column stats: NONE
value expressions: ca_address_sk (type: int), ca_state
(type: string), ca_country (type: string)
Execution mode: vectorized
Map 4
Map Operator Tree:
TableScan
alias: store_sales
filterExpr: ss_store_sk is not null (type: boolean)
Statistics: Num rows: 550076554 Data size: 47370018896 Basic
stats: COMPLETE Column stats: NONE
Filter Operator
predicate: ss_store_sk is not null (type: boolean)
Statistics: Num rows: 275038277 Data size: 23685009448
Basic stats: COMPLETE Column stats: NONE
Map Join Operator
condition map:
Inner Join 0 to 1
condition expressions:
0 {ss_cdemo_sk} {ss_hdemo_sk} {ss_addr_sk}
{ss_store_sk} {ss_quantity} {ss_sales_price} {ss_ext_sales_price}
{ss_ext_wholesale_cost} {ss_net_profit} {ss_sold_date_sk}
1 {s_store_sk}
keys:
0 ss_store_sk (type: int)
1 s_store_sk (type: int)
outputColumnNames: _col3, _col4, _col5, _col6, _col9,
_col12, _col14, _col15, _col21, _col22, _col26
input vertices:
1 Map 2
Statistics: Num rows: 302542112 Data size: 26053511168
Basic stats: COMPLETE Column stats: NONE
Map Join Operator
condition map:
Inner Join 0 to 1
condition expressions:
0 {_col3} {_col4} {_col5} {_col6} {_col9} {_col12}
{_col14} {_col15} {_col21} {_col22} {_col26}
1 {cd_demo_sk} {cd_marital_status}
{cd_education_status}
keys:
0
1
outputColumnNames: _col3, _col4, _col5, _col6, _col9,
_col12, _col14, _col15, _col21, _col22, _col26, _col58, _col60, _col61
input vertices:
1 Map 6
Statistics: Num rows: 332796320 Data size: 28658862080
Basic stats: COMPLETE Column stats: NONE
Map Join Operator
condition map:
Inner Join 0 to 1
condition expressions:
0 {_col3} {_col4} {_col5} {_col6} {_col9} {_col12}
{_col14} {_col15} {_col21} {_col22} {_col26} {_col58} {_col60} {_col61}
1 {hd_demo_sk} {hd_dep_count}
keys:
0
1
outputColumnNames: _col3, _col4, _col5, _col6, _col9,
_col12, _col14, _col15, _col21, _col22, _col26, _col58, _col60, _col61, _col70,
_col73
input vertices:
1 Map 1
Statistics: Num rows: 366075968 Data size:
31524749312 Basic stats: COMPLETE Column stats: NONE
Map Join Operator
condition map:
Inner Join 0 to 1
condition expressions:
0 {_col3} {_col4} {_col5} {_col6} {_col9}
{_col12} {_col14} {_col15} {_col21} {_col22} {_col26} {_col58} {_col60}
{_col61} {_col70} {_col73}
1 {ca_address_sk} {ca_state} {ca_country}
keys:
0
1
outputColumnNames: _col3, _col4, _col5, _col6,
_col9, _col12, _col14, _col15, _col21, _col22, _col26, _col58, _col60, _col61,
_col70, _col73, _col78, _col86, _col88
input vertices:
1 Map 3
Statistics: Num rows: 402683584 Data size:
34677223424 Basic stats: COMPLETE Column stats: NONE
Map Join Operator
condition map:
Inner Join 0 to 1
condition expressions:
0 {_col3} {_col4} {_col5} {_col6} {_col9}
{_col12} {_col14} {_col15} {_col21} {_col22} {_col26} {_col58} {_col60}
{_col61} {_col70} {_col73} {_col78} {_col86} {_col88}
1 {d_date_sk}
keys:
0 _col22 (type: int)
1 d_date_sk (type: int)
outputColumnNames: _col3, _col4, _col5, _col6,
_col9, _col12, _col14, _col15, _col21, _col22, _col26, _col58, _col60, _col61,
_col70, _col73, _col78, _col86, _col88, _col94
input vertices:
1 Map 7
Statistics: Num rows: 442951968 Data size:
38144946176 Basic stats: COMPLETE Column stats: NONE
Filter Operator
predicate: ((((_col26 = _col6) and (_col22 =
_col94)) and ((((((((_col4 = _col70) and (_col58 = _col3)) and (_col60 = 'M'))
and (_col61 = '4 yr Degree')) and _col12 BETWEEN 100.0 AND 150.0) and (_col73 =
3)) or ((((((_col4 = _col70) and (_col58 = _col3)) and (_col60 = 'D')) and
(_col61 = 'Primary')) and _col12 BETWEEN 50.0 AND 100.0) and (_col73 = 1))) or
((((((_col4 = _col70) and (_col58 = _col3)) and (_col60 = 'U')) and (_col61 =
'Advanced Degree')) and _col12 BETWEEN 150.0 AND 200.0) and (_col73 = 1)))) and
((((((_col5 = _col78) and (_col88 = 'United States')) and (_col86) IN ('KY',
'GA', 'NM')) and _col21 BETWEEN 100 AND 200) or ((((_col5 = _col78) and (_col88
= 'United States')) and (_col86) IN ('MT', 'OR', 'IN')) and _col21 BETWEEN 150
AND 300)) or ((((_col5 = _col78) and (_col88 = 'United States')) and (_col86)
IN ('WI', 'MO', 'WV')) and _col21 BETWEEN 50 AND 250))) (type: boolean)
Statistics: Num rows: 973281 Data size:
83814395 Basic stats: COMPLETE Column stats: NONE
Select Operator
expressions: _col9 (type: int), _col14 (type:
float), _col15 (type: float)
outputColumnNames: _col9, _col14, _col15
Statistics: Num rows: 973281 Data size:
83814395 Basic stats: COMPLETE Column stats: NONE
Group By Operator
aggregations: avg(_col9), avg(_col14),
avg(_col15), sum(_col15)
mode: hash
outputColumnNames: _col0, _col1, _col2,
_col3
Statistics: Num rows: 1 Data size: 8 Basic
stats: COMPLETE Column stats: NONE
Reduce Output Operator
sort order:
Statistics: Num rows: 1 Data size: 8
Basic stats: COMPLETE Column stats: NONE
value expressions: _col0 (type:
struct<count:bigint,sum:double,input:int>), _col1 (type:
struct<count:bigint,sum:double,input:float>), _col2 (type:
struct<count:bigint,sum:double,input:float>), _col3 (type: double)
Execution mode: vectorized
Map 6
Map Operator Tree:
TableScan
alias: customer_demographics
Statistics: Num rows: 1920800 Data size: 718379200 Basic
stats: COMPLETE Column stats: NONE
Reduce Output Operator
sort order:
Statistics: Num rows: 1920800 Data size: 718379200 Basic
stats: COMPLETE Column stats: NONE
value expressions: cd_demo_sk (type: int),
cd_marital_status (type: string), cd_education_status (type: string)
Execution mode: vectorized
Map 7
Map Operator Tree:
TableScan
alias: date_dim
filterExpr: (d_date_sk is not null and (d_year = 2001))
(type: boolean)
Statistics: Num rows: 73049 Data size: 81741831 Basic stats:
COMPLETE Column stats: NONE
Filter Operator
predicate: (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
Reduce Output Operator
key expressions: d_date_sk (type: int)
sort order: +
Map-reduce partition columns: d_date_sk (type: int)
Statistics: Num rows: 18262 Data size: 20435178 Basic
stats: COMPLETE Column stats: NONE
Select Operator
expressions: d_date_sk (type: int)
outputColumnNames: _col0
Statistics: Num rows: 18262 Data size: 20435178 Basic
stats: COMPLETE Column stats: NONE
Group By Operator
keys: _col0 (type: int)
mode: hash
outputColumnNames: _col0
Statistics: Num rows: 18262 Data size: 20435178 Basic
stats: COMPLETE Column stats: NONE
Dynamic Partitioning Event Operator
Target Input: store_sales
Partition key expr: ss_sold_date_sk
Statistics: Num rows: 18262 Data size: 20435178 Basic
stats: COMPLETE Column stats: NONE
Target column: ss_sold_date_sk
Target Vertex: Map 4
Execution mode: vectorized
Reducer 5
Reduce Operator Tree:
Group By Operator
aggregations: avg(VALUE._col0), avg(VALUE._col1),
avg(VALUE._col2), sum(VALUE._col3)
mode: mergepartial
outputColumnNames: _col0, _col1, _col2, _col3
Statistics: Num rows: 1 Data size: 32 Basic stats: COMPLETE
Column stats: NONE
Select Operator
expressions: _col0 (type: double), _col1 (type: double),
_col2 (type: double), _col3 (type: double)
outputColumnNames: _col0, _col1, _col2, _col3
Statistics: Num rows: 1 Data size: 32 Basic stats: COMPLETE
Column stats: NONE
File Output Operator
compressed: false
Statistics: Num rows: 1 Data size: 32 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
Stage: Stage-0
Fetch Operator
limit: -1
Processor Tree:
ListSink
Time taken: 3.31 seconds, Fetched: 203 row(s)
hive>
{code}
> Simplify join predicates for CBO to avoid cross products
> --------------------------------------------------------
>
> Key: HIVE-7914
> URL: https://issues.apache.org/jira/browse/HIVE-7914
> Project: Hive
> Issue Type: Bug
> Components: CBO
> Affects Versions: 0.13.1
> Reporter: Mostafa Mokhtar
> Assignee: Laljo John Pullokkaran
> Fix For: 0.14.0
>
>
> Simplify join predicates for disjunctive predicates to avoid cross products.
> For TPC-DS query 13 we generate a cross products.
> The join predicate on (store_sales x customer_demographics) , (store_sales x
> household_demographics) and (store_sales x customer_address) can be pull up
> to avoid the cross products
> {code}
> select avg(ss_quantity)
> ,avg(ss_ext_sales_price)
> ,avg(ss_ext_wholesale_cost)
> ,sum(ss_ext_wholesale_cost)
> from store_sales
> ,store
> ,customer_demographics
> ,household_demographics
> ,customer_address
> ,date_dim
> where store.s_store_sk = store_sales.ss_store_sk
> and store_sales.ss_sold_date_sk = date_dim.d_date_sk and date_dim.d_year =
> 2001
> and((store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk
> and customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk
> and customer_demographics.cd_marital_status = 'M'
> and customer_demographics.cd_education_status = '4 yr Degree'
> and store_sales.ss_sales_price between 100.00 and 150.00
> and household_demographics.hd_dep_count = 3
> )or
> (store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk
> and customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk
> and customer_demographics.cd_marital_status = 'D'
> and customer_demographics.cd_education_status = 'Primary'
> and store_sales.ss_sales_price between 50.00 and 100.00
> and household_demographics.hd_dep_count = 1
> ) or
> (store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk
> and customer_demographics.cd_demo_sk = ss_cdemo_sk
> and customer_demographics.cd_marital_status = 'U'
> and customer_demographics.cd_education_status = 'Advanced Degree'
> and store_sales.ss_sales_price between 150.00 and 200.00
> and household_demographics.hd_dep_count = 1
> ))
> and((store_sales.ss_addr_sk = customer_address.ca_address_sk
> and customer_address.ca_country = 'United States'
> and customer_address.ca_state in ('KY', 'GA', 'NM')
> and store_sales.ss_net_profit between 100 and 200
> ) or
> (store_sales.ss_addr_sk = customer_address.ca_address_sk
> and customer_address.ca_country = 'United States'
> and customer_address.ca_state in ('MT', 'OR', 'IN')
> and store_sales.ss_net_profit between 150 and 300
> ) or
> (store_sales.ss_addr_sk = customer_address.ca_address_sk
> and customer_address.ca_country = 'United States'
> and customer_address.ca_state in ('WI', 'MO', 'WV')
> and store_sales.ss_net_profit between 50 and 250
> ))
> ;
> {code}
> This is the plan currently generated without any predicate simplification
> {code}
> Warning: Map Join MAPJOIN[59][bigTable=?] in task 'Map 8' is a cross product
> Warning: Map Join MAPJOIN[58][bigTable=?] in task 'Map 8' is a cross product
> Warning: Shuffle Join JOIN[29][tables = [$hdt$_5, $hdt$_6]] in Stage 'Reducer
> 2' is a cross product
> OK
> STAGE DEPENDENCIES:
> Stage-1 is a root stage
> Stage-0 depends on stages: Stage-1
> STAGE PLANS:
> Stage: Stage-1
> Tez
> Edges:
> Map 7 <- Map 8 (BROADCAST_EDGE)
> Map 8 <- Map 5 (BROADCAST_EDGE), Map 6 (BROADCAST_EDGE)
> Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 4 (BROADCAST_EDGE), Map 7
> (SIMPLE_EDGE)
> Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
> DagName: mmokhtar_20140828155050_7059c24b-501b-4683-86c0-4f3c023f0b0e:1
> Vertices:
> Map 1
> Map Operator Tree:
> TableScan
> alias: customer_address
> Statistics: Num rows: 40000000 Data size: 40595195284 Basic
> stats: COMPLETE Column stats: NONE
> Select Operator
> expressions: ca_address_sk (type: int), ca_state (type:
> string), ca_country (type: string)
> outputColumnNames: _col0, _col1, _col2
> Statistics: Num rows: 40000000 Data size: 40595195284
> Basic stats: COMPLETE Column stats: NONE
> Reduce Output Operator
> sort order:
> Statistics: Num rows: 40000000 Data size: 40595195284
> Basic stats: COMPLETE Column stats: NONE
> value expressions: _col0 (type: int), _col1 (type:
> string), _col2 (type: string)
> Execution mode: vectorized
> Map 4
> Map Operator Tree:
> TableScan
> alias: date_dim
> filterExpr: ((d_year = 2001) and d_date_sk is not null)
> (type: boolean)
> Statistics: Num rows: 73049 Data size: 81741831 Basic
> stats: COMPLETE Column stats: NONE
> Filter Operator
> predicate: ((d_year = 2001) and d_date_sk is not null)
> (type: boolean)
> Statistics: Num rows: 18262 Data size: 20435178 Basic
> stats: COMPLETE Column stats: NONE
> Select Operator
> expressions: d_date_sk (type: int)
> outputColumnNames: _col0
> Statistics: Num rows: 18262 Data size: 20435178 Basic
> stats: COMPLETE Column stats: NONE
> Reduce Output Operator
> key expressions: _col0 (type: int)
> sort order: +
> Map-reduce partition columns: _col0 (type: int)
> Statistics: Num rows: 18262 Data size: 20435178 Basic
> stats: COMPLETE Column stats: NONE
> Execution mode: vectorized
> Map 5
> Map Operator Tree:
> TableScan
> alias: household_demographics
> Statistics: Num rows: 7200 Data size: 770400 Basic stats:
> COMPLETE Column stats: NONE
> Select Operator
> expressions: hd_demo_sk (type: int), hd_dep_count (type:
> int)
> outputColumnNames: _col0, _col1
> Statistics: Num rows: 7200 Data size: 770400 Basic stats:
> COMPLETE Column stats: NONE
> Reduce Output Operator
> sort order:
> Statistics: Num rows: 7200 Data size: 770400 Basic
> stats: COMPLETE Column stats: NONE
> value expressions: _col0 (type: int), _col1 (type: int)
> Execution mode: vectorized
> Map 6
> Map Operator Tree:
> TableScan
> alias: store
> filterExpr: (true and s_store_sk is not null) (type:
> boolean)
> Statistics: Num rows: 1704 Data size: 3256276 Basic stats:
> COMPLETE Column stats: NONE
> Filter Operator
> predicate: s_store_sk is not null (type: boolean)
> Statistics: Num rows: 852 Data size: 1628138 Basic stats:
> COMPLETE Column stats: NONE
> Select Operator
> expressions: s_store_sk (type: int)
> outputColumnNames: _col0
> Statistics: Num rows: 852 Data size: 1628138 Basic
> stats: COMPLETE Column stats: NONE
> Reduce Output Operator
> sort order:
> Statistics: Num rows: 852 Data size: 1628138 Basic
> stats: COMPLETE Column stats: NONE
> value expressions: _col0 (type: int)
> Execution mode: vectorized
> Map 7
> Map Operator Tree:
> TableScan
> alias: store_sales
> filterExpr: (ss_store_sk is not null and ss_sold_date_sk is
> not null) (type: boolean)
> Statistics: Num rows: 82510879939 Data size: 7203833257964
> Basic stats: COMPLETE Column stats: NONE
> Filter Operator
> predicate: (ss_store_sk is not null and ss_sold_date_sk
> is not null) (type: boolean)
> Statistics: Num rows: 20627719985 Data size:
> 1800958314512 Basic stats: COMPLETE Column stats: NONE
> Select Operator
> expressions: ss_sold_date_sk (type: int), ss_cdemo_sk
> (type: int), ss_hdemo_sk (type: int), ss_addr_sk (type: int), ss_store_sk
> (type: int), ss_quantity (type: int), ss_sales_price (type: float),
> ss_ext_sales_price (type: float), ss_ext_wholesale_cost (type: float),
> ss_net_profit (type: float)
> outputColumnNames: _col0, _col1, _col2, _col3, _col4,
> _col5, _col6, _col7, _col8, _col9
> Statistics: Num rows: 20627719985 Data size:
> 1800958314512 Basic stats: COMPLETE Column stats: NONE
> Map Join Operator
> condition map:
> Inner Join 0 to 1
> condition expressions:
> 0 {_col0} {_col1} {_col2} {_col4} {_col5}
> 1 {_col0} {_col1} {_col2} {_col3} {_col5} {_col6}
> {_col7} {_col8} {_col9}
> keys:
> 0 _col3 (type: int)
> 1 _col4 (type: int)
> outputColumnNames: _col0, _col1, _col2, _col4, _col5,
> _col6, _col7, _col8, _col9, _col11, _col12, _col13, _col14, _col15
> input vertices:
> 0 Map 8
> Statistics: Num rows: 22690492416 Data size:
> 1981054320640 Basic stats: COMPLETE Column stats: NONE
> Filter Operator
> predicate: (((_col8 = _col4) and ((_col0 = _col7)
> and ((_col1 = 'M') and ((_col2 = '4 yr Degree') and (_col12 BETWEEN 100 AND
> 150 and (_col5 = 3)))))) or (((_col8 = _col4) and ((_col0 = _col7) and
> ((_col1 = 'D') and ((_col2 = 'Primary') and (_col12 BETWEEN 50 AND 100 and
> (_col5 = 1)))))) or ((_col8 = _col4) and ((_col0 = _col7) and ((_col1 = 'U')
> and ((_col2 = 'Advanced Degree') and (_col12 BETWEEN 150 AND 200 and (_col5 =
> 1)))))))) (type: boolean)
> Statistics: Num rows: 1063616832 Data size:
> 92861921280 Basic stats: COMPLETE Column stats: NONE
> Select Operator
> expressions: _col6 (type: int), _col9 (type:
> int), _col11 (type: int), _col13 (type: float), _col14 (type: float), _col15
> (type: float)
> outputColumnNames: _col0, _col3, _col5, _col7,
> _col8, _col9
> Statistics: Num rows: 1063616832 Data size:
> 92861921280 Basic stats: COMPLETE Column stats: NONE
> Reduce Output Operator
> sort order:
> Statistics: Num rows: 1063616832 Data size:
> 92861921280 Basic stats: COMPLETE Column stats: NONE
> value expressions: _col0 (type: int), _col3
> (type: int), _col5 (type: int), _col7 (type: float), _col8 (type: float),
> _col9 (type: float)
> Execution mode: vectorized
> Map 8
> Map Operator Tree:
> TableScan
> alias: customer_demographics
> Statistics: Num rows: 1920800 Data size: 718379200 Basic
> stats: COMPLETE Column stats: NONE
> Select Operator
> expressions: cd_demo_sk (type: int), cd_marital_status
> (type: string), cd_education_status (type: string)
> outputColumnNames: _col0, _col1, _col2
> Statistics: Num rows: 1920800 Data size: 718379200 Basic
> stats: COMPLETE Column stats: NONE
> Map Join Operator
> condition map:
> Inner Join 0 to 1
> condition expressions:
> 0 {_col0} {_col1} {_col2}
> 1 {_col0}
> keys:
> 0
> 1
> outputColumnNames: _col0, _col1, _col2, _col3
> input vertices:
> 1 Map 6
> Statistics: Num rows: 2112880 Data size: 790217152
> Basic stats: COMPLETE Column stats: NONE
> Map Join Operator
> condition map:
> Inner Join 0 to 1
> condition expressions:
> 0 {_col0} {_col1} {_col2} {_col3}
> 1 {_col0} {_col1}
> keys:
> 0
> 1
> outputColumnNames: _col0, _col1, _col2, _col3, _col4,
> _col5
> input vertices:
> 1 Map 5
> Statistics: Num rows: 2324168 Data size: 869238912
> Basic stats: COMPLETE Column stats: NONE
> Reduce Output Operator
> key expressions: _col3 (type: int)
> sort order: +
> Map-reduce partition columns: _col3 (type: int)
> Statistics: Num rows: 2324168 Data size: 869238912
> Basic stats: COMPLETE Column stats: NONE
> value expressions: _col0 (type: int), _col1 (type:
> string), _col2 (type: string), _col4 (type: int), _col5 (type: int)
> Execution mode: vectorized
> Reducer 2
> Reduce Operator Tree:
> Join Operator
> condition map:
> Inner Join 0 to 1
> condition expressions:
> 0 {VALUE._col0} {VALUE._col3} {VALUE._col5} {VALUE._col7}
> {VALUE._col8} {VALUE._col9}
> 1 {VALUE._col0} {VALUE._col1} {VALUE._col2}
> outputColumnNames: _col0, _col3, _col5, _col7, _col8, _col9,
> _col16, _col17, _col18
> Statistics: Num rows: 1169978496 Data size: 102148120576
> Basic stats: COMPLETE Column stats: NONE
> Filter Operator
> predicate: (((_col3 = _col16) and ((_col18 = 'United
> States') and ((_col17) IN ('KY', 'GA', 'NM') and _col9 BETWEEN 100 AND 200)))
> or (((_col3 = _col16) and ((_col18 = 'United States') and ((_col17) IN ('MT',
> 'OR', 'IN') and _col9 BETWEEN 150 AND 300))) or ((_col3 = _col16) and
> ((_col18 = 'United States') and ((_col17) IN ('WI', 'MO', 'WV') and _col9
> BETWEEN 50 AND 250))))) (type: boolean)
> Statistics: Num rows: 219370968 Data size: 19152772608
> Basic stats: COMPLETE Column stats: NONE
> Select Operator
> expressions: _col0 (type: int), _col5 (type: int), _col7
> (type: float), _col8 (type: float)
> outputColumnNames: _col0, _col5, _col7, _col8
> Statistics: Num rows: 219370968 Data size: 19152772608
> Basic stats: COMPLETE Column stats: NONE
> Map Join Operator
> condition map:
> Inner Join 0 to 1
> condition expressions:
> 0 {_col5} {_col7} {_col8}
> 1
> keys:
> 0 _col0 (type: int)
> 1 _col0 (type: int)
> outputColumnNames: _col5, _col7, _col8
> input vertices:
> 1 Map 4
> Statistics: Num rows: 241308080 Data size: 21068050432
> Basic stats: COMPLETE Column stats: NONE
> Select Operator
> expressions: _col5 (type: int), _col7 (type: float),
> _col8 (type: float)
> outputColumnNames: _col0, _col1, _col2
> Statistics: Num rows: 241308080 Data size:
> 21068050432 Basic stats: COMPLETE Column stats: NONE
> Group By Operator
> aggregations: avg(_col0), avg(_col1), avg(_col2),
> sum(_col2)
> mode: hash
> outputColumnNames: _col0, _col1, _col2, _col3
> Statistics: Num rows: 1 Data size: 8 Basic stats:
> COMPLETE Column stats: NONE
> Reduce Output Operator
> sort order:
> Statistics: Num rows: 1 Data size: 8 Basic stats:
> COMPLETE Column stats: NONE
> value expressions: _col0 (type:
> struct<count:bigint,sum:double,input:int>), _col1 (type:
> struct<count:bigint,sum:double,input:float>), _col2 (type:
> struct<count:bigint,sum:double,input:float>), _col3 (type: double)
> Reducer 3
> Reduce Operator Tree:
> Group By Operator
> aggregations: avg(VALUE._col0), avg(VALUE._col1),
> avg(VALUE._col2), sum(VALUE._col3)
> mode: mergepartial
> outputColumnNames: _col0, _col1, _col2, _col3
> Statistics: Num rows: 1 Data size: 32 Basic stats: COMPLETE
> Column stats: NONE
> Select Operator
> expressions: _col0 (type: double), _col1 (type: double),
> _col2 (type: double), _col3 (type: double)
> outputColumnNames: _col0, _col1, _col2, _col3
> Statistics: Num rows: 1 Data size: 32 Basic stats: COMPLETE
> Column stats: NONE
> File Output Operator
> compressed: false
> Statistics: Num rows: 1 Data size: 32 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
> Stage: Stage-0
> Fetch Operator
> limit: -1
> Processor Tree:
> ListSink
> Time taken: 7.681 seconds, Fetched: 227 row(s)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)