[
https://issues.apache.org/jira/browse/FLINK-3192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15081354#comment-15081354
]
ASF GitHub Bot commented on FLINK-3192:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/1477#discussion_r48752078
--- Diff:
flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java ---
@@ -828,6 +828,18 @@ public JobExecutionResult execute() throws Exception {
* be contacted to retrieve information relevant to
the execution planning.
*/
public abstract String getExecutionPlan() throws Exception;
+
+ /**
+ * Creates the AST and plan with which the system will execute the
program, and return them as
+ * sql-explanation format of HIVE.
+ * Note that this needs to be called, before the plan is executed.
+ *
+ * @param extended The sql explanation mode.
+ * @return The execution plan and AST of the program.
+ * @throws Exception Thrown, if the compiler could not be instantiated,
or the master could not
+ * be contacted to retrieve information relevant to
the execution planning.
+ */
+ public abstract String getSqlExecutionPlan(boolean extended) throws
Exception;
--- End diff --
I don't think we should add this method to all `ExecutionEnvironments`.
The JSON string returned by `getExecutionPlan()` should contain all
relevant information. How about, we query the JSON document and parse the
String in the Table API to reformat the information according to HIVE's explain
visualization?
> Add explain support to print ast and sql physical execution plan.
> ------------------------------------------------------------------
>
> Key: FLINK-3192
> URL: https://issues.apache.org/jira/browse/FLINK-3192
> Project: Flink
> Issue Type: New Feature
> Components: Table API
> Reporter: GaoLun
> Assignee: GaoLun
> Priority: Minor
> Labels: features
>
> Table API doesn't support sql-explanation now. Add the explain support to
> print ast (abstract syntax tree) and the physical execution plan of sql.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)