You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/03/02 04:04:57 UTC

[GitHub] [flink] fsk119 commented on a change in pull request #14962: [FLINK-18789][sql-client] Use TableEnvironment#executeSql method to execute insert statement in sql client

fsk119 commented on a change in pull request #14962:
URL: https://github.com/apache/flink/pull/14962#discussion_r585232054



##########
File path: flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/ExecutionContext.java
##########
@@ -751,17 +751,28 @@ private void initializeCatalogs() {
     }
 
     private StreamExecutionEnvironment createStreamExecutionEnvironment() {
-        final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
+        // We need not different StreamExecutionEnvironments to build and submit flink job,
+        // instead we just use StreamExecutionEnvironment#executeAsync(StreamGraph) method
+        // to execute existing StreamGraph.
+        // This requires StreamExecutionEnvironment to have a full flink configuration.
+        final StreamExecutionEnvironment env =
+                new StreamExecutionEnvironment(new Configuration(flinkConfig), classLoader);

Review comment:
       It seems planner will configure the `ExecutionEnvironment` when translate the sql to plan. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org