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/06 21:43:15 UTC

[GitHub] [arrow] jhorstmann commented on a change in pull request #8598: ARROW-10500: [Rust] Refactor bit slice, bit view iterator for array buffers

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



##########
File path: rust/arrow/src/compute/kernels/aggregate.rs
##########
@@ -152,9 +152,21 @@ where
             let data_chunks = data.chunks_exact(64);
             let remainder = data_chunks.remainder();
 
-            let bit_chunks = buffer.bit_chunks(array.offset(), array.len());
+            let buffer_slice = buffer.bit_slice().view(array.offset(), array.len());
+            let buffer_chunks = buffer_slice.chunks::<u64>();
+
+            let buffer_remainder_bits: u64 = buffer_chunks.remainder_bits();
+
+            let buffer_chunk_iter = buffer_chunks.interpret();
+
+            remainder.iter().enumerate().for_each(|(i, value)| {

Review comment:
       Can we move the remainder loop down again so that we are summing elements in the order that they are in the array?




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