Repository navigation
Support nested ROW predicates in native table reads - #1153
Merged
Merged
Conversation
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
PyPaimon already supports scalar filters over flattened nested ROW projections, such as projecting
profile.detail.scoreand filteringprofile_detail_score = 7. The Native path currently cannot resolve that leaf and falls back to Python.Add nested ROW predicates to the core read pipeline, following the current Java
NestedFieldTransform: retain the enclosing root as an input, resolve separate path components with stable field IDs, mask NULL ancestors, and avoid interpreting parent-column statistics or indexes as child metadata.Brief change log
PredicateBuilder::field/nested_fieldinputs and a distinctPredicate::NestedLeaf; retain the original field identities through physical-file remapping. Ordinary comparison, null, set, string, array and range helpers accept either column names or resolvedFieldRefvalues.nested_pathin the Python predicate binding through the core builder and reuse existing typed literal conversion.Tests
nested_, 271 bypredicate, 86 DataEvolutionReader tests, 38 DataFileReader tests, and 7 managed BLOB reader tests passed (these groups overlap).cargo +1.98.0 clippy --locked -p paimon -p pypaimon_rust --lib --tests -- -D warningsand formatting checks passed.API and Format
Field selection is independent of comparison construction, like Java's transform inputs. Existing column-name calls remain supported:
The former
nested(root, path, op, literals)entry point is removed. Immutable field references validate their root position, field identities and type against the receiving builder before constant folding. The Python binding resolves the same core references and calls ordinary operators, without synthetic schemas or recursive rebinding.New core
FieldRefandPredicateFieldinput types and a nested predicate variant; no storage format changes. The Python filter dictionary accepts an optionalnested_pathlist alongside the physical rootfield.Documentation
API documentation describes path components, field identity and NULL-parent semantics. Companion PyPaimon PR: apache/paimon#10637. It retains physical projection paths and adds Native regression coverage; its CI continues building Rust main.
Review follow-up
[profile, auth_id, payload]to[profile, payload].table::table_read::tests: 31 passed. Binding filter tests: 69 passed. Final core/binding Clippy 1.98.0 and formatting passed.