bjchambers commented on issue #3261:
URL: https://github.com/apache/arrow-rs/issues/3261#issuecomment-1335833184
@tustvold In debugging, it looks like it still executes the closure in the
bitwise unary operator once, and in my case it had 64 ones, so it incremented
the valid count by 64. But then `len - valid_count` causes a panic.
```
None => {
let buffer = arrow::buffer::bitwise_unary_op_helper(&right,
right_offset, len, |b| {
let t = !b;
valid_count += t.count_ones() as usize;
t
});
// We need to compensate for the additional bits read from the
end
let remainder_len = len % 64;
if remainder_len != 0 {
valid_count -= 64 - remainder_len
}
buffer
}
```
--
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]