Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
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.
EXPLAIN [ExplainDetail[, ExplainDetail]*] <statement> ExplainDetail: { ESTIMATED_COST, CHANGELOG_MODE, JSON_EXECUTION_PLAN }
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 =
)
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.
Flink SQL> EXPLAIN ESTIMATED_COST, CHANGELOG SELECT * FROM MyTable; ...
Attachments
Issue Links
- duplicates
-
FLINK-21465 Extend explain syntax
- Closed
- links to