PREHOOK: query: -- SORT_QUERY_RESULTS -- negative, references twice for result of funcion explain select nkey, nkey + 1 from (select key + 1 as nkey, value from src) a PREHOOK: type: QUERY POSTHOOK: query: -- SORT_QUERY_RESULTS -- negative, references twice for result of funcion explain select nkey, nkey + 1 from (select key + 1 as nkey, value from src) a POSTHOOK: type: QUERY 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: src Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: (key + 1) (type: double) outputColumnNames: _col0 Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: double), (_col0 + 1) (type: double) outputColumnNames: _col0, _col1 Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false Statistics: Num rows: 58 Data size: 5812 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 Warning: Shuffle Join JOIN[11][tables = [tmp2, tmp3]] in Stage 'Stage-2:MAPRED' is a cross product PREHOOK: query: -- This test query is introduced for HIVE-4968. -- First, we do not convert the join to MapJoin. EXPLAIN SELECT tmp4.key as key, tmp4.value as value, tmp4.count as count FROM (SELECT tmp2.key as key, tmp2.value as value, tmp3.count as count FROM (SELECT * FROM (SELECT key, value FROM src1) tmp1 ) tmp2 JOIN (SELECT count(*) as count FROM src1) tmp3 ) tmp4 PREHOOK: type: QUERY POSTHOOK: query: -- This test query is introduced for HIVE-4968. -- First, we do not convert the join to MapJoin. EXPLAIN SELECT tmp4.key as key, tmp4.value as value, tmp4.count as count FROM (SELECT tmp2.key as key, tmp2.value as value, tmp3.count as count FROM (SELECT * FROM (SELECT key, value FROM src1) tmp1 ) tmp2 JOIN (SELECT count(*) as count FROM src1) tmp3 ) tmp4 POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-1 is a root stage Stage-2 depends on stages: Stage-1 Stage-0 depends on stages: Stage-2 STAGE PLANS: Stage: Stage-1 Map Reduce Map Operator Tree: TableScan alias: src1 Statistics: Num rows: 0 Data size: 216 Basic stats: PARTIAL Column stats: COMPLETE Select Operator Statistics: Num rows: 0 Data size: 216 Basic stats: PARTIAL Column stats: COMPLETE Group By Operator aggregations: count() mode: hash outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator sort order: Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col0 (type: bigint) Reduce Operator Tree: Group By Operator aggregations: count(VALUE._col0) mode: mergepartial outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: bigint) outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe Stage: Stage-2 Map Reduce Map Operator Tree: TableScan Reduce Output Operator sort order: Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col0 (type: bigint) TableScan alias: src1 Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: string), _col1 (type: string) Reduce Operator Tree: Join Operator condition map: Inner Join 0 to 1 condition expressions: 0 {VALUE._col0} {VALUE._col1} 1 {VALUE._col0} outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 1 Data size: 237 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string), _col1 (type: string), _col2 (type: bigint) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 1 Data size: 237 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false Statistics: Num rows: 1 Data size: 237 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 Warning: Shuffle Join JOIN[11][tables = [tmp2, tmp3]] in Stage 'Stage-2:MAPRED' is a cross product PREHOOK: query: SELECT tmp4.key as key, tmp4.value as value, tmp4.count as count FROM (SELECT tmp2.key as key, tmp2.value as value, tmp3.count as count FROM (SELECT * FROM (SELECT key, value FROM src1) tmp1 ) tmp2 JOIN (SELECT count(*) as count FROM src1) tmp3 ) tmp4 PREHOOK: type: QUERY PREHOOK: Input: default@src1 #### A masked pattern was here #### POSTHOOK: query: SELECT tmp4.key as key, tmp4.value as value, tmp4.count as count FROM (SELECT tmp2.key as key, tmp2.value as value, tmp3.count as count FROM (SELECT * FROM (SELECT key, value FROM src1) tmp1 ) tmp2 JOIN (SELECT count(*) as count FROM src1) tmp3 ) tmp4 POSTHOOK: type: QUERY POSTHOOK: Input: default@src1 #### A masked pattern was here #### 25 25 25 25 val_165 25 val_193 25 val_265 25 val_27 25 val_409 25 val_484 25 128 25 146 val_146 25 150 val_150 25 213 val_213 25 224 25 238 val_238 25 255 val_255 25 273 val_273 25 278 val_278 25 311 val_311 25 369 25 401 val_401 25 406 val_406 25 66 val_66 25 98 val_98 25 Warning: Map Join MAPJOIN[17][bigTable=?] in task 'Stage-4:MAPRED' is a cross product PREHOOK: query: -- Then, we convert the join to MapJoin. EXPLAIN SELECT tmp4.key as key, tmp4.value as value, tmp4.count as count FROM (SELECT tmp2.key as key, tmp2.value as value, tmp3.count as count FROM (SELECT * FROM (SELECT key, value FROM src1) tmp1 ) tmp2 JOIN (SELECT count(*) as count FROM src1) tmp3 ) tmp4 PREHOOK: type: QUERY POSTHOOK: query: -- Then, we convert the join to MapJoin. EXPLAIN SELECT tmp4.key as key, tmp4.value as value, tmp4.count as count FROM (SELECT tmp2.key as key, tmp2.value as value, tmp3.count as count FROM (SELECT * FROM (SELECT key, value FROM src1) tmp1 ) tmp2 JOIN (SELECT count(*) as count FROM src1) tmp3 ) tmp4 POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-1 is a root stage Stage-5 depends on stages: Stage-1 Stage-4 depends on stages: Stage-5 Stage-0 depends on stages: Stage-4 STAGE PLANS: Stage: Stage-1 Map Reduce Map Operator Tree: TableScan alias: src1 Statistics: Num rows: 0 Data size: 216 Basic stats: PARTIAL Column stats: COMPLETE Select Operator Statistics: Num rows: 0 Data size: 216 Basic stats: PARTIAL Column stats: COMPLETE Group By Operator aggregations: count() mode: hash outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator sort order: Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col0 (type: bigint) Reduce Operator Tree: Group By Operator aggregations: count(VALUE._col0) mode: mergepartial outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: bigint) outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe Stage: Stage-5 Map Reduce Local Work Alias -> Map Local Tables: tmp4:tmp2:tmp1:src1 Fetch Operator limit: -1 Alias -> Map Local Operator Tree: tmp4:tmp2:tmp1:src1 TableScan alias: src1 Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE HashTable Sink Operator condition expressions: 0 {_col0} {_col1} 1 {_col0} keys: 0 1 Stage: Stage-4 Map Reduce Map Operator Tree: TableScan Map Join Operator condition map: Inner Join 0 to 1 condition expressions: 0 {_col0} {_col1} 1 {_col0} keys: 0 1 outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 1 Data size: 237 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string), _col1 (type: string), _col2 (type: bigint) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 1 Data size: 237 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false Statistics: Num rows: 1 Data size: 237 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 Local Work: Map Reduce Local Work Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: ListSink Warning: Map Join MAPJOIN[17][bigTable=?] in task 'Stage-4:MAPRED' is a cross product PREHOOK: query: SELECT tmp4.key as key, tmp4.value as value, tmp4.count as count FROM (SELECT tmp2.key as key, tmp2.value as value, tmp3.count as count FROM (SELECT * FROM (SELECT key, value FROM src1) tmp1 ) tmp2 JOIN (SELECT count(*) as count FROM src1) tmp3 ) tmp4 PREHOOK: type: QUERY PREHOOK: Input: default@src1 #### A masked pattern was here #### POSTHOOK: query: SELECT tmp4.key as key, tmp4.value as value, tmp4.count as count FROM (SELECT tmp2.key as key, tmp2.value as value, tmp3.count as count FROM (SELECT * FROM (SELECT key, value FROM src1) tmp1 ) tmp2 JOIN (SELECT count(*) as count FROM src1) tmp3 ) tmp4 POSTHOOK: type: QUERY POSTHOOK: Input: default@src1 #### A masked pattern was here #### 25 25 25 25 val_165 25 val_193 25 val_265 25 val_27 25 val_409 25 val_484 25 128 25 146 val_146 25 150 val_150 25 213 val_213 25 224 25 238 val_238 25 255 val_255 25 273 val_273 25 278 val_278 25 311 val_311 25 369 25 401 val_401 25 406 val_406 25 66 val_66 25 98 val_98 25