You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by tonycox <gi...@git.apache.org> on 2016/10/28 12:43:29 UTC
[GitHub] flink pull request #2720: [FLINK-4623] Create Physical Execution Plan of a D...
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 <an...@epam.com>
Date: 2016-10-25T11:55:42Z
[FLINK-4623] Implement explain for StreamTableEnvironment. It shows Abstract Syntax Tree and Physical Execution Plan.
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2720: [FLINK-4623] Create Physical Execution Plan of a DataStre...
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on the issue:
https://github.com/apache/flink/pull/2720
Merging :-)
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2720: [FLINK-4623] Create Physical Execution Plan of a D...
Posted by fhueske <gi...@git.apache.org>.
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.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2720: [FLINK-4623] Create Physical Execution Plan of a D...
Posted by wuchong <gi...@git.apache.org>.
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?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2720: [FLINK-4623] Create Physical Execution Plan of a DataStre...
Posted by fhueske <gi...@git.apache.org>.
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!
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2720: [FLINK-4623] Create Physical Execution Plan of a D...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/flink/pull/2720
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2720: [FLINK-4623] Create Physical Execution Plan of a D...
Posted by fhueske <gi...@git.apache.org>.
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`
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---