mathiaspeters-sig opened a new pull request #716:
URL: https://github.com/apache/arrow-rs/pull/716
# Which issue does this PR close?
Closes #397
# Rationale for this change
See issue.
# What changes are included in this PR?
Two changes:
1. I added unit tests to make sure the function behaves the same as before
my changes
2. I updated the function body to follow the proposed algorithm in the issue
which in a nutshell is:
- Set individual bytes to the next byte offset
- Use a `BitChunkIterator` on the remaining bytes to set entire `u8`s
- Set remaining bits individually
# Are there any user-facing changes?
Sort of.
The way `set_bits` is called currently is that it's always applied to byte
arrays where all bits are set to 0. As long as that is true there are no user
facing changes. However, the old implementation would not overwrite a `1` with
a `0` if that is what the data says but in the current implementation it will
sometimes do that. Where it's setting individual bits (initial bits to get to a
byte alignment and remainder bits after bit chunk iterator has run out of full
u64) it behaves like the old implementation, but the section where it's setting
full bytes sets the bytes regardless of the value in `data` and `write_data`.
--
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]