[
https://issues.apache.org/jira/browse/ARROW-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Qingyou Meng updated ARROW-11248:
---------------------------------
Description:
According to the comments from function `set_bits`:
{code:java}
/// sets all bits on `write_data` on the range
`[offset_write..offset_write+len]` to be equal to the
/// bits on `data` on the range `[offset_read..offset_read+len]`{code}
The function has two defects if `write_data` contains non-null bits:
* it incorrectly calculates the null bit count, perhaps it should be read as
`diff null bit count`, because of the code in `build_extend_null_bits()`:
{code:java}
mutable.null_count += utils::set_bits(...){code}
* it does not unset bits
was:
According to the comments from function `set_bits`:
{code:java}
/// sets all bits on `write_data` on the range
`[offset_write..offset_write+len]` to be equal to the
/// bits on `data` on the range `[offset_read..offset_read+len]`{code}
The function has two defects if `write_data` contains non-null bits:
* incorrectly calculates the null bit count, perhaps it should be read as
`diff null bit count`, because of the code in `build_extend_null_bits()`:
{code:java}
mutable.null_count += utils::set_bits(...){code}
* does not unset bits
> [Rust] [Arrow] array::transform::utils::set_bits() has bug
> ----------------------------------------------------------
>
> Key: ARROW-11248
> URL: https://issues.apache.org/jira/browse/ARROW-11248
> Project: Apache Arrow
> Issue Type: Bug
> Reporter: Qingyou Meng
> Priority: Major
>
> According to the comments from function `set_bits`:
>
> {code:java}
> /// sets all bits on `write_data` on the range
> `[offset_write..offset_write+len]` to be equal to the
> /// bits on `data` on the range `[offset_read..offset_read+len]`{code}
> The function has two defects if `write_data` contains non-null bits:
> * it incorrectly calculates the null bit count, perhaps it should be read as
> `diff null bit count`, because of the code in `build_extend_null_bits()`:
> {code:java}
> mutable.null_count += utils::set_bits(...){code}
> * it does not unset bits
--
This message was sent by Atlassian Jira
(v8.3.4#803005)