connortsui20 commented on code in PR #8624:
URL: https://github.com/apache/arrow-rs/pull/8624#discussion_r2487933905
##########
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:
I made the comment more descriptive (`size == 0`)
--
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]