blob: c186790bea00934db35564ceaf1e20fb918a46d5 [file] [log] [blame]
PREHOOK: query: CREATE TABLE topnkey_windowing (tw_code string, tw_value double)
PREHOOK: type: CREATETABLE
PREHOOK: Output: database:default
PREHOOK: Output: default@topnkey_windowing
POSTHOOK: query: CREATE TABLE topnkey_windowing (tw_code string, tw_value double)
POSTHOOK: type: CREATETABLE
POSTHOOK: Output: database:default
POSTHOOK: Output: default@topnkey_windowing
PREHOOK: query: INSERT INTO topnkey_windowing VALUES
(NULL, NULL),
(NULL, 109),
('A', 109),
('A', 104),
('A', 109),
('A', 109),
('A', 103),
(NULL, NULL),
(NULL, 109),
('A', 109),
('A', 101),
('A', 101),
('A', 114),
('A', 120),
('B', 105),
('B', 106),
('B', 106),
('B', NULL),
('B', 106),
('A', 107),
('B', 108),
('A', 102),
('B', 110),
(NULL, NULL),
(NULL, 109),
('A', 109)
PREHOOK: type: QUERY
PREHOOK: Input: _dummy_database@_dummy_table
PREHOOK: Output: default@topnkey_windowing
POSTHOOK: query: INSERT INTO topnkey_windowing VALUES
(NULL, NULL),
(NULL, 109),
('A', 109),
('A', 104),
('A', 109),
('A', 109),
('A', 103),
(NULL, NULL),
(NULL, 109),
('A', 109),
('A', 101),
('A', 101),
('A', 114),
('A', 120),
('B', 105),
('B', 106),
('B', 106),
('B', NULL),
('B', 106),
('A', 107),
('B', 108),
('A', 102),
('B', 110),
(NULL, NULL),
(NULL, 109),
('A', 109)
POSTHOOK: type: QUERY
POSTHOOK: Input: _dummy_database@_dummy_table
POSTHOOK: Output: default@topnkey_windowing
POSTHOOK: Lineage: topnkey_windowing.tw_code SCRIPT []
POSTHOOK: Lineage: topnkey_windowing.tw_value SCRIPT []
PREHOOK: query: EXPLAIN
SELECT tw_code, ranking
FROM (
SELECT tw_code AS tw_code,
rank() OVER (PARTITION BY tw_code ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
PREHOOK: type: QUERY
PREHOOK: Input: default@topnkey_windowing
#### A masked pattern was here ####
POSTHOOK: query: EXPLAIN
SELECT tw_code, ranking
FROM (
SELECT tw_code AS tw_code,
rank() OVER (PARTITION BY tw_code ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
POSTHOOK: type: QUERY
POSTHOOK: Input: default@topnkey_windowing
#### 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
Map Reduce
Map Operator Tree:
TableScan
alias: topnkey_windowing
Statistics: Num rows: 26 Data size: 1969 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
key expressions: tw_code (type: string), tw_value (type: double)
null sort order: az
sort order: ++
Map-reduce partition columns: tw_code (type: string)
Statistics: Num rows: 26 Data size: 1969 Basic stats: COMPLETE Column stats: COMPLETE
TopN Hash Memory Usage: 0.1
Reduce Operator Tree:
Select Operator
expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: double)
outputColumnNames: _col0, _col1
Statistics: Num rows: 26 Data size: 8937 Basic stats: COMPLETE Column stats: COMPLETE
PTF Operator
Function definitions:
Input definition
input alias: ptf_0
output shape: _col0: string, _col1: double
type: WINDOWING
Windowing table definition
input alias: ptf_1
name: windowingtablefunction
order by: _col1 ASC NULLS LAST
partition by: _col0
raw input shape:
window functions:
window function definition
alias: rank_window_0
arguments: _col1
name: rank
window function: GenericUDAFRankEvaluator
window frame: ROWS PRECEDING(MAX)~FOLLOWING(MAX)
isPivotResult: true
Statistics: Num rows: 26 Data size: 8937 Basic stats: COMPLETE Column stats: COMPLETE
Filter Operator
predicate: (rank_window_0 <= 3) (type: boolean)
Statistics: Num rows: 8 Data size: 2625 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: _col0 (type: string), rank_window_0 (type: int)
outputColumnNames: _col0, _col1
Statistics: Num rows: 8 Data size: 457 Basic stats: COMPLETE Column stats: COMPLETE
File Output Operator
compressed: false
Statistics: Num rows: 8 Data size: 457 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 tw_code, ranking
FROM (
SELECT tw_code AS tw_code,
rank() OVER (PARTITION BY tw_code ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
PREHOOK: type: QUERY
PREHOOK: Input: default@topnkey_windowing
#### A masked pattern was here ####
POSTHOOK: query: SELECT tw_code, ranking
FROM (
SELECT tw_code AS tw_code,
rank() OVER (PARTITION BY tw_code ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
POSTHOOK: type: QUERY
POSTHOOK: Input: default@topnkey_windowing
#### A masked pattern was here ####
NULL 1
NULL 1
NULL 1
A 1
A 1
A 3
B 1
B 2
B 2
B 2
PREHOOK: query: SELECT tw_code, ranking
FROM (
SELECT tw_code AS tw_code,
rank() OVER (PARTITION BY tw_code ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
PREHOOK: type: QUERY
PREHOOK: Input: default@topnkey_windowing
#### A masked pattern was here ####
POSTHOOK: query: SELECT tw_code, ranking
FROM (
SELECT tw_code AS tw_code,
rank() OVER (PARTITION BY tw_code ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
POSTHOOK: type: QUERY
POSTHOOK: Input: default@topnkey_windowing
#### A masked pattern was here ####
NULL 1
NULL 1
NULL 1
A 1
A 1
A 3
B 1
B 2
B 2
B 2
PREHOOK: query: EXPLAIN extended
SELECT tw_code, ranking
FROM (
SELECT tw_code as tw_code,
rank() OVER (ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
PREHOOK: type: QUERY
PREHOOK: Input: default@topnkey_windowing
#### A masked pattern was here ####
POSTHOOK: query: EXPLAIN extended
SELECT tw_code, ranking
FROM (
SELECT tw_code as tw_code,
rank() OVER (ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
POSTHOOK: type: QUERY
POSTHOOK: Input: default@topnkey_windowing
#### A masked pattern was here ####
OPTIMIZED SQL: SELECT *
FROM (SELECT `tw_code`, RANK() OVER (PARTITION BY 0 ORDER BY `tw_value` ROWS BETWEEN 2147483647 FOLLOWING AND 2147483647 PRECEDING) AS `rank_window_0`
FROM `default`.`topnkey_windowing`) AS `t`
WHERE `rank_window_0` <= 3
STAGE DEPENDENCIES:
Stage-1 is a root stage
Stage-0 depends on stages: Stage-1
STAGE PLANS:
Stage: Stage-1
Map Reduce
Map Operator Tree:
TableScan
alias: topnkey_windowing
Statistics: Num rows: 26 Data size: 1969 Basic stats: COMPLETE Column stats: COMPLETE
GatherStats: false
Reduce Output Operator
key expressions: 0 (type: int), tw_value (type: double)
null sort order: az
sort order: ++
Map-reduce partition columns: 0 (type: int)
Statistics: Num rows: 26 Data size: 1969 Basic stats: COMPLETE Column stats: COMPLETE
tag: -1
TopN: 4
TopN Hash Memory Usage: 0.1
value expressions: tw_code (type: string)
auto parallelism: false
Path -> Alias:
#### A masked pattern was here ####
Path -> Partition:
#### A masked pattern was here ####
Partition
base file name: topnkey_windowing
input format: org.apache.hadoop.mapred.TextInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
properties:
COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"tw_code":"true","tw_value":"true"}}
bucket_count -1
bucketing_version 2
column.name.delimiter ,
columns tw_code,tw_value
columns.comments
columns.types string:double
#### A masked pattern was here ####
name default.topnkey_windowing
numFiles 1
numRows 26
rawDataSize 176
serialization.ddl struct topnkey_windowing { string tw_code, double tw_value}
serialization.format 1
serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
totalSize 202
#### A masked pattern was here ####
serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
input format: org.apache.hadoop.mapred.TextInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
properties:
COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"tw_code":"true","tw_value":"true"}}
bucket_count -1
bucketing_version 2
column.name.delimiter ,
columns tw_code,tw_value
columns.comments
columns.types string:double
#### A masked pattern was here ####
name default.topnkey_windowing
numFiles 1
numRows 26
rawDataSize 176
serialization.ddl struct topnkey_windowing { string tw_code, double tw_value}
serialization.format 1
serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
totalSize 202
#### A masked pattern was here ####
serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
name: default.topnkey_windowing
name: default.topnkey_windowing
Truncated Path -> Alias:
/topnkey_windowing [$hdt$_0:topnkey_windowing]
Needs Tagging: false
Reduce Operator Tree:
Select Operator
expressions: VALUE._col0 (type: string), KEY.reducesinkkey1 (type: double)
outputColumnNames: _col0, _col1
Statistics: Num rows: 26 Data size: 8937 Basic stats: COMPLETE Column stats: COMPLETE
PTF Operator
Function definitions:
Input definition
input alias: ptf_0
output shape: _col0: string, _col1: double
type: WINDOWING
Windowing table definition
input alias: ptf_1
name: windowingtablefunction
order by: _col1 ASC NULLS LAST
partition by: 0
raw input shape:
window functions:
window function definition
alias: rank_window_0
arguments: _col1
name: rank
window function: GenericUDAFRankEvaluator
window frame: ROWS PRECEDING(MAX)~FOLLOWING(MAX)
isPivotResult: true
Statistics: Num rows: 26 Data size: 8937 Basic stats: COMPLETE Column stats: COMPLETE
Filter Operator
isSamplingPred: false
predicate: (rank_window_0 <= 3) (type: boolean)
Statistics: Num rows: 8 Data size: 2625 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: _col0 (type: string), rank_window_0 (type: int)
outputColumnNames: _col0, _col1
Statistics: Num rows: 8 Data size: 457 Basic stats: COMPLETE Column stats: COMPLETE
File Output Operator
compressed: false
GlobalTableId: 0
#### A masked pattern was here ####
NumFilesPerFileSink: 1
Statistics: Num rows: 8 Data size: 457 Basic stats: COMPLETE Column stats: COMPLETE
#### A masked pattern was here ####
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
properties:
columns _col0,_col1
columns.types string:int
escape.delim \
hive.serialization.extend.additional.nesting.levels true
serialization.escape.crlf true
serialization.format 1
serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
TotalFiles: 1
GatherStats: false
MultiFileSpray: false
Stage: Stage-0
Fetch Operator
limit: -1
Processor Tree:
ListSink
PREHOOK: query: SELECT tw_code, ranking
FROM (
SELECT tw_code as tw_code,
rank() OVER (ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
PREHOOK: type: QUERY
PREHOOK: Input: default@topnkey_windowing
#### A masked pattern was here ####
POSTHOOK: query: SELECT tw_code, ranking
FROM (
SELECT tw_code as tw_code,
rank() OVER (ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
POSTHOOK: type: QUERY
POSTHOOK: Input: default@topnkey_windowing
#### A masked pattern was here ####
A 1
A 1
A 3
PREHOOK: query: SELECT tw_code, ranking
FROM (
SELECT tw_code as tw_code,
rank() OVER (ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
PREHOOK: type: QUERY
PREHOOK: Input: default@topnkey_windowing
#### A masked pattern was here ####
POSTHOOK: query: SELECT tw_code, ranking
FROM (
SELECT tw_code as tw_code,
rank() OVER (ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
POSTHOOK: type: QUERY
POSTHOOK: Input: default@topnkey_windowing
#### A masked pattern was here ####
A 1
A 1
A 3
PREHOOK: query: EXPLAIN
SELECT tw_code, ranking
FROM (
SELECT tw_code AS tw_code,
dense_rank() OVER (PARTITION BY tw_code ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
PREHOOK: type: QUERY
PREHOOK: Input: default@topnkey_windowing
#### A masked pattern was here ####
POSTHOOK: query: EXPLAIN
SELECT tw_code, ranking
FROM (
SELECT tw_code AS tw_code,
dense_rank() OVER (PARTITION BY tw_code ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
POSTHOOK: type: QUERY
POSTHOOK: Input: default@topnkey_windowing
#### 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
Map Reduce
Map Operator Tree:
TableScan
alias: topnkey_windowing
Statistics: Num rows: 26 Data size: 1969 Basic stats: COMPLETE Column stats: COMPLETE
Reduce Output Operator
key expressions: tw_code (type: string), tw_value (type: double)
null sort order: az
sort order: ++
Map-reduce partition columns: tw_code (type: string)
Statistics: Num rows: 26 Data size: 1969 Basic stats: COMPLETE Column stats: COMPLETE
TopN Hash Memory Usage: 0.1
Reduce Operator Tree:
Select Operator
expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: double)
outputColumnNames: _col0, _col1
Statistics: Num rows: 26 Data size: 8937 Basic stats: COMPLETE Column stats: COMPLETE
PTF Operator
Function definitions:
Input definition
input alias: ptf_0
output shape: _col0: string, _col1: double
type: WINDOWING
Windowing table definition
input alias: ptf_1
name: windowingtablefunction
order by: _col1 ASC NULLS LAST
partition by: _col0
raw input shape:
window functions:
window function definition
alias: dense_rank_window_0
arguments: _col1
name: dense_rank
window function: GenericUDAFDenseRankEvaluator
window frame: ROWS PRECEDING(MAX)~FOLLOWING(MAX)
isPivotResult: true
Statistics: Num rows: 26 Data size: 8937 Basic stats: COMPLETE Column stats: COMPLETE
Filter Operator
predicate: (dense_rank_window_0 <= 3) (type: boolean)
Statistics: Num rows: 8 Data size: 2625 Basic stats: COMPLETE Column stats: COMPLETE
Select Operator
expressions: _col0 (type: string), dense_rank_window_0 (type: int)
outputColumnNames: _col0, _col1
Statistics: Num rows: 8 Data size: 457 Basic stats: COMPLETE Column stats: COMPLETE
File Output Operator
compressed: false
Statistics: Num rows: 8 Data size: 457 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 tw_code, ranking
FROM (
SELECT tw_code AS tw_code,
dense_rank() OVER (PARTITION BY tw_code ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
PREHOOK: type: QUERY
PREHOOK: Input: default@topnkey_windowing
#### A masked pattern was here ####
POSTHOOK: query: SELECT tw_code, ranking
FROM (
SELECT tw_code AS tw_code,
dense_rank() OVER (PARTITION BY tw_code ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
POSTHOOK: type: QUERY
POSTHOOK: Input: default@topnkey_windowing
#### A masked pattern was here ####
NULL 1
NULL 1
NULL 1
NULL 2
NULL 2
NULL 2
A 1
A 1
A 2
A 3
B 1
B 2
B 2
B 2
B 3
PREHOOK: query: SELECT tw_code, ranking
FROM (
SELECT tw_code AS tw_code,
dense_rank() OVER (PARTITION BY tw_code ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
PREHOOK: type: QUERY
PREHOOK: Input: default@topnkey_windowing
#### A masked pattern was here ####
POSTHOOK: query: SELECT tw_code, ranking
FROM (
SELECT tw_code AS tw_code,
dense_rank() OVER (PARTITION BY tw_code ORDER BY tw_value) AS ranking
FROM topnkey_windowing) tmp1
WHERE ranking <= 3
POSTHOOK: type: QUERY
POSTHOOK: Input: default@topnkey_windowing
#### A masked pattern was here ####
NULL 1
NULL 1
NULL 1
NULL 2
NULL 2
NULL 2
A 1
A 1
A 2
A 3
B 1
B 2
B 2
B 2
B 3
PREHOOK: query: DROP TABLE topnkey_windowing
PREHOOK: type: DROPTABLE
PREHOOK: Input: default@topnkey_windowing
PREHOOK: Output: default@topnkey_windowing
POSTHOOK: query: DROP TABLE topnkey_windowing
POSTHOOK: type: DROPTABLE
POSTHOOK: Input: default@topnkey_windowing
POSTHOOK: Output: default@topnkey_windowing