Details
-
New Feature
-
Status: Reopened
-
Not a Priority
-
Resolution: Unresolved
-
1.10.0
-
None
-
None
Description
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.