[jira] [Commented] (FLINK-4623) Create Physical Execution Plan of a DataStream
[ https://issues.apache.org/jira/browse/FLINK-4623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15630432#comment-15630432 ] ASF GitHub Bot commented on FLINK-4623: --- Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/2720 > Create Physical Execution Plan of a DataStream > -- > > Key: FLINK-4623 > URL: https://issues.apache.org/jira/browse/FLINK-4623 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL >Reporter: Timo Walther >Assignee: Anton Solovev > Labels: starter > > The {{StreamTableEnvironment#explain(Table)}} command for tables of a > {{StreamTableEnvironment}} only outputs the abstract syntax tree. It would be > helpful if the {{explain}} method could also generate a string from the > {{DataStream}} containing a physical execution plan. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-4623) Create Physical Execution Plan of a DataStream
[ https://issues.apache.org/jira/browse/FLINK-4623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15629676#comment-15629676 ] ASF GitHub Bot commented on FLINK-4623: --- Github user fhueske commented on the issue: https://github.com/apache/flink/pull/2720 Merging :-) > Create Physical Execution Plan of a DataStream > -- > > Key: FLINK-4623 > URL: https://issues.apache.org/jira/browse/FLINK-4623 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL >Reporter: Timo Walther >Assignee: Anton Solovev > Labels: starter > > The {{StreamTableEnvironment#explain(Table)}} command for tables of a > {{StreamTableEnvironment}} only outputs the abstract syntax tree. It would be > helpful if the {{explain}} method could also generate a string from the > {{DataStream}} containing a physical execution plan. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-4623) Create Physical Execution Plan of a DataStream
[ https://issues.apache.org/jira/browse/FLINK-4623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15629134#comment-15629134 ] ASF GitHub Bot commented on FLINK-4623: --- Github user fhueske commented on the issue: https://github.com/apache/flink/pull/2720 +1 to merge. Btw @tonycox, please leave a brief comment when you update a PR. Otherwise, we won't get an email and the update might not be noticed until somebody looks at the PR. Thanks! > Create Physical Execution Plan of a DataStream > -- > > Key: FLINK-4623 > URL: https://issues.apache.org/jira/browse/FLINK-4623 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL >Reporter: Timo Walther >Assignee: Anton Solovev > Labels: starter > > The {{StreamTableEnvironment#explain(Table)}} command for tables of a > {{StreamTableEnvironment}} only outputs the abstract syntax tree. It would be > helpful if the {{explain}} method could also generate a string from the > {{DataStream}} containing a physical execution plan. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-4623) Create Physical Execution Plan of a DataStream
[ https://issues.apache.org/jira/browse/FLINK-4623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15622733#comment-15622733 ] ASF GitHub Bot commented on FLINK-4623: --- Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/2720#discussion_r85783220 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/StreamTableEnvironment.scala --- @@ -311,14 +313,24 @@ abstract class StreamTableEnvironment( * * @param table The table for which the AST and execution plan will be returned. */ - def explain(table: Table): String = { + def explain(table: Table): String = { val ast = RelOptUtil.toString(table.getRelNode) +val dataStream = translate[Row](table)(TypeExtractor.createTypeInfo(classOf[Row])) + +val env = dataStream.getExecutionEnvironment +val jasonSqlPlan = env.getExecutionPlan --- End diff -- `jason` -> `json` > Create Physical Execution Plan of a DataStream > -- > > Key: FLINK-4623 > URL: https://issues.apache.org/jira/browse/FLINK-4623 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL >Reporter: Timo Walther >Assignee: Anton Solovev > Labels: starter > > The {{StreamTableEnvironment#explain(Table)}} command for tables of a > {{StreamTableEnvironment}} only outputs the abstract syntax tree. It would be > helpful if the {{explain}} method could also generate a string from the > {{DataStream}} containing a physical execution plan. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-4623) Create Physical Execution Plan of a DataStream
[ https://issues.apache.org/jira/browse/FLINK-4623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15622732#comment-15622732 ] ASF GitHub Bot commented on FLINK-4623: --- Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/2720#discussion_r85783793 --- Diff: flink-libraries/flink-table/src/test/scala/org/apache/flink/api/scala/stream/ExplainStreamTest.scala --- @@ -40,9 +40,12 @@ class ExplainStreamTest .toTable(tEnv, 'a, 'b) .filter("a % 2 = 0") -val result = tEnv.explain(table).replaceAll("\\r\\n", "\n") +val result = tEnv.explain(table) + .replaceAll("\\r\\n", "\n").replaceAll("Stage \\d+", "") --- End diff -- Please add a comment why you ignore the `Stage` info in the test. > Create Physical Execution Plan of a DataStream > -- > > Key: FLINK-4623 > URL: https://issues.apache.org/jira/browse/FLINK-4623 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL >Reporter: Timo Walther >Assignee: Anton Solovev > Labels: starter > > The {{StreamTableEnvironment#explain(Table)}} command for tables of a > {{StreamTableEnvironment}} only outputs the abstract syntax tree. It would be > helpful if the {{explain}} method could also generate a string from the > {{DataStream}} containing a physical execution plan. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-4623) Create Physical Execution Plan of a DataStream
[ https://issues.apache.org/jira/browse/FLINK-4623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15617412#comment-15617412 ] ASF GitHub Bot commented on FLINK-4623: --- Github user wuchong commented on a diff in the pull request: https://github.com/apache/flink/pull/2720#discussion_r85633731 --- Diff: flink-libraries/flink-table/src/test/scala/resources/testUnionStream0.out --- @@ -2,3 +2,21 @@ LogicalUnion(all=[true]) LogicalTableScan(table=[[_DataStreamTable_0]]) LogicalTableScan(table=[[_DataStreamTable_1]]) + +== Physical Execution Plan == +Stage 1 : Data Source + content : collect elements with CollectionInputFormat + +Stage 2 : Data Source + content : collect elements with CollectionInputFormat + + Stage 3 : Operator + content : from: (count, word) + ship_strategy : REBALANCE + exchange_mode : null + + Stage 4 : Operator + content : from: (count, word) + ship_strategy : REBALANCE + exchange_mode : null --- End diff -- It seems that the json execution plan generated from `env.getExecutionPlan` dosen't contain the `exchange_mode` information. Could we remove this node in explain? > Create Physical Execution Plan of a DataStream > -- > > Key: FLINK-4623 > URL: https://issues.apache.org/jira/browse/FLINK-4623 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL >Reporter: Timo Walther >Assignee: Anton Solovev > Labels: starter > > The {{StreamTableEnvironment#explain(Table)}} command for tables of a > {{StreamTableEnvironment}} only outputs the abstract syntax tree. It would be > helpful if the {{explain}} method could also generate a string from the > {{DataStream}} containing a physical execution plan. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-4623) Create Physical Execution Plan of a DataStream
[ https://issues.apache.org/jira/browse/FLINK-4623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15615275#comment-15615275 ] ASF GitHub Bot commented on FLINK-4623: --- GitHub user tonycox opened a pull request: https://github.com/apache/flink/pull/2720 [FLINK-4623] Create Physical Execution Plan of a DataStream You can merge this pull request into a Git repository by running: $ git pull https://github.com/tonycox/flink FLINK-4623 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/2720.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2720 commit bdbfe89fbb61b04f3ee6f29b30382bf06983c2e5 Author: anton solovev Date: 2016-10-25T11:55:42Z [FLINK-4623] Implement explain for StreamTableEnvironment. It shows Abstract Syntax Tree and Physical Execution Plan. > Create Physical Execution Plan of a DataStream > -- > > Key: FLINK-4623 > URL: https://issues.apache.org/jira/browse/FLINK-4623 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL >Reporter: Timo Walther >Assignee: Anton Solovev > Labels: starter > > The {{StreamTableEnvironment#explain(Table)}} command for tables of a > {{StreamTableEnvironment}} only outputs the abstract syntax tree. It would be > helpful if the {{explain}} method could also generate a string from the > {{DataStream}} containing a physical execution plan. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-4623) Create Physical Execution Plan of a DataStream
[ https://issues.apache.org/jira/browse/FLINK-4623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15601846#comment-15601846 ] Anton Solovev commented on FLINK-4623: -- Do I need to create special getSqlExecutionPlan method for stream explain org.apache.flink.api.table.explain.PlanJsonParser ? > Create Physical Execution Plan of a DataStream > -- > > Key: FLINK-4623 > URL: https://issues.apache.org/jira/browse/FLINK-4623 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL >Reporter: Timo Walther >Assignee: Anton Solovev > Labels: starter > > The {{StreamTableEnvironment#explain(Table)}} command for tables of a > {{StreamTableEnvironment}} only outputs the abstract syntax tree. It would be > helpful if the {{explain}} method could also generate a string from the > {{DataStream}} containing a physical execution plan. -- This message was sent by Atlassian JIRA (v6.3.4#6332)