[
https://issues.apache.org/jira/browse/HIVE-153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711241#action_12711241
]
He Yongqiang commented on HIVE-153:
-----------------------------------
How about this?
{noformat}
hive> explain FROM a SELECT a.country as b, count(1) as c WHERE
a.ds='2008-12-09' GROUP BY a.country; OK
...
STAGE DEPENDENCIES:
Stage-1 is a root stage
Stage-0 is a root stage
STAGE PLANS:
Stage: Stage-1
Map Reduce
Alias -> Map Operator Tree:
a
Filter Operator
predicate:
expr: (ds = '2008-12-09')
type: boolean
Group By Operator
aggregations:
expr: count(1)
keys:
expr: country
type: string
mode: hash
Reduce Output Operator
key expressions:
expr: country
type: string
sort order: +
Map-reduce partition columns:
expr: country
type: string
tag: -1
value expressions:
expr: 1
type: bigint
Reduce Operator Tree:
Group By Operator
aggregations:
expr: count(VALUE.0)
keys:
expr: KEY.0
type: string
mode: mergepartial
Select Operator
expressions:
expr: KEY.0
type: string
expr: 1
type: bigint
File Output Operator
compressed: true
GlobalTableId: 0
table:
input format: org.apache.hadoop.mapred.TextInputFormat
output format:
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
Stage: Stage-0
Fetch Operator
limit: -1
{noformat}
> explain should give meaningful column names
> -------------------------------------------
>
> Key: HIVE-153
> URL: https://issues.apache.org/jira/browse/HIVE-153
> Project: Hadoop Hive
> Issue Type: Improvement
> Components: Query Processor
> Reporter: Zheng Shao
>
> Currently explain uses numbers like "1" to represent the columns.
> It will be much better to print out the real name of the columns.
> hive> explain FROM table a SELECT a.country as b, count(1) as c WHERE
> a.ds='2008-12-09' GROUP BY a.country;
> ...
> Select Operator
> expressions:
> expr: country
> type: string
> expr: ds
> type: string
> Filter Operator
> predicate:
> expr: (1 = '2008-12-09')
> type: boolean
> Reduce Output Operator
> key expressions:
> expr: 0
> type: string
> sort order: +
> Map-reduce partition columns:
> expr: rand()
> type: double
> tag: -1
> value expressions:
> expr: 1
> type: int
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.