alamb commented on code in PR #7704:
URL: https://github.com/apache/arrow-rs/pull/7704#discussion_r2155503034
##########
parquet-variant/src/variant.rs:
##########
@@ -154,64 +152,36 @@ impl<'m> VariantMetadata<'m> {
}
pub fn try_new(bytes: &'m [u8]) -> Result<Self, ArrowError> {
Review Comment:
> Yipes... I just realized that the iterator-based validation in this PR
does too much validation. It recursively descends into all child objects/arrays
and validates all the way to leaf level. For deeply nested variant values, that
could easily take on a quadratic flavor!
Maybe it is time for a "try_new_no_validation" or `try_new_unchecked` method
that creates the variant without checking (and might panic on subsequent calls
🤔 ) -- then the parent could skip the validation when returning a Variant 🤔
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]