adriangb commented on code in PR #9509:
URL: https://github.com/apache/arrow-rs/pull/9509#discussion_r2889113235


##########
parquet/tests/arrow_reader/row_filter/async.rs:
##########
@@ -525,3 +525,112 @@ async fn test_predicate_pushdown_with_skipped_pages() {
         assert_eq!(batch.column(0).as_string(), &expected);
     }
 }
+
+/// Regression test: when multiple predicates are used, the first predicate's
+/// override of the selection strategy (to Mask) must NOT carry forward to
+/// subsequent predicates. Each predicate must get a fresh Auto policy so the
+/// override can detect page skipping for that predicate's specific columns.
+///
+/// Scenario:
+/// - Dense initial RowSelection (alternating select/skip) covers all pages → 
Auto resolves to Mask
+/// - Predicate 1 evaluates on column A, narrows selection to skip middle pages
+/// - Predicate 2's column B is fetched sparsely with the narrowed selection 
(missing middle pages)
+/// - Without the fix, the override for predicate 2 returns early 
(policy=Mask, not Auto),
+///   so Mask is used and tries to read missing pages → "Invalid offset" error
+#[tokio::test]
+async fn test_multi_predicate_mask_policy_carryover() {

Review Comment:
   I ran this on main and can confirm that it fails on main!



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