RocMarshal commented on code in PR #28500:
URL: https://github.com/apache/flink/pull/28500#discussion_r3732741836
##########
flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/api/bridge/java/StreamTableEnvironment.java:
##########
@@ -88,7 +90,12 @@ public interface StreamTableEnvironment extends
TableEnvironment {
* TableEnvironment}.
*/
static StreamTableEnvironment create(StreamExecutionEnvironment
executionEnvironment) {
- return create(executionEnvironment,
EnvironmentSettings.newInstance().build());
+ final EnvironmentSettings.Builder settingsBuilder =
EnvironmentSettings.newInstance();
+ if
(executionEnvironment.getConfiguration().get(ExecutionOptions.RUNTIME_MODE)
+ == RuntimeExecutionMode.BATCH) {
+ settingsBuilder.inBatchMode();
+ }
+ return create(executionEnvironment, settingsBuilder.build());
Review Comment:
Just a minor comments.
The Builder pattern calling was broken by the condition line.
Could we add a method like
`EnvironmentSettings.Builder#inMode(RuntimeExecutionMode mode)` OR
`EnvironmentSettings.Builder#withRuntimeExecutionMode(RuntimeExecutionMode
mode)`?
If so, the Builder pattern calling lines would be not broken.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]