Rachelint commented on issue #6430:
URL: https://github.com/apache/arrow-rs/issues/6430#issuecomment-2365711201

   > When trying to start from the `BooleanArray`, I find that the current 
`BooleanBufferBuilder` can't reuse the buffer from a sliced `BooleanArray` if 
the slicing is not aligned.
   > 
   > Here is the `BooleanBufferBuilder`'s definition:
   > 
   > ```rust
   > pub struct BooleanBufferBuilder {
   >     buffer: MutableBuffer,
   >     len: usize,
   > }
   > ```
   > 
   > And it assumes that the boolean values must start from the first bit, but 
a sliced `BooleanArray` may skip some bits of the first byte. So I guess I have 
to enhance the `BooleanBufferBuilder` by adding an `offset` field to support 
reuse of the buffer of a sliced `BooleanArray` first.
   > 
   > @alamb @Rachelint Please let me know your opinions.
   
   Yes, it is a actually problem for converting from `BooleanArray` to 
`BooleanBuilder`.
   And for in-place modification, I found another challenge that we can't 
modify bit through index using `BooleanBuilder`?
   
   In my opinion, can we define something like `BooleanArrayMutator`? I am 
still reading codes and `thinking`.


-- 
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]

Reply via email to