fix(table): honor physical schemas in raw evolution reads - #636
Open
JingsongLi wants to merge 5 commits into
Open
fix(table): honor physical schemas in raw evolution reads#636JingsongLi wants to merge 5 commits into
JingsongLi wants to merge 5 commits into
Conversation
JingsongLi
marked this pull request as ready for review
July 30, 2026 09:12
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.
Summary
write_cols_ROW_ID, transformed BLOB/BLOB-view predicates, and column-merge reads on the residual-only pathWhy
Data-evolution reads previously suppressed all file-level predicates because overlapping files may provide different columns for the same logical rows. That restriction is unnecessarily broad for raw-convertible splits: when each row-id segment has only one file, no column-wise merge is required, so the file reader can safely apply predicate pruning and row filtering. The exact post-read residual remains as a format-independent correctness backstop.
Raw-convertible files must also be decoded using their physical
write_cols, even when their schema ID matches the table schema. This is required for positional formats such as.row. For example, if the table schema is[BLOB payload, INT id]but a data file physically stores only[id], decoding it as the full table schema interprets the id bytes as a BLOB offset and can read past the row payload. Resolving the physical fields fixes that pre-existing issue and also gives predicate pushdown the correct schema mapping.Validation
test_raw_row_file_uses_write_cols_when_blob_precedes_projection; it reproduces the positional decode failure with the old field resolution and passes with this changecargo fmt --all -- --checkcargo test -p paimon data_evolution_reader::tests::test_raw_row_file_uses_write_cols_when_blob_precedes_projection -- --nocapturecargo test -p paimon data_evolution_reader::tests::test_evolution_ -- --nocapturecargo clippy -p paimon --lib -- -D warningsgit diff --check