[core] Align dynamic PK events and first-row scans with Java - #845
Merged
JingsongLi merged 1 commit intoSep 15, 2026
Merged
Conversation
leaves12138
approved these changes
Sep 15, 2026
leaves12138
left a comment
There was a problem hiding this comment.
Reviewed c48317e against Java's DeleteExistingProcessor, FirstRowMergeFunction, and scan/merge contracts. No blocking findings.
The migration retract now preserves the old partition's physical values and uses DELETE. First-row all-files reads keep overlapping versions together, retain the earliest sequence, validate retracts, honor ignore-delete, and evaluate value predicates after merging. Ordinary materialized reads and incremental physical-event reads retain their separate semantics.
Local validation:
- cargo test -p paimon --lib: 2,806 passed, 2 ignored.
- first_row_scan_test, dynamic_bucket_scan_test, incremental_batch_scan_test, scan_planning_parity_test, and audit_log_table_test: 76 passed.
- Additional Rust/Java interoperability probes passed: Rust reads Java-written first-row files across four snapshots with value filters, projection and limit hints; Java reads Rust-written cross-partition events and verifies the old null/decimal/nanosecond partition values, DELETE kind, partition-filtered events, and final snapshot state.
- cargo fmt --all -- --check and targeted cargo clippy with -D warnings passed.
The full GitHub CI matrix is still running. This review does not extend support to PK-clustering files sorted by non-key columns.
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
Continue Java parity for dynamic primary-key and first-row tables after #841. Two gaps were hidden by snapshot-only or empty first-row reads:
DeleteExistingProcessorwrites DELETE with the old partition values. Incremental Rust reads therefore exposed the wrong row kind and partition.(1, 10)and(1, 99)could return both rows, or incorrectly return(1, 99)forvalue = 99.Brief change log
ignore-deletehandling.Tests
cargo test -p paimon --lib: 2,806 passed, 2 ignored.first_row_scan_test,dynamic_bucket_scan_test,incremental_batch_scan_test,scan_planning_parity_test,audit_log_table_test: 76 passed.cargo clippy -p paimon --lib --test first_row_scan_test --test dynamic_bucket_scan_test -- -D warningsandcargo fmt --all -- --checkpassed.API and Format
No public API or format version changes. New cross-partition retracts carry Java-compatible DELETE kinds and old-partition values. Existing files are not rewritten.
Documentation
Implementation comments describe the corrected planning and read contracts. This does not claim support for reading first-row PK-clustering files sorted by non-key columns.