Repository navigation
Conversation
… and lists Full validation of an object or list validates all of its children, but the accessors built each child with only shallow checks, so `iter_try`, `try_field` and `try_get` validated it again. Nested values were validated once per nesting level. Children of a fully validated parent are now marked validated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sdf-jkl
marked this pull request as ready for review
November 24, 2026 00:12
Member
Author
|
🤖 Benchmark starting (GKE) | trigger Target: variant_kernels Sharding factor: 1 (1 workers). Comparing 1cc5154 (1cc5154) to 0265766 diff Run configurationrun benchmark variant_kernels
baseline:
ref: 0265766e6318b2403b264827c87558cca5a00f35
changed:
ref: 1cc51548c93339139fd5158c31b7b99c94fef23f
env:
BENCH_FILTER: unshred_variant
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Target: variant_kernels Comparing 1cc5154 (1cc5154) to 0265766 diff Run configurationrun benchmark variant_kernels
baseline:
ref: 0265766e6318b2403b264827c87558cca5a00f35
changed:
ref: 1cc51548c93339139fd5158c31b7b99c94fef23f
env:
BENCH_FILTER: unshred_variant
shards: 1
DetailsPer-runner informationvariant_kernels — shard 1/1Node: gk3-benchmark-cluster-nap-2sxr124t-a09394a8-p7bf Instance: c4a-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench variant_kernelsCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
Jefffrey
approved these changes
Nov 24, 2026
Rich-T-kid
approved these changes
Nov 24, 2026
This branch has not been deployed
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?
unshred_variant_nested_fallback1.85x slower on the benchmark runner.Rationale for this change
VariantObject::iter_tryandVariantList::iter_trycallwith_full_validation()on every child, andValueBuilder::try_append_variantthen recurses into each child object or list and callsiter_tryagain. A value nesteddlevels deep is fully validated aboutdtimes. With #11106,unshred_varianttakes this path for fallback values, even though it has already fully validated each value withVariant::try_new_with_metadata.Full validation of an object or list recursively validates all of its children, so every child of a validated value is already valid. The accessors build each child with only shallow checks, so the child loses that fact and gets validated again. This is the same problem #10879 fixed for metadata dictionary entries.
What changes are included in this PR?
VariantObjectandVariantListmark a child as fully validated when they build it from a fully validated parent.with_full_validationon such a child returns immediately, soiter_try,try_fieldandtry_getno longer re-validate subtrees. Children of unvalidated parents are built and validated as before.This conflicts with #12309 from @cetra3, which rewrites the code that builds child values. The resolution adds the same one-line call where #12309 builds children, and I am happy to do it in whichever PR lands second.
Are these changes tested?
test_children_inherit_full_validationchecks that the fields and list elements of a validated value reportis_fully_validated(), and that those of an unvalidated value do not. It fails if either the object or the list half of the change is removed.unshred_variant_nested_fallbackfromvariant_kernels(local x86,codegen-units=1):Removing the
with_full_validation()calls from bothiter_tryimplementations entirely gives about the same time (88.8 ms), so the re-validation accounts for the whole regression.Are there any significant user-facing changes?
Children returned by the accessors of a fully validated
VariantObjectorVariantList(field,get,iterand their fallible versions) now reportis_fully_validated() == true. They reportedfalsebefore, although they were valid. No public API changes.AI usage disclosure
Claude Code helped find the cause, write the change and test, and run the benchmarks. I reviewed the change and the measurements.
🤖 Generated with Claude Code