alamb commented on code in PR #8876:
URL: https://github.com/apache/arrow-rs/pull/8876#discussion_r2543127599


##########
arrow-array/src/array/boolean_array.rs:
##########
@@ -284,6 +284,52 @@ impl BooleanArray {
     pub fn into_parts(self) -> (BooleanBuffer, Option<NullBuffer>) {
         (self.values, self.nulls)
     }
+
+    /// Apply a bitwise unary operation to this array, returning a new array.
+    ///
+    /// The operation is applied to the values, and nulls are cloned.
+    ///
+    /// # Arguments
+    ///
+    /// * `op` - The unary operation to apply.
+    pub fn unary<F>(&self, op: F) -> Self
+    where
+        F: Fn(u64) -> u64 + Copy,

Review Comment:
   same thing applies below to binary



##########
arrow-buffer/src/buffer/immutable.rs:
##########
@@ -364,23 +363,6 @@ impl Buffer {
     /// Returns `Err` if this is shared or its allocation is from an external 
source or
     /// it is not allocated with alignment [`ALIGNMENT`]
     ///
-    /// # Example: Creating a [`MutableBuffer`] from a [`Buffer`]

Review Comment:
   why is this removed?



##########
arrow-array/src/array/boolean_array.rs:
##########
@@ -284,6 +284,52 @@ impl BooleanArray {
     pub fn into_parts(self) -> (BooleanBuffer, Option<NullBuffer>) {
         (self.values, self.nulls)
     }
+
+    /// Apply a bitwise unary operation to this array, returning a new array.
+    ///
+    /// The operation is applied to the values, and nulls are cloned.
+    ///
+    /// # Arguments
+    ///
+    /// * `op` - The unary operation to apply.
+    pub fn unary<F>(&self, op: F) -> Self
+    where
+        F: Fn(u64) -> u64 + Copy,

Review Comment:
   can we please change the bound to follow the bitwise unary signature ?
   
   Namely
   ```rust
           F: FnMut(u64) -> u64
   ```
   
   



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