tustvold commented on code in PR #4263:
URL: https://github.com/apache/arrow-rs/pull/4263#discussion_r1204797032


##########
arrow-array/src/array/fixed_size_list_array.rs:
##########
@@ -68,6 +69,114 @@ pub struct FixedSizeListArray {
 }
 
 impl FixedSizeListArray {
+    /// Create a new [`FixedSizeListArray`] with `size` element size, 
panicking on failure
+    ///
+    /// # Panics
+    ///
+    /// Panics if [`Self::try_new`] returns an error
+    pub fn new(
+        field: FieldRef,
+        size: i32,
+        values: ArrayRef,
+        nulls: Option<NullBuffer>,
+    ) -> Self {
+        Self::try_new(field, size, values, nulls).unwrap()
+    }
+
+    /// Create a new [`FixedSizeListArray`] from the provided parts, returning 
an error on failure
+    ///
+    /// # Errors
+    ///
+    /// * `size < 0`
+    /// * `values.len() / size != nulls.len()`
+    /// * `values.data_type() != field.data_type()`
+    /// * `!field.is_nullable() && 
!nulls.expand(size).contains(values.nulls())`
+    pub fn try_new(
+        field: FieldRef,
+        size: i32,

Review Comment:
   Given it is a FixedSizeArray and not a FixedValueLengthArray I'm personally 
inclined to stick with size, but will sleep on it



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