scovich commented on code in PR #7833:
URL: https://github.com/apache/arrow-rs/pull/7833#discussion_r2183688597


##########
parquet-variant/src/builder.rs:
##########
@@ -479,6 +493,25 @@ impl VariantBuilder {
         self
     }
 
+    /// This method pre-populates the field name directory in the Variant 
metadata with
+    /// the specific field names, in order.
+    ///
+    /// You can use this to pre-populate a [`VariantBuilder`] with a sorted 
dictionary if you
+    /// know the field names beforehand. Sorted dictionaries can accelerate 
field access when
+    /// reading [`Variant`]s.
+    pub fn with_field_names<'a>(mut self, field_names: impl Iterator<Item = 
&'a str>) -> Self {
+        self.metadata_builder = MetadataBuilder::from_field_names(field_names);

Review Comment:
   Oh, `Extend` (and `FromIterator`) suggestion was only for the underlying 
`MetadataBuilder`. Agree it would be weird to have one for field names only at 
variant builder level!



-- 
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

Reply via email to