scovich commented on code in PR #7915: URL: https://github.com/apache/arrow-rs/pull/7915#discussion_r2205812903
########## parquet-variant/src/builder.rs: ########## @@ -350,14 +378,59 @@ impl<S: AsRef<str>> FromIterator<S> for MetadataBuilder { } } -impl<S: AsRef<str>> Extend<S> for MetadataBuilder { +impl<S: AsRef<str>> Extend<S> for DefaultMetadataBuilder { fn extend<T: IntoIterator<Item = S>>(&mut self, iter: T) { for field_name in iter { self.upsert_field_name(field_name.as_ref()); } } } +/// Read-only metadata builder that validates field names against an existing metadata dictionary Review Comment: Observation: I think the `Variant::ShreddedObject` is mostly (only?) useful on the read (unshredding) path; a writer who wants to produce shredded variant almost certainly doesn't want to work with this API because it's ultimately just a collection of variant values that were probably strongly typed at first and now have to pay a round trip through a `Variant`? Shredding would be able to consume these objects, e.g. if re-shredding something that was previously shredded, but it's not the preferred approach for turning e.g. a `StructArray` directly into `VariantArray`. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org