Skip to content

Commit 7fafd34

Browse files
adriangbclaude
andcommitted
fix CI: update tests for OptionalFilterPhysicalExpr wrap and coalesced parquet ranges
Two CI failures left over from recent commits on this branch: - test_discover_dynamic_filters_via_expressions_api: `cae5fe605` wrapped the probe-side dynamic filter in `OptionalFilterPhysicalExpr`, so the test's `downcast_ref::<DynamicFilterPhysicalExpr>` saw only the build-side filter (1 instead of 2). Also unwrap the optional wrapper before counting. - query_single_parquet_file_with_single_predicate and query_single_parquet_file_multi_row_groups_multiple_predicates: the dynamic projection-mask commit (`ada04723f`) coalesces per-page range requests into per-column-chunk ranges (same byte totals, fewer sub-ranges per GET). Update snapshots to the coalesced ranges; matches the pattern already in the no-predicate `query_single_parquet_file` snapshot. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9267518 commit 7fafd34

2 files changed

Lines changed: 15 additions & 5 deletions

File tree

datafusion/core/tests/datasource/object_store_access.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ async fn query_single_parquet_file_with_single_predicate() {
904904
RequestCountingObjectStore()
905905
Total Requests: 2
906906
- GET (opts) path=parquet_table.parquet head=true
907-
- GET (ranges) path=parquet_table.parquet ranges=1064-1481,1481-1594,1594-2011,2011-2124
907+
- GET (ranges) path=parquet_table.parquet ranges=1064-1594,1594-2124
908908
"
909909
);
910910
}
@@ -928,8 +928,8 @@ async fn query_single_parquet_file_multi_row_groups_multiple_predicates() {
928928
RequestCountingObjectStore()
929929
Total Requests: 3
930930
- GET (opts) path=parquet_table.parquet head=true
931-
- GET (ranges) path=parquet_table.parquet ranges=4-421,421-534,534-951,951-1064
932-
- GET (ranges) path=parquet_table.parquet ranges=1064-1481,1481-1594,1594-2011,2011-2124
931+
- GET (ranges) path=parquet_table.parquet ranges=4-534,534-1064
932+
- GET (ranges) path=parquet_table.parquet ranges=1064-1594,1594-2124
933933
"
934934
);
935935
}

datafusion/core/tests/physical_optimizer/filter_pushdown.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2952,14 +2952,24 @@ async fn test_discover_dynamic_filters_via_expressions_api() {
29522952
use datafusion_common::JoinType;
29532953
use datafusion_common::tree_node::TreeNodeRecursion;
29542954
use datafusion_physical_expr::expressions::DynamicFilterPhysicalExpr;
2955+
use datafusion_physical_expr_common::physical_expr::OptionalFilterPhysicalExpr;
29552956
use datafusion_physical_plan::joins::{HashJoinExec, PartitionMode};
29562957

29572958
fn count_dynamic_filters(plan: &Arc<dyn ExecutionPlan>) -> usize {
29582959
let mut count = 0;
29592960

2960-
// Check expressions from this node using apply_expressions
2961+
// Check expressions from this node using apply_expressions. The hash
2962+
// join wraps the pushed-down dynamic filter in
2963+
// `OptionalFilterPhysicalExpr`, so peek inside that wrapper too.
29612964
let _ = plan.apply_expressions(&mut |expr| {
2962-
if let Some(_df) = expr.downcast_ref::<DynamicFilterPhysicalExpr>() {
2965+
if expr.downcast_ref::<DynamicFilterPhysicalExpr>().is_some() {
2966+
count += 1;
2967+
} else if let Some(opt) = expr.downcast_ref::<OptionalFilterPhysicalExpr>()
2968+
&& opt
2969+
.inner()
2970+
.downcast_ref::<DynamicFilterPhysicalExpr>()
2971+
.is_some()
2972+
{
29632973
count += 1;
29642974
}
29652975
Ok(TreeNodeRecursion::Continue)

0 commit comments

Comments
 (0)