Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions arrow-buffer/src/buffer/mutable_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ impl BufferSupportedRhs for BooleanBufferBuilder {
}
}

impl BufferSupportedRhs for &[u8] {
fn as_slice(&self) -> &[u8] {
self
}
}

/// Trait that will be operated on as the left-hand side (LHS) buffer in mutable operations.
///
/// This consumer of the trait must satisfies the following guarantees:
Expand Down
14 changes: 6 additions & 8 deletions arrow-buffer/src/builder/boolean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
// specific language governing permissions and limitations
// under the License.

use crate::{
BooleanBuffer, Buffer, MutableBuffer, MutableOpsBufferSupportedLhs, bit_mask, bit_util,
mutable_buffer_bin_and, mutable_buffer_bin_or, mutable_buffer_bin_xor,
mutable_buffer_unary_not,
};
use crate::{BooleanBuffer, Buffer, MutableBuffer, MutableOpsBufferSupportedLhs, bit_util, mutable_buffer_bin_and, mutable_buffer_bin_or, mutable_buffer_bin_xor, mutable_buffer_unary_not, mutable_bitwise_bin_op_helper};
use std::ops::{BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, Not, Range};

/// Builder for [`BooleanBuffer`]
Expand All @@ -32,6 +28,7 @@ use std::ops::{BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, N
#[derive(Debug)]
pub struct BooleanBufferBuilder {
buffer: MutableBuffer,
/// Current length in bits
len: usize,
}

Expand Down Expand Up @@ -223,12 +220,13 @@ impl BooleanBufferBuilder {
let offset_write = self.len;
let len = range.end - range.start;
self.advance(len);
bit_mask::set_bits(
self.buffer.as_slice_mut(),
to_set,
mutable_bitwise_bin_op_helper(
Copy link
Author

@alamb alamb Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the real change -- I am not sure why it isn't passing. I may misunderstand what is needed (yes I am absolutely hedging in case I made a mistake 😬 )

self,
offset_write,
&to_set,
range.start,
len,
|_a, b| b,
);
}

Expand Down