[
https://issues.apache.org/jira/browse/FLINK-18095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17129088#comment-17129088
]
Aljoscha Krettek commented on FLINK-18095:
------------------------------------------
What is the use case for injecting a streaming environment?
> Custom Execution Environment for TableEnvironment
> -------------------------------------------------
>
> Key: FLINK-18095
> URL: https://issues.apache.org/jira/browse/FLINK-18095
> Project: Flink
> Issue Type: New Feature
> Components: Table SQL / API
> Affects Versions: 1.10.0
> Reporter: Satyam Shekhar
> Priority: Minor
>
> The recommended pattern for creating a TableEnvironment that uses Blink
> planner in batch mode is the following -
>
> var settings = EnvironmentSettings.newInstance()
> .useBlinkPlanner()
> .inBatchMode()
> .build();
> var tEnv = TableEnvironment.create(settings);
>
> The above configuration, however, does not allow injecting an
> ExecutionEnvironment in TableEnvironment. Instead, TableEnvironment is
> hardcoded to always get the ExecutionEnvironment via
> StreamExecutionEnvironment.getExecutionEnvironment(). This limits users to
> connect to a remote environment while working with TableEnvironment.
>
> The workaround suggested by [~godfreyhe] and [~jark] is to directly create a
> StreamTableEnvironmentImpl instance through StreamTableEnvironmentImpl
> constructor instead of create method.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)