twalthr commented on code in PR #26894:
URL: https://github.com/apache/flink/pull/26894#discussion_r2269693093
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/analyze/NonDeterministicUpdateAnalyzerTest.java:
##########
@@ -356,6 +357,92 @@ void testMultiSinkOnJoinedView() {
false);
}
+ @Test
+ void testMultiSinkOnMultiJoinedView() {
+ util.getTableEnv().getConfig().set(TABLE_OPTIMIZER_MULTI_JOIN_ENABLED,
true);
Review Comment:
nit: instead of calling `util.getTableEnv()` many times. introduce a local
variable `env`
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/testutils/SemanticTestBase.java:
##########
@@ -81,6 +81,8 @@ public void clearData() {
void runSteps(TableTestProgram program) throws Exception {
final TableEnvironment env =
TableEnvironment.create(EnvironmentSettings.inStreamingMode());
+ envDefaultOptions(env);
Review Comment:
```suggestion
applyDefaultEnvironmentOptions(env);
```
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/MultiJoinSemanticTests.java:
##########
@@ -26,6 +28,14 @@
/** Semantic tests for {@link StreamExecMultiJoin}. */
public class MultiJoinSemanticTests extends SemanticTestBase {
+ @Override
+ protected void envDefaultOptions(TableEnvironment env) {
+ env.getConfig()
+ .set(
+
OptimizerConfigOptions.TABLE_OPTIMIZER_NONDETERMINISTIC_UPDATE_STRATEGY,
Review Comment:
let's move this to the default implementation in the base class, all
semantic tests should run with this by default.
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/testutils/SemanticTestBase.java:
##########
@@ -149,6 +151,13 @@ protected void runStep(TestStep testStep, TableEnvironment
env) throws Exception
}
}
+ /**
+ * Hook for subclasses to apply suite-wide default table configuration
options.
+ *
+ * <p>Default implementation is a no-op. Subclasses can override to set
specific options.
+ */
+ protected void envDefaultOptions(TableEnvironment env) {}
Review Comment:
we should not provide the entire TableEnvironment here, otherwise people
come up with very creative ways of tweaking the test base. Pass `TableConfig
config` instead.
--
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]