[
https://issues.apache.org/jira/browse/FLINK-5257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15727299#comment-15727299
]
ASF GitHub Bot commented on FLINK-5257:
---------------------------------------
Github user KurtYoung commented on a diff in the pull request:
https://github.com/apache/flink/pull/2949#discussion_r91209202
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/BatchTableEnvironment.scala
---
@@ -275,17 +278,27 @@ abstract class BatchTableEnvironment(
* Table API calls and / or SQL queries and generating corresponding
[[DataSet]] operators.
*
* @param table The root node of the relational expression tree.
- * @param tpe The [[TypeInformation]] of the resulting [[DataSet]].
+ * @param tpe The [[TypeInformation]] of the resulting [[DataSet]].
* @tparam A The type of the resulting [[DataSet]].
* @return The [[DataSet]] that corresponds to the translated [[Table]].
*/
protected def translate[A](table: Table)(implicit tpe:
TypeInformation[A]): DataSet[A] = {
+ val dataSetPlan = optimize(table.getRelNode)
+ translate(dataSetPlan)
+ }
+ /**
+ * Translates a logical [[RelNode]] into a [[DataSet]].
+ *
+ * @param logicalPlan The root node of the relational expression tree.
+ * @param tpe The [[TypeInformation]] of the resulting
[[DataSet]].
+ * @tparam A The type of the resulting [[DataSet]].
+ * @return The [[DataSet]] that corresponds to the translated [[Table]].
+ */
+ protected def translate[A](logicalPlan: RelNode)(implicit tpe:
TypeInformation[A]): DataSet[A] = {
--- End diff --
Sorry for the inconvenience, I will pay attention to this kind of issues
next time.
> Display optimized logical plan when explaining table
> ----------------------------------------------------
>
> Key: FLINK-5257
> URL: https://issues.apache.org/jira/browse/FLINK-5257
> Project: Flink
> Issue Type: Improvement
> Components: Table API & SQL
> Reporter: Kurt Young
> Assignee: Kurt Young
> Priority: Minor
> Fix For: 1.2.0
>
>
> Currently when we use {{BatchTableEnvironment}} or {{StreamTableEnvironment}}
> to explain a table, it only print out the "Abstract Syntax Tree" and
> "Physical Execution Plan". Would be nice to have the "Optimized Logical Plan"
> also printed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)