sunchao commented on a change in pull request #9044:
URL: https://github.com/apache/arrow/pull/9044#discussion_r550913080



##########
File path: rust/arrow/src/buffer.rs
##########
@@ -756,15 +738,15 @@ impl MutableBuffer {
     /// also ensure the new capacity will be a multiple of 64 bytes.
     ///
     /// Returns the new capacity for this buffer.
-    pub fn reserve(&mut self, capacity: usize) -> usize {
-        if capacity > self.capacity {
-            let new_capacity = bit_util::round_upto_multiple_of_64(capacity);
-            let new_capacity = cmp::max(new_capacity, self.capacity * 2);
+    pub fn reserve(&mut self, additional: usize) {

Review comment:
       I think originally we referred [C++ 
impl](https://github.com/apache/arrow/blob/master/cpp/src/arrow/buffer.h#L436) 
for the signature design to make it consistent. Since `buffer` module is 
public, we'll need to be careful when making any breaking change on API.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to