blob: ea70efadfcc76efde91685b63decac199117b0b1 [file] [log] [blame]
PREHOOK: query: create table sketch_input (id int, category char(1))
STORED AS ORC
TBLPROPERTIES ('transactional'='true')
PREHOOK: type: CREATETABLE
PREHOOK: Output: database:default
PREHOOK: Output: default@sketch_input
POSTHOOK: query: create table sketch_input (id int, category char(1))
STORED AS ORC
TBLPROPERTIES ('transactional'='true')
POSTHOOK: type: CREATETABLE
POSTHOOK: Output: database:default
POSTHOOK: Output: default@sketch_input
PREHOOK: query: insert into table sketch_input values
(1,'a'),(1, 'a'), (2, 'a'), (3, 'a'), (4, 'a'), (5, 'a'), (6, 'a'), (7, 'a'), (8, 'a'), (9, 'a'), (10, 'a'),
(6,'b'),(6, 'b'), (7, 'b'), (8, 'b'), (9, 'b'), (10, 'b'), (11, 'b'), (12, 'b'), (13, 'b'), (14, 'b'), (15, 'b')
PREHOOK: type: QUERY
PREHOOK: Input: _dummy_database@_dummy_table
PREHOOK: Output: default@sketch_input
POSTHOOK: query: insert into table sketch_input values
(1,'a'),(1, 'a'), (2, 'a'), (3, 'a'), (4, 'a'), (5, 'a'), (6, 'a'), (7, 'a'), (8, 'a'), (9, 'a'), (10, 'a'),
(6,'b'),(6, 'b'), (7, 'b'), (8, 'b'), (9, 'b'), (10, 'b'), (11, 'b'), (12, 'b'), (13, 'b'), (14, 'b'), (15, 'b')
POSTHOOK: type: QUERY
POSTHOOK: Input: _dummy_database@_dummy_table
POSTHOOK: Output: default@sketch_input
POSTHOOK: Lineage: sketch_input.category SCRIPT []
POSTHOOK: Lineage: sketch_input.id SCRIPT []
PREHOOK: query: create materialized view mv_1 as
select category,ds_kll_sketch(cast(id as float)) from sketch_input group by category
PREHOOK: type: CREATE_MATERIALIZED_VIEW
PREHOOK: Input: default@sketch_input
PREHOOK: Output: database:default
PREHOOK: Output: default@mv_1
POSTHOOK: query: create materialized view mv_1 as
select category,ds_kll_sketch(cast(id as float)) from sketch_input group by category
POSTHOOK: type: CREATE_MATERIALIZED_VIEW
POSTHOOK: Input: default@sketch_input
POSTHOOK: Output: database:default
POSTHOOK: Output: default@mv_1
WARNING: Comparing a bigint and a double may result in a loss of precision.
Warning: Shuffle Join MERGEJOIN[17][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product
PREHOOK: query: explain
select 'rewrite; mv matching', id, rank() over (order by id) from sketch_input order by id
PREHOOK: type: QUERY
PREHOOK: Input: default@mv_1
PREHOOK: Input: default@sketch_input
#### A masked pattern was here ####
POSTHOOK: query: explain
select 'rewrite; mv matching', id, rank() over (order by id) from sketch_input order by id
POSTHOOK: type: QUERY
POSTHOOK: Input: default@mv_1
POSTHOOK: Input: default@sketch_input
#### A masked pattern was here ####
STAGE DEPENDENCIES:
Stage-1 is a root stage
Stage-0 depends on stages: Stage-1
STAGE PLANS:
Stage: Stage-1
Tez
#### A masked pattern was here ####
Edges:
Reducer 2 <- Map 1 (XPROD_EDGE), Reducer 5 (XPROD_EDGE)
Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
Reducer 5 <- Map 4 (SIMPLE_EDGE)
#### A masked pattern was here ####
Vertices:
Map 1
Map Operator Tree:
TableScan
alias: sketch_input
Statistics: Num rows: 22 Data size: 88 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: id (type: int), UDFToFloat(COALESCE(UDFToFloat(id),3.4028234663852886E38D)) (type: float)
outputColumnNames: _col0, _col1
Statistics: Num rows: 22 Data size: 176 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
null sort order:
sort order:
Statistics: Num rows: 22 Data size: 176 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col0 (type: int), _col1 (type: float)
Execution mode: vectorized, llap
LLAP IO: may be used (ACID table)
Map 4
Map Operator Tree:
TableScan
alias: default.mv_1
Statistics: Num rows: 2 Data size: 240 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: _c1 (type: binary)
outputColumnNames: _col0
Statistics: Num rows: 2 Data size: 240 Basic stats: COMPLETE Column stats: COMPLETE
Group By Operator
aggregations: ds_kll_union(_col0)
keys: true (type: boolean)
minReductionHashAggr: 0.5
mode: hash
outputColumnNames: _col0, _col1
Statistics: Num rows: 1 Data size: 148 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
key expressions: _col0 (type: boolean)
null sort order: z
sort order: +
Map-reduce partition columns: _col0 (type: boolean)
Statistics: Num rows: 1 Data size: 148 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col1 (type: binary)
Execution mode: llap
LLAP IO: all inputs
Reducer 2
Execution mode: llap
Reduce Operator Tree:
Merge Join Operator
condition map:
Inner Join 0 to 1
keys:
0
1
outputColumnNames: _col0, _col1, _col2, _col3
Statistics: Num rows: 22 Data size: 3520 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: _col0 (type: int), UDFToInteger(CASE WHEN ((_col3 < (ceil((ds_kll_rank(_col2, _col1) * _col3)) + 1.0D))) THEN (_col3) ELSE ((ceil((ds_kll_rank(_col2, _col1) * _col3)) + 1.0D)) END) (type: int)
outputColumnNames: _col0, _col1
Statistics: Num rows: 22 Data size: 176 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
key expressions: _col0 (type: int)
null sort order: z
sort order: +
Statistics: Num rows: 22 Data size: 176 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col1 (type: int)
Reducer 3
Execution mode: vectorized, llap
Reduce Operator Tree:
Select Operator
expressions: 'rewrite; mv matching' (type: string), KEY.reducesinkkey0 (type: int), VALUE._col0 (type: int)
outputColumnNames: _col0, _col1, _col2
Statistics: Num rows: 22 Data size: 2464 Basic stats: COMPLETE Column stats: COMPLETE
File Output Operator
compressed: false
Statistics: Num rows: 22 Data size: 2464 Basic stats: COMPLETE Column stats: COMPLETE
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
Reducer 5
Execution mode: llap
Reduce Operator Tree:
Group By Operator
aggregations: ds_kll_union(VALUE._col0)
keys: KEY._col0 (type: boolean)
mode: mergepartial
outputColumnNames: _col0, _col1
Statistics: Num rows: 1 Data size: 148 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: _col1 (type: binary), ds_kll_n(_col1) (type: bigint)
outputColumnNames: _col0, _col1
Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
null sort order:
sort order:
Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col0 (type: binary), _col1 (type: bigint)
Stage: Stage-0
Fetch Operator
limit: -1
Processor Tree:
ListSink
WARNING: Comparing a bigint and a double may result in a loss of precision.
Warning: Shuffle Join MERGEJOIN[17][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product
PREHOOK: query: select 'rewrite; mv matching', id, rank() over (order by id) from sketch_input order by id
PREHOOK: type: QUERY
PREHOOK: Input: default@mv_1
PREHOOK: Input: default@sketch_input
#### A masked pattern was here ####
POSTHOOK: query: select 'rewrite; mv matching', id, rank() over (order by id) from sketch_input order by id
POSTHOOK: type: QUERY
POSTHOOK: Input: default@mv_1
POSTHOOK: Input: default@sketch_input
#### A masked pattern was here ####
rewrite; mv matching 1 1
rewrite; mv matching 1 1
rewrite; mv matching 2 3
rewrite; mv matching 3 4
rewrite; mv matching 4 5
rewrite; mv matching 5 6
rewrite; mv matching 6 7
rewrite; mv matching 6 7
rewrite; mv matching 6 7
rewrite; mv matching 7 10
rewrite; mv matching 7 10
rewrite; mv matching 8 12
rewrite; mv matching 8 12
rewrite; mv matching 9 14
rewrite; mv matching 9 14
rewrite; mv matching 10 16
rewrite; mv matching 10 16
rewrite; mv matching 11 18
rewrite; mv matching 12 19
rewrite; mv matching 13 20
rewrite; mv matching 14 21
rewrite; mv matching 15 22
PREHOOK: query: explain
select 'no rewrite; no mv matching', id, rank() over (order by id) from sketch_input order by id
PREHOOK: type: QUERY
PREHOOK: Input: default@sketch_input
#### A masked pattern was here ####
POSTHOOK: query: explain
select 'no rewrite; no mv matching', id, rank() over (order by id) from sketch_input order by id
POSTHOOK: type: QUERY
POSTHOOK: Input: default@sketch_input
#### A masked pattern was here ####
STAGE DEPENDENCIES:
Stage-1 is a root stage
Stage-0 depends on stages: Stage-1
STAGE PLANS:
Stage: Stage-1
Tez
#### A masked pattern was here ####
Edges:
Reducer 2 <- Map 1 (SIMPLE_EDGE)
Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
#### A masked pattern was here ####
Vertices:
Map 1
Map Operator Tree:
TableScan
alias: sketch_input
Statistics: Num rows: 22 Data size: 88 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
key expressions: 0 (type: int), id (type: int)
null sort order: az
sort order: ++
Map-reduce partition columns: 0 (type: int)
Statistics: Num rows: 22 Data size: 88 Basic stats: COMPLETE Column stats: COMPLETE
Execution mode: vectorized, llap
LLAP IO: may be used (ACID table)
Reducer 2
Execution mode: vectorized, llap
Reduce Operator Tree:
Select Operator
expressions: KEY.reducesinkkey1 (type: int)
outputColumnNames: _col0
Statistics: Num rows: 22 Data size: 5984 Basic stats: COMPLETE Column stats: COMPLETE
PTF Operator
Function definitions:
Input definition
input alias: ptf_0
output shape: _col0: int
type: WINDOWING
Windowing table definition
input alias: ptf_1
name: windowingtablefunction
order by: _col0 ASC NULLS LAST
partition by: 0
raw input shape:
window functions:
window function definition
alias: rank_window_0
arguments: _col0
name: rank
window function: GenericUDAFRankEvaluator
window frame: ROWS PRECEDING(MAX)~FOLLOWING(MAX)
isPivotResult: true
Statistics: Num rows: 22 Data size: 5984 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: _col0 (type: int), rank_window_0 (type: int)
outputColumnNames: _col0, _col1
Statistics: Num rows: 22 Data size: 176 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
key expressions: _col0 (type: int)
null sort order: z
sort order: +
Statistics: Num rows: 22 Data size: 176 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col1 (type: int)
Reducer 3
Execution mode: vectorized, llap
Reduce Operator Tree:
Select Operator
expressions: 'no rewrite; no mv matching' (type: string), KEY.reducesinkkey0 (type: int), VALUE._col0 (type: int)
outputColumnNames: _col0, _col1, _col2
Statistics: Num rows: 22 Data size: 2596 Basic stats: COMPLETE Column stats: COMPLETE
File Output Operator
compressed: false
Statistics: Num rows: 22 Data size: 2596 Basic stats: COMPLETE Column stats: COMPLETE
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
Stage: Stage-0
Fetch Operator
limit: -1
Processor Tree:
ListSink
PREHOOK: query: select 'no rewrite; no mv matching', id, rank() over (order by id) from sketch_input order by id
PREHOOK: type: QUERY
PREHOOK: Input: default@sketch_input
#### A masked pattern was here ####
POSTHOOK: query: select 'no rewrite; no mv matching', id, rank() over (order by id) from sketch_input order by id
POSTHOOK: type: QUERY
POSTHOOK: Input: default@sketch_input
#### A masked pattern was here ####
no rewrite; no mv matching 1 1
no rewrite; no mv matching 1 1
no rewrite; no mv matching 2 3
no rewrite; no mv matching 3 4
no rewrite; no mv matching 4 5
no rewrite; no mv matching 5 6
no rewrite; no mv matching 6 7
no rewrite; no mv matching 6 7
no rewrite; no mv matching 6 7
no rewrite; no mv matching 7 10
no rewrite; no mv matching 7 10
no rewrite; no mv matching 8 12
no rewrite; no mv matching 8 12
no rewrite; no mv matching 9 14
no rewrite; no mv matching 9 14
no rewrite; no mv matching 10 16
no rewrite; no mv matching 10 16
no rewrite; no mv matching 11 18
no rewrite; no mv matching 12 19
no rewrite; no mv matching 13 20
no rewrite; no mv matching 14 21
no rewrite; no mv matching 15 22
PREHOOK: query: insert into table sketch_input values
(1,'a'),(1, 'a'), (2, 'a'), (3, 'a'), (4, 'a'), (5, 'a'), (6, 'a'), (7, 'a'), (8, 'a'), (9, 'a'), (10, 'a'),
(6,'b'),(6, 'b'), (7, 'b'), (8, 'b'), (9, 'b'), (10, 'b'), (11, 'b'), (12, 'b'), (13, 'b'), (14, 'b'), (15, 'b')
PREHOOK: type: QUERY
PREHOOK: Input: _dummy_database@_dummy_table
PREHOOK: Output: default@sketch_input
POSTHOOK: query: insert into table sketch_input values
(1,'a'),(1, 'a'), (2, 'a'), (3, 'a'), (4, 'a'), (5, 'a'), (6, 'a'), (7, 'a'), (8, 'a'), (9, 'a'), (10, 'a'),
(6,'b'),(6, 'b'), (7, 'b'), (8, 'b'), (9, 'b'), (10, 'b'), (11, 'b'), (12, 'b'), (13, 'b'), (14, 'b'), (15, 'b')
POSTHOOK: type: QUERY
POSTHOOK: Input: _dummy_database@_dummy_table
POSTHOOK: Output: default@sketch_input
POSTHOOK: Lineage: sketch_input.category SCRIPT []
POSTHOOK: Lineage: sketch_input.id SCRIPT []
WARNING: Comparing a bigint and a double may result in a loss of precision.
Warning: Shuffle Join MERGEJOIN[17][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product
PREHOOK: query: explain
select 'rewrite; no mv matching', id, rank() over (order by id) from sketch_input order by id
PREHOOK: type: QUERY
PREHOOK: Input: default@sketch_input
#### A masked pattern was here ####
POSTHOOK: query: explain
select 'rewrite; no mv matching', id, rank() over (order by id) from sketch_input order by id
POSTHOOK: type: QUERY
POSTHOOK: Input: default@sketch_input
#### A masked pattern was here ####
STAGE DEPENDENCIES:
Stage-1 is a root stage
Stage-0 depends on stages: Stage-1
STAGE PLANS:
Stage: Stage-1
Tez
#### A masked pattern was here ####
Edges:
Reducer 2 <- Map 1 (XPROD_EDGE), Reducer 4 (XPROD_EDGE)
Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
Reducer 4 <- Map 1 (SIMPLE_EDGE)
#### A masked pattern was here ####
Vertices:
Map 1
Map Operator Tree:
TableScan
alias: sketch_input
Statistics: Num rows: 44 Data size: 176 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: id (type: int), UDFToFloat(COALESCE(UDFToFloat(id),3.4028234663852886E38D)) (type: float)
outputColumnNames: _col0, _col1
Statistics: Num rows: 44 Data size: 352 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
null sort order:
sort order:
Statistics: Num rows: 44 Data size: 352 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col0 (type: int), _col1 (type: float)
Select Operator
expressions: UDFToFloat(id) (type: float)
outputColumnNames: _col1
Statistics: Num rows: 44 Data size: 176 Basic stats: COMPLETE Column stats: COMPLETE
Group By Operator
aggregations: ds_kll_sketch(_col1)
keys: true (type: boolean)
minReductionHashAggr: 0.97727275
mode: hash
outputColumnNames: _col0, _col1
Statistics: Num rows: 1 Data size: 148 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
key expressions: _col0 (type: boolean)
null sort order: z
sort order: +
Map-reduce partition columns: _col0 (type: boolean)
Statistics: Num rows: 1 Data size: 148 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col1 (type: binary)
Execution mode: llap
LLAP IO: may be used (ACID table)
Reducer 2
Execution mode: llap
Reduce Operator Tree:
Merge Join Operator
condition map:
Inner Join 0 to 1
keys:
0
1
outputColumnNames: _col0, _col1, _col2, _col3
Statistics: Num rows: 44 Data size: 7040 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: _col0 (type: int), UDFToInteger(CASE WHEN ((_col3 < (ceil((ds_kll_rank(_col2, _col1) * _col3)) + 1.0D))) THEN (_col3) ELSE ((ceil((ds_kll_rank(_col2, _col1) * _col3)) + 1.0D)) END) (type: int)
outputColumnNames: _col0, _col1
Statistics: Num rows: 44 Data size: 352 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
key expressions: _col0 (type: int)
null sort order: z
sort order: +
Statistics: Num rows: 44 Data size: 352 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col1 (type: int)
Reducer 3
Execution mode: vectorized, llap
Reduce Operator Tree:
Select Operator
expressions: 'rewrite; no mv matching' (type: string), KEY.reducesinkkey0 (type: int), VALUE._col0 (type: int)
outputColumnNames: _col0, _col1, _col2
Statistics: Num rows: 44 Data size: 5060 Basic stats: COMPLETE Column stats: COMPLETE
File Output Operator
compressed: false
Statistics: Num rows: 44 Data size: 5060 Basic stats: COMPLETE Column stats: COMPLETE
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
Reducer 4
Execution mode: llap
Reduce Operator Tree:
Group By Operator
aggregations: ds_kll_sketch(VALUE._col0)
keys: KEY._col0 (type: boolean)
mode: mergepartial
outputColumnNames: _col0, _col1
Statistics: Num rows: 1 Data size: 148 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: _col1 (type: binary), ds_kll_n(_col1) (type: bigint)
outputColumnNames: _col0, _col1
Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
null sort order:
sort order:
Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col0 (type: binary), _col1 (type: bigint)
Stage: Stage-0
Fetch Operator
limit: -1
Processor Tree:
ListSink
WARNING: Comparing a bigint and a double may result in a loss of precision.
Warning: Shuffle Join MERGEJOIN[17][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product
PREHOOK: query: select 'rewrite; no mv matching', id, rank() over (order by id) from sketch_input order by id
PREHOOK: type: QUERY
PREHOOK: Input: default@sketch_input
#### A masked pattern was here ####
POSTHOOK: query: select 'rewrite; no mv matching', id, rank() over (order by id) from sketch_input order by id
POSTHOOK: type: QUERY
POSTHOOK: Input: default@sketch_input
#### A masked pattern was here ####
rewrite; no mv matching 1 1
rewrite; no mv matching 1 1
rewrite; no mv matching 1 1
rewrite; no mv matching 1 1
rewrite; no mv matching 2 5
rewrite; no mv matching 2 5
rewrite; no mv matching 3 7
rewrite; no mv matching 3 7
rewrite; no mv matching 4 9
rewrite; no mv matching 4 9
rewrite; no mv matching 5 11
rewrite; no mv matching 5 11
rewrite; no mv matching 6 13
rewrite; no mv matching 6 13
rewrite; no mv matching 6 13
rewrite; no mv matching 6 13
rewrite; no mv matching 6 13
rewrite; no mv matching 6 13
rewrite; no mv matching 7 19
rewrite; no mv matching 7 19
rewrite; no mv matching 7 19
rewrite; no mv matching 7 19
rewrite; no mv matching 8 23
rewrite; no mv matching 8 23
rewrite; no mv matching 8 23
rewrite; no mv matching 8 23
rewrite; no mv matching 9 27
rewrite; no mv matching 9 27
rewrite; no mv matching 9 27
rewrite; no mv matching 9 27
rewrite; no mv matching 10 31
rewrite; no mv matching 10 31
rewrite; no mv matching 10 31
rewrite; no mv matching 10 31
rewrite; no mv matching 11 35
rewrite; no mv matching 11 35
rewrite; no mv matching 12 37
rewrite; no mv matching 12 37
rewrite; no mv matching 13 39
rewrite; no mv matching 13 39
rewrite; no mv matching 14 41
rewrite; no mv matching 14 41
rewrite; no mv matching 15 43
rewrite; no mv matching 15 43
PREHOOK: query: explain
alter materialized view mv_1 rebuild
PREHOOK: type: QUERY
PREHOOK: Input: default@mv_1
PREHOOK: Input: default@sketch_input
PREHOOK: Output: default@mv_1
POSTHOOK: query: explain
alter materialized view mv_1 rebuild
POSTHOOK: type: QUERY
POSTHOOK: Input: default@mv_1
POSTHOOK: Input: default@sketch_input
POSTHOOK: Output: default@mv_1
STAGE DEPENDENCIES:
Stage-1 is a root stage
Stage-2 depends on stages: Stage-1
Stage-0 depends on stages: Stage-2
Stage-3 depends on stages: Stage-0
Stage-4 depends on stages: Stage-3
STAGE PLANS:
Stage: Stage-1
Tez
#### A masked pattern was here ####
Edges:
Map 6 <- Union 3 (CONTAINS)
Reducer 2 <- Map 1 (SIMPLE_EDGE), Union 3 (CONTAINS)
Reducer 4 <- Union 3 (SIMPLE_EDGE)
Reducer 5 <- Reducer 4 (CUSTOM_SIMPLE_EDGE)
#### A masked pattern was here ####
Vertices:
Map 1
Map Operator Tree:
TableScan
alias: sketch_input
filterExpr: (ROW__ID.writeid > 1L) (type: boolean)
Statistics: Num rows: 44 Data size: 3916 Basic stats: COMPLETE Column stats: COMPLETE
Filter Operator
predicate: (ROW__ID.writeid > 1L) (type: boolean)
Statistics: Num rows: 14 Data size: 1246 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: category (type: char(1)), UDFToFloat(id) (type: float)
outputColumnNames: _col0, _col1
Statistics: Num rows: 14 Data size: 1246 Basic stats: COMPLETE Column stats: COMPLETE
Group By Operator
aggregations: ds_kll_sketch(_col1)
keys: _col0 (type: char(1))
minReductionHashAggr: 0.85714287
mode: hash
outputColumnNames: _col0, _col1
Statistics: Num rows: 2 Data size: 458 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
key expressions: _col0 (type: char(1))
null sort order: z
sort order: +
Map-reduce partition columns: _col0 (type: char(1))
Statistics: Num rows: 2 Data size: 458 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col1 (type: binary)
Execution mode: llap
LLAP IO: may be used (ACID table)
Map 6
Map Operator Tree:
TableScan
alias: default.mv_1
Statistics: Num rows: 2 Data size: 410 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: category (type: char(1)), _c1 (type: binary)
outputColumnNames: _col0, _col1
Statistics: Num rows: 2 Data size: 410 Basic stats: COMPLETE Column stats: COMPLETE
Group By Operator
aggregations: ds_kll_union(_col1)
keys: _col0 (type: char(1))
minReductionHashAggr: 0.5
mode: hash
outputColumnNames: _col0, _col1
Statistics: Num rows: 2 Data size: 458 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
key expressions: _col0 (type: char(1))
null sort order: z
sort order: +
Map-reduce partition columns: _col0 (type: char(1))
Statistics: Num rows: 2 Data size: 458 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col1 (type: binary)
Execution mode: llap
LLAP IO: all inputs
Reducer 2
Execution mode: llap
Reduce Operator Tree:
Group By Operator
aggregations: ds_kll_sketch(VALUE._col0)
keys: KEY._col0 (type: char(1))
mode: mergepartial
outputColumnNames: _col0, _col1
Statistics: Num rows: 2 Data size: 458 Basic stats: COMPLETE Column stats: COMPLETE
Group By Operator
aggregations: ds_kll_union(_col1)
keys: _col0 (type: char(1))
minReductionHashAggr: 0.5
mode: hash
outputColumnNames: _col0, _col1
Statistics: Num rows: 2 Data size: 458 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
key expressions: _col0 (type: char(1))
null sort order: z
sort order: +
Map-reduce partition columns: _col0 (type: char(1))
Statistics: Num rows: 2 Data size: 458 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col1 (type: binary)
Reducer 4
Execution mode: llap
Reduce Operator Tree:
Group By Operator
aggregations: ds_kll_union(VALUE._col0)
keys: KEY._col0 (type: char(1))
mode: mergepartial
outputColumnNames: _col0, _col1
Statistics: Num rows: 2 Data size: 458 Basic stats: COMPLETE Column stats: COMPLETE
File Output Operator
compressed: false
Statistics: Num rows: 2 Data size: 458 Basic stats: COMPLETE Column stats: COMPLETE
table:
input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
name: default.mv_1
Select Operator
expressions: _col0 (type: char(1)), _col1 (type: binary)
outputColumnNames: category, _c1
Statistics: Num rows: 2 Data size: 458 Basic stats: COMPLETE Column stats: COMPLETE
Group By Operator
aggregations: max(length(category)), avg(COALESCE(length(category),0)), count(1), count(category), compute_bit_vector(category, 'hll'), max(length(_c1)), avg(COALESCE(length(_c1),0)), count(_c1)
minReductionHashAggr: 0.5
mode: hash
outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
Statistics: Num rows: 1 Data size: 328 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
null sort order:
sort order:
Statistics: Num rows: 1 Data size: 328 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col0 (type: int), _col1 (type: struct<count:bigint,sum:double,input:int>), _col2 (type: bigint), _col3 (type: bigint), _col4 (type: binary), _col5 (type: int), _col6 (type: struct<count:bigint,sum:double,input:int>), _col7 (type: bigint)
Reducer 5
Execution mode: llap
Reduce Operator Tree:
Group By Operator
aggregations: max(VALUE._col0), avg(VALUE._col1), count(VALUE._col2), count(VALUE._col3), compute_bit_vector(VALUE._col4), max(VALUE._col5), avg(VALUE._col6), count(VALUE._col7)
mode: mergepartial
outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: 'STRING' (type: string), UDFToLong(COALESCE(_col0,0)) (type: bigint), COALESCE(_col1,0) (type: double), (_col2 - _col3) (type: bigint), COALESCE(ndv_compute_bit_vector(_col4),0) (type: bigint), _col4 (type: binary), 'BINARY' (type: string), UDFToLong(COALESCE(_col5,0)) (type: bigint), COALESCE(_col6,0) (type: double), (_col2 - _col7) (type: bigint)
outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
Statistics: Num rows: 1 Data size: 380 Basic stats: COMPLETE Column stats: COMPLETE
File Output Operator
compressed: false
Statistics: Num rows: 1 Data size: 380 Basic stats: COMPLETE Column stats: COMPLETE
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
Union 3
Vertex: Union 3
Stage: Stage-2
Dependency Collection
Stage: Stage-0
Move Operator
tables:
replace: true
table:
input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
name: default.mv_1
Stage: Stage-3
Stats Work
Basic Stats Work:
Column Stats Desc:
Columns: category, _c1
Column Types: char(1), binary
Table: default.mv_1
Stage: Stage-4
Materialized View Update
name: default.mv_1
update creation metadata: true
PREHOOK: query: alter materialized view mv_1 rebuild
PREHOOK: type: QUERY
PREHOOK: Input: default@mv_1
PREHOOK: Input: default@sketch_input
PREHOOK: Output: default@mv_1
POSTHOOK: query: alter materialized view mv_1 rebuild
POSTHOOK: type: QUERY
POSTHOOK: Input: default@mv_1
POSTHOOK: Input: default@sketch_input
POSTHOOK: Output: default@mv_1
POSTHOOK: Lineage: mv_1._c1 EXPRESSION [(sketch_input)sketch_input.FieldSchema(name:id, type:int, comment:null), (mv_1)default.mv_1.FieldSchema(name:_c1, type:binary, comment:null), ]
POSTHOOK: Lineage: mv_1.category EXPRESSION [(sketch_input)sketch_input.FieldSchema(name:category, type:char(1), comment:null), (mv_1)default.mv_1.FieldSchema(name:category, type:char(1), comment:null), ]
WARNING: Comparing a bigint and a double may result in a loss of precision.
Warning: Shuffle Join MERGEJOIN[17][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product
PREHOOK: query: explain
select 'rewrite; mv matching', id, rank() over (order by id) from sketch_input order by id
PREHOOK: type: QUERY
PREHOOK: Input: default@mv_1
PREHOOK: Input: default@sketch_input
#### A masked pattern was here ####
POSTHOOK: query: explain
select 'rewrite; mv matching', id, rank() over (order by id) from sketch_input order by id
POSTHOOK: type: QUERY
POSTHOOK: Input: default@mv_1
POSTHOOK: Input: default@sketch_input
#### A masked pattern was here ####
STAGE DEPENDENCIES:
Stage-1 is a root stage
Stage-0 depends on stages: Stage-1
STAGE PLANS:
Stage: Stage-1
Tez
#### A masked pattern was here ####
Edges:
Reducer 2 <- Map 1 (XPROD_EDGE), Reducer 5 (XPROD_EDGE)
Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
Reducer 5 <- Map 4 (SIMPLE_EDGE)
#### A masked pattern was here ####
Vertices:
Map 1
Map Operator Tree:
TableScan
alias: sketch_input
Statistics: Num rows: 44 Data size: 176 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: id (type: int), UDFToFloat(COALESCE(UDFToFloat(id),3.4028234663852886E38D)) (type: float)
outputColumnNames: _col0, _col1
Statistics: Num rows: 44 Data size: 352 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
null sort order:
sort order:
Statistics: Num rows: 44 Data size: 352 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col0 (type: int), _col1 (type: float)
Execution mode: vectorized, llap
LLAP IO: may be used (ACID table)
Map 4
Map Operator Tree:
TableScan
alias: default.mv_1
Statistics: Num rows: 2 Data size: 320 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: _c1 (type: binary)
outputColumnNames: _col0
Statistics: Num rows: 2 Data size: 320 Basic stats: COMPLETE Column stats: COMPLETE
Group By Operator
aggregations: ds_kll_union(_col0)
keys: true (type: boolean)
minReductionHashAggr: 0.5
mode: hash
outputColumnNames: _col0, _col1
Statistics: Num rows: 1 Data size: 148 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
key expressions: _col0 (type: boolean)
null sort order: z
sort order: +
Map-reduce partition columns: _col0 (type: boolean)
Statistics: Num rows: 1 Data size: 148 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col1 (type: binary)
Execution mode: llap
LLAP IO: all inputs
Reducer 2
Execution mode: llap
Reduce Operator Tree:
Merge Join Operator
condition map:
Inner Join 0 to 1
keys:
0
1
outputColumnNames: _col0, _col1, _col2, _col3
Statistics: Num rows: 44 Data size: 7040 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: _col0 (type: int), UDFToInteger(CASE WHEN ((_col3 < (ceil((ds_kll_rank(_col2, _col1) * _col3)) + 1.0D))) THEN (_col3) ELSE ((ceil((ds_kll_rank(_col2, _col1) * _col3)) + 1.0D)) END) (type: int)
outputColumnNames: _col0, _col1
Statistics: Num rows: 44 Data size: 352 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
key expressions: _col0 (type: int)
null sort order: z
sort order: +
Statistics: Num rows: 44 Data size: 352 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col1 (type: int)
Reducer 3
Execution mode: vectorized, llap
Reduce Operator Tree:
Select Operator
expressions: 'rewrite; mv matching' (type: string), KEY.reducesinkkey0 (type: int), VALUE._col0 (type: int)
outputColumnNames: _col0, _col1, _col2
Statistics: Num rows: 44 Data size: 4928 Basic stats: COMPLETE Column stats: COMPLETE
File Output Operator
compressed: false
Statistics: Num rows: 44 Data size: 4928 Basic stats: COMPLETE Column stats: COMPLETE
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
Reducer 5
Execution mode: llap
Reduce Operator Tree:
Group By Operator
aggregations: ds_kll_union(VALUE._col0)
keys: KEY._col0 (type: boolean)
mode: mergepartial
outputColumnNames: _col0, _col1
Statistics: Num rows: 1 Data size: 148 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: _col1 (type: binary), ds_kll_n(_col1) (type: bigint)
outputColumnNames: _col0, _col1
Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
null sort order:
sort order:
Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col0 (type: binary), _col1 (type: bigint)
Stage: Stage-0
Fetch Operator
limit: -1
Processor Tree:
ListSink
WARNING: Comparing a bigint and a double may result in a loss of precision.
Warning: Shuffle Join MERGEJOIN[17][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product
PREHOOK: query: select 'rewrite; mv matching', id, rank() over (order by id) from sketch_input order by id
PREHOOK: type: QUERY
PREHOOK: Input: default@mv_1
PREHOOK: Input: default@sketch_input
#### A masked pattern was here ####
POSTHOOK: query: select 'rewrite; mv matching', id, rank() over (order by id) from sketch_input order by id
POSTHOOK: type: QUERY
POSTHOOK: Input: default@mv_1
POSTHOOK: Input: default@sketch_input
#### A masked pattern was here ####
rewrite; mv matching 1 1
rewrite; mv matching 1 1
rewrite; mv matching 1 1
rewrite; mv matching 1 1
rewrite; mv matching 2 5
rewrite; mv matching 2 5
rewrite; mv matching 3 7
rewrite; mv matching 3 7
rewrite; mv matching 4 9
rewrite; mv matching 4 9
rewrite; mv matching 5 11
rewrite; mv matching 5 11
rewrite; mv matching 6 13
rewrite; mv matching 6 13
rewrite; mv matching 6 13
rewrite; mv matching 6 13
rewrite; mv matching 6 13
rewrite; mv matching 6 13
rewrite; mv matching 7 19
rewrite; mv matching 7 19
rewrite; mv matching 7 19
rewrite; mv matching 7 19
rewrite; mv matching 8 23
rewrite; mv matching 8 23
rewrite; mv matching 8 23
rewrite; mv matching 8 23
rewrite; mv matching 9 27
rewrite; mv matching 9 27
rewrite; mv matching 9 27
rewrite; mv matching 9 27
rewrite; mv matching 10 31
rewrite; mv matching 10 31
rewrite; mv matching 10 31
rewrite; mv matching 10 31
rewrite; mv matching 11 35
rewrite; mv matching 11 35
rewrite; mv matching 12 37
rewrite; mv matching 12 37
rewrite; mv matching 13 39
rewrite; mv matching 13 39
rewrite; mv matching 14 41
rewrite; mv matching 14 41
rewrite; mv matching 15 43
rewrite; mv matching 15 43
WARNING: Comparing a bigint and a double may result in a loss of precision.
PREHOOK: query: explain
select 'rewrite; mv matching', category, id, rank() over (partition by category order by id) from sketch_input order by category,id
PREHOOK: type: QUERY
PREHOOK: Input: default@mv_1
PREHOOK: Input: default@sketch_input
#### A masked pattern was here ####
POSTHOOK: query: explain
select 'rewrite; mv matching', category, id, rank() over (partition by category order by id) from sketch_input order by category,id
POSTHOOK: type: QUERY
POSTHOOK: Input: default@mv_1
POSTHOOK: Input: default@sketch_input
#### A masked pattern was here ####
STAGE DEPENDENCIES:
Stage-1 is a root stage
Stage-0 depends on stages: Stage-1
STAGE PLANS:
Stage: Stage-1
Tez
#### A masked pattern was here ####
Edges:
Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE)
Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
#### A masked pattern was here ####
Vertices:
Map 1
Map Operator Tree:
TableScan
alias: sketch_input
Statistics: Num rows: 44 Data size: 3916 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: id (type: int), category (type: char(1)), UDFToFloat(COALESCE(UDFToFloat(id),3.4028234663852886E38D)) (type: float)
outputColumnNames: _col0, _col1, _col2
Statistics: Num rows: 44 Data size: 4092 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
key expressions: _col1 (type: char(1))
null sort order: z
sort order: +
Map-reduce partition columns: _col1 (type: char(1))
Statistics: Num rows: 44 Data size: 4092 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col0 (type: int), _col2 (type: float)
Execution mode: vectorized, llap
LLAP IO: may be used (ACID table)
Map 4
Map Operator Tree:
TableScan
alias: default.mv_1
Statistics: Num rows: 2 Data size: 490 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: category (type: char(1)), _c1 (type: binary), ds_kll_n(_c1) (type: bigint)
outputColumnNames: _col0, _col1, _col2
Statistics: Num rows: 2 Data size: 506 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
key expressions: _col0 (type: char(1))
null sort order: z
sort order: +
Map-reduce partition columns: _col0 (type: char(1))
Statistics: Num rows: 2 Data size: 506 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col1 (type: binary), _col2 (type: bigint)
Execution mode: vectorized, llap
LLAP IO: all inputs
Reducer 2
Execution mode: llap
Reduce Operator Tree:
Merge Join Operator
condition map:
Inner Join 0 to 1
keys:
0 _col1 (type: char(1))
1 _col0 (type: char(1))
nullSafes: [true]
outputColumnNames: _col0, _col1, _col2, _col4, _col5
Statistics: Num rows: 44 Data size: 11484 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: _col1 (type: char(1)), _col0 (type: int), UDFToInteger(CASE WHEN ((_col5 < (ceil((ds_kll_rank(_col4, _col2) * _col5)) + 1.0D))) THEN (_col5) ELSE ((ceil((ds_kll_rank(_col4, _col2) * _col5)) + 1.0D)) END) (type: int)
outputColumnNames: _col0, _col1, _col2
Statistics: Num rows: 44 Data size: 4092 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
key expressions: _col0 (type: char(1)), _col1 (type: int)
null sort order: zz
sort order: ++
Statistics: Num rows: 44 Data size: 4092 Basic stats: COMPLETE Column stats: COMPLETE
value expressions: _col2 (type: int)
Reducer 3
Execution mode: vectorized, llap
Reduce Operator Tree:
Select Operator
expressions: 'rewrite; mv matching' (type: string), KEY.reducesinkkey0 (type: char(1)), KEY.reducesinkkey1 (type: int), VALUE._col0 (type: int)
outputColumnNames: _col0, _col1, _col2, _col3
Statistics: Num rows: 44 Data size: 8668 Basic stats: COMPLETE Column stats: COMPLETE
File Output Operator
compressed: false
Statistics: Num rows: 44 Data size: 8668 Basic stats: COMPLETE Column stats: COMPLETE
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
Stage: Stage-0
Fetch Operator
limit: -1
Processor Tree:
ListSink
WARNING: Comparing a bigint and a double may result in a loss of precision.
PREHOOK: query: select 'rewrite; mv matching', category, id, rank() over (partition by category order by id) from sketch_input order by category,id
PREHOOK: type: QUERY
PREHOOK: Input: default@mv_1
PREHOOK: Input: default@sketch_input
#### A masked pattern was here ####
POSTHOOK: query: select 'rewrite; mv matching', category, id, rank() over (partition by category order by id) from sketch_input order by category,id
POSTHOOK: type: QUERY
POSTHOOK: Input: default@mv_1
POSTHOOK: Input: default@sketch_input
#### A masked pattern was here ####
rewrite; mv matching a 1 1
rewrite; mv matching a 1 1
rewrite; mv matching a 1 1
rewrite; mv matching a 1 1
rewrite; mv matching a 2 5
rewrite; mv matching a 2 5
rewrite; mv matching a 3 7
rewrite; mv matching a 3 7
rewrite; mv matching a 4 9
rewrite; mv matching a 4 9
rewrite; mv matching a 5 11
rewrite; mv matching a 5 11
rewrite; mv matching a 6 13
rewrite; mv matching a 6 13
rewrite; mv matching a 7 15
rewrite; mv matching a 7 15
rewrite; mv matching a 8 17
rewrite; mv matching a 8 17
rewrite; mv matching a 9 19
rewrite; mv matching a 9 19
rewrite; mv matching a 10 21
rewrite; mv matching a 10 21
rewrite; mv matching b 6 1
rewrite; mv matching b 6 1
rewrite; mv matching b 6 1
rewrite; mv matching b 6 1
rewrite; mv matching b 7 5
rewrite; mv matching b 7 5
rewrite; mv matching b 8 7
rewrite; mv matching b 8 7
rewrite; mv matching b 9 9
rewrite; mv matching b 9 9
rewrite; mv matching b 10 11
rewrite; mv matching b 10 11
rewrite; mv matching b 11 13
rewrite; mv matching b 11 13
rewrite; mv matching b 12 15
rewrite; mv matching b 12 15
rewrite; mv matching b 13 17
rewrite; mv matching b 13 17
rewrite; mv matching b 14 19
rewrite; mv matching b 14 19
rewrite; mv matching b 15 21
rewrite; mv matching b 15 21
PREHOOK: query: drop materialized view mv_1
PREHOOK: type: DROP_MATERIALIZED_VIEW
PREHOOK: Input: default@mv_1
PREHOOK: Output: default@mv_1
POSTHOOK: query: drop materialized view mv_1
POSTHOOK: type: DROP_MATERIALIZED_VIEW
POSTHOOK: Input: default@mv_1
POSTHOOK: Output: default@mv_1