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


##########
parquet-variant-compute/src/variant_array.rs:
##########
@@ -464,6 +467,29 @@ impl VariantArray {
     ///
     /// # Panics
     /// * if the index is out of bounds
+    /// * if variant construction failed
+    ///
+    /// If this is a shredded variant but has no value at the shredded 
location, it
+    /// will return [`Variant::Null`].
+    ///
+    /// # Performance Note
+    ///
+    /// This is certainly not the most efficient way to access values in a
+    /// `VariantArray`, but it is useful for testing and debugging.
+    ///
+    /// Note: Does not do deep validation of the [`Variant`], so it is up to 
the
+    /// caller to ensure that the metadata and value were constructed 
correctly.
+    pub fn value(&self, index: usize) -> VariantArrayValue<'_, '_> {
+        self.try_value(index).unwrap()
+    }
+
+    /// Try to return the [`Variant`] instance stored at the given row
+    ///
+    /// Note: This method does not check for nulls and the value is arbitrary
+    /// (but still well-defined) if [`is_null`](Self::is_null) returns true 
for the index.
+    ///
+    /// # Panics
+    /// * if the index is out of bounds
     /// * if the array value is null

Review Comment:
   ```suggestion
   ```



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