Skip to content

Commit 1fa9efb

Browse files
committed
Test page index filtering in parquet integration test
1 parent 0bafab4 commit 1fa9efb

File tree

1 file changed

+30
-28
lines changed

1 file changed

+30
-28
lines changed

datafusion/core/tests/parquet_filter_pushdown.rs

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -362,34 +362,36 @@ impl TestCase {
362362

363363
assert_eq!(no_pushdown, pushdown_and_reordering);
364364

365-
// page index filtering is not correct:
366-
// https://github.com/apache/arrow-datafusion/issues/4002
367-
// when it is fixed we can add these tests too
368-
369-
// let page_index_only = self
370-
// .read_with_options(
371-
// &TESTFILE,
372-
// ParquetScanOptions {
373-
// pushdown_filters: false,
374-
// reorder_filters: false,
375-
// enable_page_index: true,
376-
// },
377-
// )
378-
// .await;
379-
//assert_eq!(no_pushdown, page_index_only);
380-
381-
// let pushdown_reordering_and_page_index = self
382-
// .read_with_options(
383-
// &TESTFILE,
384-
// ParquetScanOptions {
385-
// pushdown_filters: false,
386-
// reorder_filters: false,
387-
// enable_page_index: true,
388-
// },
389-
// )
390-
// .await;
391-
392-
//assert_eq!(no_pushdown, pushdown_reordering_and_page_index);
365+
let page_index_only = self
366+
.read_with_options(
367+
&TESTFILE,
368+
ParquetScanOptions {
369+
pushdown_filters: false,
370+
reorder_filters: false,
371+
enable_page_index: true,
372+
},
373+
// Only using page index, so no row filtering
374+
PushdownExpected::None,
375+
filter,
376+
)
377+
.await;
378+
379+
assert_eq!(no_pushdown, page_index_only);
380+
381+
let pushdown_reordering_and_page_index = self
382+
.read_with_options(
383+
&TESTFILE,
384+
ParquetScanOptions {
385+
pushdown_filters: true,
386+
reorder_filters: true,
387+
enable_page_index: true,
388+
},
389+
self.pushdown_expected,
390+
filter,
391+
)
392+
.await;
393+
394+
assert_eq!(no_pushdown, pushdown_reordering_and_page_index);
393395
}
394396

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

0 commit comments

Comments
 (0)