You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "felipecrv (via GitHub)" <gi...@apache.org> on 2023/07/19 20:57:15 UTC
[GitHub] [arrow] felipecrv opened a new issue, #36776: [C++] array_nested.cc: CleanListOffsets() assumes offsets.offset() is always 0
felipecrv opened a new issue, #36776:
URL: https://github.com/apache/arrow/issues/36776
### Describe the bug, including details regarding any error messages, version, and platform.
`CleanListOffsets` (code below) copies the validity buffer slice starting from 0, but that can lead to copying the wrong bits when `offsets.offset()` is greater than 0.
```cpp
ARROW_ASSIGN_OR_RAISE(
auto clean_validity_buffer,
offsets.null_bitmap()->CopySlice(0, bit_util::BytesForBits(num_offsets - 1)));
```
https://github.com/apache/arrow/blob/3f0b62038d7ddac090db316722f5a1695e85701b/cpp/src/arrow/array/array_nested.cc#L55-L99
The fix is simple: use `CopyBitmap` which knows how to handle offsets at the bit granularity.
### Component(s)
C++
--
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: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] pitrou closed issue #36776: [C++] array_nested.cc: CleanListOffsets() assumes offsets.offset() is always 0
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou closed issue #36776: [C++] array_nested.cc: CleanListOffsets() assumes offsets.offset() is always 0
URL: https://github.com/apache/arrow/issues/36776
--
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: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org