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 2022/01/05 12:43:43 UTC

[GitHub] [arrow-rs] jhorstmann commented on a change in pull request #1039: BooleanBufferBuilder::append_packed (#1038)

jhorstmann commented on a change in pull request #1039:
URL: https://github.com/apache/arrow-rs/pull/1039#discussion_r778789580



##########
File path: arrow/src/array/builder.rs
##########
@@ -398,6 +399,95 @@ impl BooleanBufferBuilder {
         }
     }
 
+    /// Append `count` bits from `to_set`
+    ///
+    /// `to_set` is a slice of bits packed LSB-first into `[u8]`
+    ///
+    /// # Panics
+    ///
+    /// Panics if `to_set` does not contain `ceil(count / 8)` bytes
+    #[inline]
+    pub fn append_packed(&mut self, count: usize, to_set: &[u8]) {
+        assert_eq!((count + 7) >> 3, to_set.len());

Review comment:
       My comment about benchmarking shouldn't be seen as blocking this PR, the api is definitely useful and we can always try to improve the performance later.




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org