Skip to content

Commit 1de7b45

Browse files
committed
Test page index filtering in parquet integration test
1 parent fc669d5 commit 1de7b45

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

datafusion/core/tests/parquet_filter_pushdown.rs

+27-26
Original file line numberDiff line numberDiff line change
@@ -341,32 +341,33 @@ impl<'a> TestCase<'a> {
341341

342342
assert_eq!(no_pushdown, pushdown_and_reordering);
343343

344-
// page index filtering is not correct:
345-
// https://github.com/apache/arrow-datafusion/issues/4002
346-
// when it is fixed we can add these tests too
347-
348-
// let page_index_only = self
349-
// .read_with_options(
350-
// ParquetScanOptions {
351-
// pushdown_filters: false,
352-
// reorder_filters: false,
353-
// enable_page_index: true,
354-
// },
355-
// )
356-
// .await;
357-
//assert_eq!(no_pushdown, page_index_only);
358-
359-
// let pushdown_reordering_and_page_index = self
360-
// .read_with_options(
361-
// ParquetScanOptions {
362-
// pushdown_filters: false,
363-
// reorder_filters: false,
364-
// enable_page_index: true,
365-
// },
366-
// )
367-
// .await;
368-
369-
//assert_eq!(no_pushdown, pushdown_reordering_and_page_index);
344+
let page_index_only = self
345+
.read_with_options(
346+
ParquetScanOptions {
347+
pushdown_filters: false,
348+
reorder_filters: false,
349+
enable_page_index: true,
350+
},
351+
// pushdown is off so no pushdown is expected
352+
PushdownExpected::None,
353+
filter,
354+
)
355+
.await;
356+
assert_eq!(no_pushdown, page_index_only);
357+
358+
let pushdown_reordering_and_page_index = self
359+
.read_with_options(
360+
ParquetScanOptions {
361+
pushdown_filters: true,
362+
reorder_filters: true,
363+
enable_page_index: true,
364+
},
365+
self.pushdown_expected,
366+
filter,
367+
)
368+
.await;
369+
370+
assert_eq!(no_pushdown, pushdown_reordering_and_page_index);
370371
}
371372

372373
/// Reads data from a test parquet file using the specified scan options

0 commit comments

Comments
 (0)