cetra3 commented on code in PR #12311:
URL: https://github.com/apache/arrow-rs/pull/12311#discussion_r4733992134


##########
parquet-variant-compute/src/shred_variant.rs:
##########
@@ -401,32 +417,44 @@ impl<'a> VariantToShreddedObjectVariantRowBuilder<'a> {
             return Ok(false);
         };
 
-        // Route the object's fields by name as either shredded or unshredded
+        // Route the object's fields by name as either shredded or unshredded. 
An unshredded field
+        // keeps its field id and its encoded bytes, because the leftover 
`value` column uses the
+        // same metadata dictionary.
         let Self {
             value_builder,
             typed_value_builders,
+            sorted_field_names,
             seen,
             ..
         } = self;
         seen.fill(false);
+        let object = obj.view();

Review Comment:
   This has been resolved in 
https://github.com/apache/arrow-rs/pull/12311/commits/866eee40171f44e4d7ea242caef90c224eed50ef



##########
parquet-variant/src/builder/object.rs:
##########
@@ -151,6 +151,25 @@ impl<'a, S: BuilderSpecificState> ObjectBuilder<'a, S> {
         Ok(())
     }
 
+    /// Adds the field named by entry `field_id` of the metadata dictionary, 
copying the encoded
+    /// `value` as is.
+    ///
+    /// The caller must ensure that `field_id`, and every field id inside 
`value`, belong to the
+    /// metadata dictionary that this builder writes against. Copying a field 
out of an object that
+    /// uses that same dictionary, as shredding does, satisfies this.

Review Comment:
   Resolved in 
https://github.com/apache/arrow-rs/pull/12311/commits/866eee40171f44e4d7ea242caef90c224eed50ef



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

Reply via email to