Github user ChengXiangLi commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1477#discussion_r49161249
  
    --- Diff: 
flink-staging/flink-table/src/main/scala/org/apache/flink/api/table/Table.scala 
---
    @@ -267,5 +271,24 @@ case class Table(private[flink] val operation: 
PlanNode) {
         this.copy(operation = UnionAll(operation, right.operation))
       }
     
    +  /**
    +   * Get the process of the sql parsing, print AST and physical execution 
plan.The AST
    +   * show the structure of the supplied statement. The execution plan 
shows how the table 
    +   * referenced by the statement will be scanned.
    +   */
    +  def explain(extended: Boolean): String = {
    +    val ast = operation
    +    val dataSet = this.toDataSet[Row]
    +    val env = dataSet.getExecutionEnvironment
    +    dataSet.output(new DiscardingOutputFormat[Row])
    +    val string = env.getExecutionPlan()
    --- End diff --
    
    It's better to use some meaningful variable name here.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to