Rafferty97 commented on code in PR #9593:
URL: https://github.com/apache/arrow-rs/pull/9593#discussion_r3005843017


##########
arrow-buffer/src/buffer/mutable.rs:
##########
@@ -450,7 +450,13 @@ impl MutableBuffer {
 
     /// Clear all existing data from this buffer.
     pub fn clear(&mut self) {
-        self.len = 0
+        self.len = 0;
+        #[cfg(feature = "pool")]

Review Comment:
   @alamb Okay, so it turns out that the two changes are actually somewhat 
interdependent. When I changed the line `buffer.truncate(0)` to `buffer.clear` 
in the unit test `test_truncate_with_pool`, this test breaks due to the missing 
code in the implementation of `clear` that is present in `truncate`. So, as it 
stands, this PR by itself breaks a unit test. I've created a new PR (#9622) 
that fixes this, which also includes the changes from this PR.
   
   For the sake of simplicity, I suggest that this PR be closed and #9622 be 
merged.



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