Skip to content

[python] Inherit watermark in PyPaimon commits - #9090

Merged
JingsongLi merged 1 commit into
apache:masterfrom
JingsongLi:agent/fix-pypaimon-watermark-inheritance
Aug 7, 2026
Merged

[python] Inherit watermark in PyPaimon commits#9090
JingsongLi merged 1 commit into
apache:masterfrom
JingsongLi:agent/fix-pypaimon-watermark-inheritance

Conversation

@JingsongLi

Copy link
Copy Markdown
Contributor

What

Make PyPaimon commits inherit the watermark from the latest snapshot.

Why

Paimon snapshots may omit the watermark only when neither the current commit nor the previous snapshot has one. PyPaimon currently creates every new snapshot without copying the latest watermark, which breaks watermark continuity in mixed Java/Python write histories and can invalidate watermark-based time travel.

Impact

After this change, a PyPaimon commit following a watermark-bearing Java/Flink snapshot preserves that watermark. Tables whose history has never carried a watermark continue to write snapshots without one.

Tests

  • python3 -m pytest pypaimon/tests/file_store_commit_test.py -q
  • python3 -m pytest pypaimon/tests/reader_append_only_test.py::AoReaderTest::test_commit_retry_filter -q
  • flake8 --config=./dev/cfg.ini pypaimon/write/file_store_commit.py pypaimon/tests/file_store_commit_test.py
  • git diff --check

@JingsongLi
JingsongLi marked this pull request as ready for review August 7, 2026 05:56

@leaves12138 leaves12138 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the watermark inheritance semantics against the Java commit path and the PyPaimon retry flow. The change correctly preserves the latest snapshot watermark while keeping it absent for histories without one. Targeted commit tests passed.

@JingsongLi
JingsongLi merged commit 246ce02 into apache:master Aug 7, 2026
8 of 9 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.

2 participants