alamb commented on code in PR #8624:
URL: https://github.com/apache/arrow-rs/pull/8624#discussion_r2487863079


##########
arrow-array/src/array/fixed_size_list_array.rs:
##########
@@ -152,23 +168,88 @@ impl FixedSizeListArray {
             ArrowError::InvalidArgumentError(format!("Size cannot be negative, 
got {size}"))
         })?;
 
-        let len = match s {
-            0 => nulls.as_ref().map(|x| x.len()).unwrap_or_default(),
-            _ => {
-                let len = values.len() / s.max(1);
-                if let Some(n) = nulls.as_ref() {
-                    if n.len() != len {
-                        return Err(ArrowError::InvalidArgumentError(format!(
-                            "Incorrect length of null buffer for 
FixedSizeListArray, expected {} got {}",
-                            len,
-                            n.len(),
-                        )));
-                    }
+        let len = if s == 0 {
+            // Note that for degenerate and non-nullable `FixedSizeList`s, we 
will set the length to

Review Comment:
   what does "degenerate" mean in this case?



##########
arrow-array/src/array/fixed_size_list_array.rs:
##########
@@ -152,23 +168,88 @@ impl FixedSizeListArray {
             ArrowError::InvalidArgumentError(format!("Size cannot be negative, 
got {size}"))
         })?;
 
-        let len = match s {
-            0 => nulls.as_ref().map(|x| x.len()).unwrap_or_default(),
-            _ => {
-                let len = values.len() / s.max(1);
-                if let Some(n) = nulls.as_ref() {
-                    if n.len() != len {
-                        return Err(ArrowError::InvalidArgumentError(format!(
-                            "Incorrect length of null buffer for 
FixedSizeListArray, expected {} got {}",
-                            len,
-                            n.len(),
-                        )));
-                    }
+        let len = if s == 0 {

Review Comment:
   I suspect that this conditional let chain is what is causing the MSRV issue



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