Repository navigation
[variant] Reuse residual validation across field extractions - #1496
Merged
JingsongLi merged 2 commits intoNov 23, 2026
Merged
JingsongLi merged 2 commits into
JingsongLi merged 2 commits into
Conversation
XiaoHongbo-Hope
marked this pull request as ready for review
November 22, 2026 15:46
JingsongLi
approved these changes
Nov 23, 2026
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.
Cold projections repeatedly validate the same wide Variant and copy its metadata for each field. This also occurs when Parquet prunes
typed_valueand the residual enters the ordinary Variant fallback.Reuse a borrowed root across fallback projections and cache successful residual validation within each shredded row. Cast selected values directly instead of creating temporary owned Variants. Malformed-data checks and strict/try-cast behavior are preserved; whole-value reconstruction is unchanged. This complements #1166 and #1405.
On a fixed 1,344-row fixture with 16 cold float32 projections, 8 vCPU and three runs, planning + Arrow materialization fell from 7.750s to 1.186s (6.5x) with #1405 included in both arms. Full reads remained ~1.86s. The plain reference was 0.393s, so a residual gap remains. Logical-value checks passed; conversion/checking time is excluded.
Regression tests cover clipped layouts, casts, nulls, strict errors, distinct buffers and malformed residuals.
cargo test --locked --release -p paimon --lib variant: 123 passed, 0 failed (2 existing ignored tests). Formatting/diff checks pass. CI is still running; keeping this PR in draft.