Skip to content

Commit 2a80495

Browse files
committed
Fix test code
1 parent 02b2ebd commit 2a80495

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

datafusion/core/tests/physical_optimizer/filter_pushdown/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ fn test_no_pushdown_through_aggregates() {
595595
Ok:
596596
- FilterExec: b@1 = bar
597597
- CoalesceBatchesExec: target_batch_size=100
598-
- AggregateExec: mode=Final, gby=[a@0 as a, b@1 as b], aggr=[cnt]
598+
- AggregateExec: mode=Final, gby=[a@0 as a, b@1 as b], aggr=[cnt], ordering_mode=PartiallySorted([0])
599599
- CoalesceBatchesExec: target_batch_size=10
600600
- DataSourceExec: file_groups={1 group: [[test.parquet]]}, projection=[a, b, c], file_type=test, pushdown_supported=true, predicate=a@0 = foo
601601
"

datafusion/core/tests/physical_optimizer/filter_pushdown/util.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ impl FileSource for TestSource {
142142
})
143143
}
144144

145+
fn filter(&self) -> Option<Arc<dyn PhysicalExpr>> {
146+
self.predicate.clone()
147+
}
148+
145149
fn as_any(&self) -> &dyn Any {
146150
todo!("should not be called")
147151
}

datafusion/datasource/src/source.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ impl ExecutionPlan for DataSourceExec {
359359
child_pushdown_result: ChildPushdownResult,
360360
config: &ConfigOptions,
361361
) -> Result<FilterPushdownPropagation<Arc<dyn ExecutionPlan>>> {
362+
println!("pushing down {:?}", child_pushdown_result);
362363
// Push any remaining filters into our data source
363364
let parent_filters = child_pushdown_result
364365
.parent_filters

0 commit comments

Comments
 (0)