feat: support input changelog for primary key writes#318
Open
QuakeWang wants to merge 3 commits into
Open
Conversation
Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com> # Conflicts: # crates/paimon/src/table/kv_file_writer.rs
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
Linked issue: close #255
This PR supports
changelog-producer=inputfor primary-key table writes in the scoped Rust write path.The implementation double-writes primary-key input rows into changelog files while keeping normal table data files deduplicated, then commits changelog files through separate changelog manifest metadata.
Brief change log
changelog-producerand changelog file options inCoreOptions.PreparedFilesand propagate changelog files separately from normal data files.KeyValueFileWriterto write input changelog files from the full sorted input rows, while normal data files still use merge-engine selected rows.DataFileMetafrom changelog rows, including row count, key stats, sequence range, and retract row count.CommitMessage::new_changelog_filesand commit changelog entries into a separate changelog manifest list.changelogManifestListandchangelogRecordCount.bucket=-2,rowkind.field, unsupported changelog producers, and overwrite with changelog files.Tests
cargo fmt --all -- --checkcargo clippy -p paimon --all-targets -- -D warningscargo test -p paimon changelogcargo test -p paimonAPI and Format
Documentation