Skip to content

Commit 6b42b2f

Browse files
committed
fix
1 parent 2d31524 commit 6b42b2f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/ChangelogModeTest.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@ public void testInputChangelogProducer() throws Exception {
100100
public void testLookupChangelogProducer() throws Exception {
101101
Options options = new Options();
102102
options.set(CHANGELOG_PRODUCER, LOOKUP);
103-
test(options, ChangelogMode.all(), ChangelogMode.upsert());
103+
104+
// Compatible to Flink 2.0 (keyOnlyDeletes)
105+
ChangelogMode.Builder upsertBuilder = ChangelogMode.newBuilder();
106+
for (RowKind kind : ChangelogMode.all().getContainedKinds()) {
107+
if (kind != RowKind.UPDATE_BEFORE) {
108+
upsertBuilder.addContainedKind(kind);
109+
}
110+
}
111+
test(options, ChangelogMode.all(), upsertBuilder.build());
104112
}
105113
}

0 commit comments

Comments
 (0)