[
https://issues.apache.org/jira/browse/ARROW-4914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16795756#comment-16795756
]
Neville Dipale commented on ARROW-4914:
---------------------------------------
Hi [~csun], in the unit test:
[https://github.com/apache/arrow/blob/master/rust/arrow/src/array.rs#L1144] we
have array with bitmask 1010111. After we slice(offset: 2, len: 5), we should
have 10111 but we have 10101.
To make the test fail, you can insert *assert!(arr2.is_null(3));* to check the
null value of the 4th element in the array. My apologies, I don't have enough
time to make a gist now, but I can make one later if the above can't reproduce
the issue.
> [Rust] Array slice returns incorrect bitmask
> --------------------------------------------
>
> Key: ARROW-4914
> URL: https://issues.apache.org/jira/browse/ARROW-4914
> Project: Apache Arrow
> Issue Type: Bug
> Components: Rust
> Affects Versions: 0.13.0
> Reporter: Neville Dipale
> Priority: Blocker
>
> Slicing arrays changes the offset, length and null count of their array data,
> but the bitmask is not changed.
> This results in the correct null count, but the array values might be marked
> incorrectly as valid/invalid based on the old bitmask positions before the
> offset.
> To reproduce, create an array with some null values, slice the array, and
> then dbg!() it (after downcasting).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)