haohuaijin commented on code in PR #10968:
URL: https://github.com/apache/arrow-rs/pull/10968#discussion_r4105527867


##########
parquet/src/arrow/arrow_reader/selection/algebra.rs:
##########
@@ -728,6 +792,96 @@ mod tests {
         );
     }
 
+    #[test]
+    fn test_dense_mask_and_then_mask_with_offsets() {
+        for len in [8192, 8193, 10_000] {
+            for outer_stride in [100, 20, 4] {
+                let outer_offset = 3;
+                let outer = BooleanBuffer::from_iter(
+                    (0..len + outer_offset).map(|i| (i + 1) % outer_stride != 
0),
+                )
+                .slice(outer_offset, len);
+
+                let inner_offset = 5;
+                let inner_len = outer.count_set_bits();
+                let inner = BooleanBuffer::from_iter(
+                    (0..inner_len + inner_offset).map(|i| (i + 2) % 97 != 0),
+                )
+                .slice(inner_offset, inner_len);
+
+                assert!(should_use_dense_mask(
+                    outer.len(),
+                    inner.len(),
+                    inner.count_set_bits()
+                ));
+
+                let mut inner_idx = 0;

Review Comment:
   done in 
[b44dc03](https://github.com/apache/arrow-rs/pull/10968/commits/b44dc03a6342b5e934031970bc8d424ce4cd07d4)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to