Github user apivovarov commented on a diff in the pull request: https://github.com/apache/flink/pull/2485#discussion_r78270826 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/StreamTableEnvironment.scala --- @@ -271,5 +271,21 @@ abstract class StreamTableEnvironment( } } + /* + * Returns the AST of the specified Table API and SQL queries and the execution plan to compute + * the result of the given [[Table]]. + * + * @param table The table for which the AST and execution plan will be returned. + * @param extended Flag to include detailed optimizer estimates. + */ + def explain(table: Table): String = { + + val ast = RelOptUtil.toString(table.getRelNode) + + s"== Abstract Syntax Tree ==" + + System.lineSeparator + + s"$ast" --- End diff -- Maybe this? ``` s"== Abstract Syntax Tree ==${System.lineSeparator}$ast" ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---