Skip to content

[flink] Fix nullable primary key test across Flink versions - #9118

Merged
JingsongLi merged 1 commit into
apache:masterfrom
QuakeWang:verify-null-pk
Aug 10, 2026
Merged

[flink] Fix nullable primary key test across Flink versions#9118
JingsongLi merged 1 commit into
apache:masterfrom
QuakeWang:verify-null-pk

Conversation

@QuakeWang

Copy link
Copy Markdown
Member

Purpose

testDuplicateNullablePrimaryKeyWithinSingleCommit assumed that the second input row always wins without a sequence field. However, Flink 1.x and 2.x may deliver the rows in different orders, making the assertion version-dependent.

Assert only the primary keys so the test continues to verify nullable-key deduplication without relying on an undefined winner.

Tests

  • NullablePrimaryKeyITCase#testDuplicateNullablePrimaryKeyWithinSingleCommit with Flink 1
  • NullablePrimaryKeyITCase#testDuplicateNullablePrimaryKeyWithinSingleCommit with Flink 2
  • Checkstyle and Spotless

Without a sequence field, Flink 1.x and 2.x may deliver duplicate
VALUES rows in different orders, so the test cannot require one
payload to win. Assert only the primary keys to keep the test focused
on nullable-key deduplication.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
@ArnavBalyan

Copy link
Copy Markdown
Member

We already have a PR #9117 for this

@JingsongLi

Copy link
Copy Markdown
Contributor

+1

@JingsongLi
JingsongLi merged commit 1f15a04 into apache:master Aug 10, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants