Repository navigation
feat(table): support lookup changelog production - #1252
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Extract non-DV lookup changelog production from #1251 into an independently mergeable change. This uses the existing primary-key compaction planner and provides the changelog foundation for subsequent deletion-vector and incremental-lookup work.
L0 inserts, updates and deletes produce logical before/after events atomically with compacted data. Incremental and streaming scans can consume the resulting COMPACT snapshot's changelog manifest.
Brief change log
Tests
Final local validation: 4,808 tests passed (4,655 library unit tests and 153 related integration tests); six existing tests were ignored.
Integration coverage includes PK/append/Data Evolution compaction, incremental and streaming reads, DV writes, and partial-update state. Lookup regressions cover overlapping first-row history levels, first-add row kinds, ignored legacy retracts, raw singleton aggregation versus ordinary queries, sequence-group replay, and reordered/changed/null/empty Map values directly and nested in ROW.
cargo fmt --all -- --check,git diff --check, andcargo clippy --locked -p paimon --lib --test pk_compact_test -- -D warnings -A clippy::nonminimal_boolpassed. The Clippy allowance covers existing repository findings with the local toolchain.Behavior was compared against the local Apache Paimon Java checkout at
5be7e2dd1f, including lookup/first-row wrappers, the outer query reducer wrapper, partial-update and aggregate reducers, and generated value equalisers.API and Format
Adds
CompactResult::changelog_files()and changelog counters toCompactMetrics; serialized results include a defaulted changelog-file list. Lookup compact executors requirelocal-cache.enabled=trueon the catalog/FileIO; a table-property flag alone cannot attach a cache. Table data formats are unchanged.Documentation
Updated the compaction guide and SQL documentation for non-DV lookup changelog production, including first-row and singleton-retract behavior.