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


##########
arrow-buffer/src/buffer/immutable.rs:
##########
@@ -358,10 +365,12 @@ impl Buffer {
         UnalignedBitChunk::new(self.as_slice(), offset, len).count_ones()
     }
 
-    /// Returns `MutableBuffer` for mutating the buffer if this buffer is not 
shared.
-    /// Returns `Err` if this is shared or its allocation is from an external 
source or
+    /// Returns `MutableBuffer` for mutating the buffer if this buffer is not 
shared or sliced.

Review Comment:
   if the original buffer was sliced, why not just return an unsliced mutable 
buffer? Is the idea that that would have different (logical) data?
   
   What do you think about just updating this  to simply return Err(self) if 
the data is sliced?
   
   



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