rluvaton commented on code in PR #8619:
URL: https://github.com/apache/arrow-rs/pull/8619#discussion_r2464105555


##########
arrow-buffer/src/builder/boolean.rs:
##########
@@ -258,6 +262,133 @@ impl BooleanBufferBuilder {
     }
 }
 
+/// This trait is not public API so it does not leak the inner mutable buffer
+impl MutableOpsBufferSupportedLhs for BooleanBufferBuilder {
+    fn inner_mutable_buffer(&mut self) -> &mut MutableBuffer {
+        &mut self.buffer
+    }
+}
+
+impl Not for BooleanBufferBuilder {
+    type Output = BooleanBufferBuilder;
+
+    fn not(mut self) -> Self::Output {
+        mutable_buffer_unary_not(&mut self.buffer, 0, self.len);
+        Self {
+            buffer: self.buffer,
+            len: self.len,
+        }
+    }
+}
+
+impl BitAnd<&BooleanBuffer> for BooleanBufferBuilder {
+    type Output = BooleanBufferBuilder;
+
+    fn bitand(mut self, rhs: &BooleanBuffer) -> Self::Output {
+        self &= rhs;
+
+        self
+    }
+}
+
+impl BitAnd<&BooleanBufferBuilder> for BooleanBufferBuilder {
+    type Output = BooleanBufferBuilder;
+
+    fn bitand(mut self, rhs: &BooleanBufferBuilder) -> Self::Output {
+        self &= rhs;
+
+        self
+    }
+}
+
+impl BitAndAssign<&BooleanBuffer> for BooleanBufferBuilder {
+    fn bitand_assign(&mut self, rhs: &BooleanBuffer) {
+        assert_eq!(self.len, rhs.len());

Review Comment:
   commented



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