Skip to content

[core] Reconstruct changelog from historical and delta data files - #10976

Draft
discivigour wants to merge 2 commits into
apache:masterfrom
discivigour:codex/changelog-on-read-split-reader
Draft

discivigour wants to merge 2 commits into
apache:masterfrom
discivigour:codex/changelog-on-read-split-reader

Conversation

@discivigour

Copy link
Copy Markdown
Contributor

Purpose

This is a prerequisite for #10867, which exposes changelog-producer=on-read through snapshot planning and Flink integration.

Add a primary-key table reader that accepts an IncrementalSplit containing historical data files and new level-0 files. It reconstructs the previous value for each changed key, merges it with the delta, and emits the corresponding changelog. For example, if a compacted value of 13 already includes an older value of 10, a new SUM contribution of 4 emits -U 13 and +U 17.

The reader reuses lookup files across splits, takes each file’s level from the split being read, and bounds the number of cached partition-bucket states. The caller closes the reader to release its cached lookup files.

Tests

The paimon-core Maven reactor build passed with 64 focused tests. The 13 new split-reader cases cover warm and cold lookups after compaction, deletes, equal sequence numbers, cache eviction and reload, and projected reads that spill with both sort engines. The run also covered existing lookup, merge, incremental read, and batch projection tests.

@discivigour
discivigour force-pushed the codex/changelog-on-read-split-reader branch from 8d1fff6 to 4665b79 Compare November 3, 2026 14:10
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.

1 participant