feat(partial-update): support ignore-delete semantics#573
Merged
JingsongLi merged 1 commit intoJul 21, 2026
Conversation
This was referenced Jul 21, 2026
jerry-024
reviewed
Jul 21, 2026
| new_schema.highest_field_id = | ||
| highest_field_id.max(Self::current_highest_field_id(&new_schema.fields)); | ||
|
|
||
| if PartialUpdateConfig::new(&new_schema.options).is_enabled() |
Contributor
There was a problem hiding this comment.
[major] Preserve the one-way ignore-delete invariant across merge-engine changes
This guard only runs when the resulting schema is still partial-update, so the invariant can be bypassed across schema versions:
- start with
merge-engine=partial-updateandignore-delete=true - set
merge-engine=deduplicate(this guard is disabled) - set
ignore-delete=falseor remove it (this guard is still disabled) - set
merge-engine=partial-updateagain (the previous effective value is already false)
All calls to apply_changes succeed, and historical DELETE / UPDATE_BEFORE rows can become unreadable again. The Java SchemaManager.checkAlterTableOption enforces the true -> false restriction on the option itself, independent of merge engine.
Please preserve the effective true state across engine changes, or reject disabling/removing it whenever the current schema has it enabled. A regression test covering the four-step transition above would catch this.
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 #572
Paimon Rust currently rejects
ignore-deleteoptions formerge-engine=partial-updatetables and unconditionally fails onDELETE/UPDATE_BEFORErows. This prevents compatibility with Java Paimon tables and historical files that use the supported ignore-delete semantics.This change aligns the basic Rust partial-update implementation with Java for this option while keeping advanced partial-update modes unsupported.
Brief change log
ignore-deleteandpartial-update.ignore-deleteoptions for partial-update tables, including explicitfalse.DELETEandUPDATE_BEFOREduring read-side partial-update merging when enabled, including retract-only keys._VALUE_KINDretract rows before writer buffering, sequence allocation, data-file merge, and input changelog generation.trueback tofalse, including alias removal and canonical-key override cases.Tests
cargo fmt --all -- --checkcargo test -p paimon --libcargo test -p paimon --test incremental_batch_scan_testcargo test -p paimon-datafusion --test pk_tablescargo clippy -p paimon --lib --tests -- -D warningscargo clippy -p paimon-datafusion --test pk_tables -- -D warningsCoverage includes:
false;DELETEandUPDATE_BEFORE;truetofalse;API and Format
No public API or storage-format change. The change only enables an existing Java-compatible table option and filters retract rows according to that option.
Documentation
Updated the SQL table-option documentation with the supported keys, behavior, ALTER restriction, and remaining partial-update limitations.