You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "godfrey he (Jira)" <ji...@apache.org> on 2020/03/02 07:13:00 UTC
[jira] [Created] (FLINK-16363) Correct the execution behavior of
TableEnvironment and StreamTableEnvironment
godfrey he created FLINK-16363:
----------------------------------
Summary: Correct the execution behavior of TableEnvironment and StreamTableEnvironment
Key: FLINK-16363
URL: https://issues.apache.org/jira/browse/FLINK-16363
Project: Flink
Issue Type: Sub-task
Components: Table SQL / API
Reporter: godfrey he
Fix For: 1.11.0
Both {{TableEnvironment.execute()}} and {{StreamExecutionEnvironment.execute}} can trigger a Flink table program execution. However if you use {{TableEnvironment}} to build a Flink table program, you must use {{TableEnvironment.execute()}} to trigger execution, because you can’t get the {{StreamExecutionEnvironment}} instance. If you use {{StreamTableEnvironment}} to build a Flink table program, you can use both to trigger execution. If you convert a table program to a {{DataStream}} program (using {{StreamExecutionEnvironment.toAppendStream/toRetractStream}}), you also can use both to trigger execution. So it’s hard to explain which `execute` method should be used.
To correct current messy trigger point, we propose that: for {{TableEnvironment}} and {{StreamTableEnvironment}}, you must use {{TableEnvironment.execute()}} to trigger table program execution, once you convert the table program to a {{DataStream}} program (through {{toAppendStream}} or {{toRetractStream}} method), you must use {{StreamExecutionEnvironment.execute}} to trigger the {{DataStream}} program.
please refer to [FLIP-84|https://cwiki.apache.org/confluence/display/FLINK/FLIP-84%3A+Improve+%26+Refactor+API+of+TableEnvironment] for more detail.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)