[Variant] Support list paths in ShreddedSchemaBuilder - #10635
Open
cakeni wants to merge 1 commit into
Open
Conversation
sdf-jkl
reviewed
Aug 12, 2026
Comment on lines
+2916
to
+2918
| let shredding_type = ShreddedSchemaBuilder::default() | ||
| .with_path("items[0].id", &DataType::Int64)? | ||
| .with_path("items[42].name", &DataType::Utf8)? |
Contributor
There was a problem hiding this comment.
I still wonder if we should allow number other than 0 or allow numbers at all. I guess it's an open question.
I like the jsonpath style with [*] - https://www.rfc-editor.org/rfc/rfc9535.html#section-2.3.2
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.
Which issue does this PR close?
Rationale for this change
ShreddedSchemaBuildercan already parse indexed Variant paths, and core Variant shredding supports lists, but schema construction currently panics when a path reaches an index. This prevents callers from describing list element schemas through the builder.What changes are included in this PR?
ShreddedSchemaBuilder.Are these changes tested?
Yes.
cargo test -p parquet-variant-compute test_variant_schema_builderpasses (11 tests).Are there any user-facing changes?
Yes. Callers can now use indexed paths such as
items[0].idwhen constructing shredding schemas. This is backward compatible.