You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/12/07 17:06:13 UTC

[GitHub] [arrow] jhorstmann commented on a change in pull request #8842: ARROW-10812: [Rust] Make BooleanArray not a PrimitiveArray

jhorstmann commented on a change in pull request #8842:
URL: https://github.com/apache/arrow/pull/8842#discussion_r537673166



##########
File path: rust/arrow/src/array/builder.rs
##########
@@ -280,17 +272,13 @@ impl<T: ArrowPrimitiveType> BufferBuilderTrait<T> for BufferBuilder<T> {
     }
 
     fn capacity(&self) -> usize {
-        let bit_capacity = self.buffer.capacity() * 8;
-        bit_capacity / T::get_bit_width()
+        let bit_capacity = self.buffer.capacity();
+        bit_capacity / T::get_byte_width()

Review comment:
       ```suggestion
           let byte_capacity = self.buffer.capacity();
           byte_capacity / T::get_byte_width()
   ```




----------------------------------------------------------------
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:
users@infra.apache.org