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



##########
File path: rust/arrow/src/buffer.rs
##########
@@ -270,6 +270,22 @@ impl Buffer {
         BitChunks::new(&self, offset, len)
     }
 
+    /// Returns the number of 1-bits in `data`
+    pub fn count_set_bits(&self) -> usize {
+        let len_in_bits = self.len() * 8;
+        self.count_set_bits_offset(0, len_in_bits)

Review comment:
       Yes, `self.offset` is already considered by `bit_chunks`, or rather by 
the `data` and `raw_data` functions. I added a test and comment about that.




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