AdamGS commented on code in PR #9712:
URL: https://github.com/apache/arrow-rs/pull/9712#discussion_r3085854414
##########
arrow-array/src/array/fixed_size_binary_array.rs:
##########
@@ -94,27 +94,31 @@ impl FixedSizeBinaryArray {
ArrowError::InvalidArgumentError(format!("Size cannot be negative,
got {size}"))
})?;
- let len = if s == 0 {
- if !values.is_empty() {
- return Err(ArrowError::InvalidArgumentError(
- "Buffer cannot have non-zero length if the item size is
zero".to_owned(),
- ));
+ let len = match values.len().checked_div(s) {
Review Comment:
obviously this is a really nitpicky thing, glad to close this PR and just
punt on it to whenever it becomes an actual 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]