sdf-jkl commented on code in PR #10318:
URL: https://github.com/apache/arrow-rs/pull/10318#discussion_r3571826776


##########
parquet-variant-compute/src/variant_array.rs:
##########
@@ -316,16 +325,27 @@ impl VariantArray {
         })
     }
 
+    /// Construct a perfectly shredded `VariantArray`: every value is in
+    /// `typed_value` and the required `value` column is all-null.
+    #[cfg(test)]
+    pub(crate) fn perfectly_shredded(

Review Comment:
   Valid, thanks



##########
parquet-variant-compute/src/variant_array.rs:
##########
@@ -316,16 +325,27 @@ impl VariantArray {
         })
     }
 
+    /// Construct a perfectly shredded `VariantArray`: every value is in
+    /// `typed_value` and the required `value` column is all-null.
+    #[cfg(test)]
+    pub(crate) fn perfectly_shredded(
+        metadata: ArrayRef,
+        typed_value: ArrayRef,
+        nulls: Option<NullBuffer>,
+    ) -> Self {
+        let value = all_null_value_column(typed_value.len());
+        Self::from_parts(metadata, value, Some(typed_value), nulls)
+    }
+
     pub(crate) fn from_parts(
         metadata: ArrayRef,
-        value: Option<ArrayRef>,
+        value: ArrayRef,

Review Comment:
   I thought about it, but I think it makes it misleading for a user. Seeing 
optional `value` field may lead them to believe that it really is optional for 
a `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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to