emilk commented on code in PR #10730:
URL: https://github.com/apache/arrow-rs/pull/10730#discussion_r3809781256
##########
arrow-arith/src/arity.rs:
##########
@@ -273,8 +273,12 @@ where
if a.null_count() == 0 && b.null_count() == 0 {
try_binary_no_nulls(len, a, b, op)
} else {
- let nulls =
- NullBuffer::union(a.logical_nulls().as_ref(),
b.logical_nulls().as_ref()).unwrap();
+ // `null_count` is a physical count, so it can be non-zero for arrays
that
+ // have no logical nulls at all:
+ let Some(nulls) = NullBuffer::union(a.logical_nulls().as_ref(),
b.logical_nulls().as_ref())
Review Comment:
One example is `RunArray`… except the `if` above was wrong, and was checking
`null_count` instead of `is_nullable`. Fixed in
https://github.com/apache/arrow-rs/pull/10730/changes/97f30281e8411899399bdb398f3156dc3376a391
--
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]