godfreyhe commented on a change in pull request #14729:
URL: https://github.com/apache/flink/pull/14729#discussion_r569080654
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/StatementSetImpl.java
##########
@@ -100,4 +101,27 @@ public TableResult execute() {
operations.clear();
}
}
+
+ /**
+ * Get the json plan of the all statements and Tables as a batch.
+ *
+ * <p>The json plan is the string json representation of an optimized
ExecNode plan for the
+ * statements and Tables. An ExecNode plan can be serialized to json plan,
and a json plan can
+ * be deserialized to an ExecNode plan.
+ *
+ * <p>NOTES: Only the Blink planner supports this method.
+ *
+ * <p><b>NOTES:</b>: This is an experimental feature now.
+ *
+ * @return the string json representation of an optimized ExecNode plan
for the statements and
+ * Tables.
+ */
+ @Experimental
+ public String getJsonPlan() {
+ try {
+ return tableEnvironment.getJsonPlan(operations);
+ } finally {
+ operations.clear();
Review comment:
make sense
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]