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/11/14 16:59:04 UTC

[GitHub] [arrow] jhorstmann commented on a change in pull request #8663: ARROW-10079: [Rust] Benchmark and improve count bits

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



##########
File path: rust/arrow/src/array/array_union.rs
##########
@@ -232,7 +231,7 @@ impl UnionArray {
         assert!(index - self.offset() < self.len());
         if self.is_dense() {
             let valid_slots = match self.data.null_buffer() {
-                Some(b) => bit_util::count_set_bits_offset(b.data(), 0, index),
+                Some(b) => b.count_set_bits_offset(0, index),

Review comment:
       Unrelated to this refactoring, but this code in `UnionArray` did not match my understanding of the [array format documentation][1]. At least I don't see any mention that the offsets array is compressed by omitting null values. Or maybe the documentation needs a better example that includes a null bitmap.
   
    [1]: https://arrow.apache.org/docs/format/Columnar.html#dense-union




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