Skip to content

Commit d5a43c4

Browse files
committed
[flink] Work around Flink 2.3 ON CONFLICT validation in Delta Join ITCase
Flink 2.3 introduces ExecutionConfigOptions.TABLE_EXEC_SINK_REQUIRE_ON_CONFLICT (table.exec.sink.require-on-conflict), defaulting to true. In FlinkChangelogModeInferenceProgram, this triggers a ValidationException ("upsert key differs from primary key") before the StreamPhysicalDeltaJoinForceValidator runs, so the Delta Join ITCases can no longer reach the original "doesn't support to do delta join optimization" error path. Disable the option in Flink23DeltaJoinITCase#beforeEach so the existing assertions remain valid. Production-side impact (real Fluss users hitting this on multi-table joins / group-by + insert) is left to community discussion. Signed-off-by: Pei Yu <125331682@qq.com>
1 parent 5057a8b commit d5a43c4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

fluss-flink/fluss-flink-2.3/src/test/java/org/apache/fluss/flink/source/Flink23DeltaJoinITCase.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ public void beforeEach() {
8282
.set(
8383
OptimizerConfigOptions.TABLE_OPTIMIZER_DELTA_JOIN_STRATEGY,
8484
OptimizerConfigOptions.DeltaJoinStrategy.FORCE);
85+
// Flink 2.3 introduces ExecutionConfigOptions.TABLE_EXEC_SINK_REQUIRE_ON_CONFLICT
86+
// (default true), which makes FlinkChangelogModeInferenceProgram throw a
87+
// "upsert key differs from primary key" ValidationException before the
88+
// StreamPhysicalDeltaJoinForceValidator runs. Disable it here so the existing
89+
// delta-join "doesn't support to do delta join optimization" error remains
90+
// reachable from these tests.
91+
tEnv.getConfig().set(ExecutionConfigOptions.TABLE_EXEC_SINK_REQUIRE_ON_CONFLICT, false);
8592
}
8693

8794
@AfterEach

0 commit comments

Comments
 (0)