alamb commented on code in PR #9118:
URL: https://github.com/apache/arrow-rs/pull/9118#discussion_r2728827171
##########
parquet/src/arrow/arrow_reader/mod.rs:
##########
@@ -5661,12 +5668,235 @@ pub(crate) mod tests {
.build()
.unwrap();
- // Predicate pruning used to panic once mask-backed plans removed
whole pages.
- // Collecting into batches validates the plan now downgrades to
selectors instead.
let schema = reader.schema().clone();
let batches = reader.collect::<Result<Vec<_>, _>>().unwrap();
let result = concat_batches(&schema, &batches).unwrap();
assert_eq!(result.num_rows(), 2);
+ assert_eq!(
+ result.column(0).as_ref(),
+ &Int64Array::from(vec![first_value, last_value])
+ );
+ assert_eq!(
+ result.column(1).as_ref(),
+ &Int64Array::from(vec![first_value, last_value])
+ );
+ }
+
+ /// Test that bitmask-based row selection correctly handles page
boundaries.
+ /// This test creates a parquet file with multiple small pages and
verifies that
+ /// when using Mask policy, pages that are skipped entirely are handled
correctly.
+ #[test]
+ fn test_bitmask_page_aware_selection() {
Review Comment:
I found these tests really hard to read as they have so much boiler plate,
what they are doing is obscured by all the repetitious mechanics.
I will push a suggestion to reduce the duplication
--
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]