[ 
https://issues.apache.org/jira/browse/FLINK-20562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17303381#comment-17303381
 ] 

WeiNan Zhao commented on FLINK-20562:
-------------------------------------

[~jark] wo can discuss explain syntax , eg . 
EXPLAIN ESTIMATED_COST, CHANGELOG SELECT * FROM MyTable;
Or the syntax format supported by other databases.

> Support ExplainDetails for EXPLAIN sytnax
> -----------------------------------------
>
>                 Key: FLINK-20562
>                 URL: https://issues.apache.org/jira/browse/FLINK-20562
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / API
>            Reporter: Jark Wu
>            Priority: Major
>              Labels: sprint
>             Fix For: 1.13.0
>
>
> Currently, {{EXPLAIN}} syntax only supports to print the default AST, logical 
> plan, and physical plan. However, it doesn't support to print detailed 
> information such as CHANGELOG_MODE, ESTIMATED_COST, JSON_EXECUTION_PLAN which 
> are defined in {{ExplainDetail}}.
> Allow users to specify the ExplainDetails in statement.
> {code:sql}
> EXPLAIN [ExplainDetail[, ExplainDetail]*] <statement>
> ExplainDetail: {
>   ESTIMATED_COST,
>   CHANGELOG_MODE,
>   JSON_EXECUTION_PLAN
> }
> {code}
> Print the plan for the statement with specified ExplainDetails. 
> ESTIMATED_COST
> generates cost information on physical node estimated by optimizer, e.g. 
> TableSourceScan(..., cumulative cost = {1.0E8 rows, 1.0E8 cpu, 2.4E9 io, 0.0 
> network, 0.0 memory})
> CHANGELOG_MODE
> generates changelog mode for every physical rel node. e.g. 
> GroupAggregate(..., changelogMode=[I,UA,D])
> JSON_EXECUTION_PLAN
> generates the execution plan in json format of the program.
> {code:sql}
> Flink SQL> EXPLAIN ESTIMATED_COST, CHANGELOG SELECT * FROM MyTable;
> ...
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to