Skip to content

Instantly share code, notes, and snippets.

@kgs
Created December 16, 2014 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kgs/63bc1fc148354b98a63e to your computer and use it in GitHub Desktop.
Save kgs/63bc1fc148354b98a63e to your computer and use it in GitHub Desktop.
explain_false
set hive.auto.convert.join=false;
explain select v.id, v.dest_id from kgorlo_log v join (select id, dest_id, count(*) as wiad from kgorlo_comm group by id, dest_id)com1 on com1.id=v.id and com1.dest_id=v.dest_id;
+---------------------------------------------------------------------------------------------------+--+
| Explain |
+---------------------------------------------------------------------------------------------------+--+
| STAGE DEPENDENCIES: |
| Stage-2 is a root stage |
| Stage-1 depends on stages: Stage-2 |
| Stage-0 is a root stage |
| |
| STAGE PLANS: |
| Stage: Stage-2 |
| Map Reduce |
| Map Operator Tree: |
| TableScan |
| alias: kgorlo_comm |
| Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE |
| Select Operator |
| expressions: id (type: bigint), dest_id (type: bigint) |
| outputColumnNames: id, dest_id |
| Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE |
| Group By Operator |
| aggregations: count() |
| keys: id (type: bigint), dest_id (type: bigint) |
| mode: hash |
| outputColumnNames: _col0, _col1, _col2 |
| Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE |
| Reduce Output Operator |
| key expressions: _col0 (type: bigint), _col1 (type: bigint) |
| sort order: ++ |
| Map-reduce partition columns: _col0 (type: bigint), _col1 (type: bigint) |
| Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE |
| value expressions: _col2 (type: bigint) |
| Reduce Operator Tree: |
| Group By Operator |
| aggregations: count(VALUE._col0) |
| keys: KEY._col0 (type: bigint), KEY._col1 (type: bigint) |
| mode: mergepartial |
| outputColumnNames: _col0, _col1, _col2 |
| Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE |
| Select Operator |
| expressions: _col0 (type: bigint), _col1 (type: bigint) |
| outputColumnNames: _col0, _col1 |
| Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE |
| 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-1 |
| Map Reduce |
| Map Operator Tree: |
| TableScan |
| alias: v |
| Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE |
| Reduce Output Operator |
| key expressions: id (type: bigint), dest_id (type: bigint) |
| sort order: ++ |
| Map-reduce partition columns: id (type: bigint), dest_id (type: bigint) |
| Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE |
| value expressions: id (type: bigint), dest_id (type: bigint) |
| TableScan |
| Reduce Output Operator |
| key expressions: _col0 (type: bigint), _col1 (type: bigint) |
| sort order: ++ |
| Map-reduce partition columns: _col0 (type: bigint), _col1 (type: bigint) |
| Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE |
| Reduce Operator Tree: |
| Join Operator |
| condition map: |
| Inner Join 0 to 1 |
| condition expressions: |
| 0 {VALUE._col0} {VALUE._col1} |
| 1 |
| outputColumnNames: _col0, _col1 |
| Statistics: Num rows: 1 Data size: 26 Basic stats: COMPLETE Column stats: NONE |
| Select Operator |
| expressions: _col0 (type: bigint), _col1 (type: bigint) |
| outputColumnNames: _col0, _col1 |
| Statistics: Num rows: 1 Data size: 26 Basic stats: COMPLETE Column stats: NONE |
| File Output Operator |
| compressed: false |
| Statistics: Num rows: 1 Data size: 26 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 |
| |
+---------------------------------------------------------------------------------------------------+--+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment