@@ -44,10 +44,10 @@ use datafusion_physical_expr::{
44
44
aggregate:: AggregateExprBuilder , conjunction, Partitioning ,
45
45
} ;
46
46
use datafusion_physical_expr_common:: physical_expr:: fmt_sql;
47
- use datafusion_physical_optimizer:: push_down_filter :: PushdownFilter ;
47
+ use datafusion_physical_optimizer:: filter_pushdown :: FilterPushdown ;
48
48
use datafusion_physical_optimizer:: PhysicalOptimizerRule ;
49
49
use datafusion_physical_plan:: filter_pushdown:: {
50
- FilterPushdownPropagation , FilterPushdowns ,
50
+ FilterPushdownPropagation , PredicateSupports ,
51
51
} ;
52
52
use datafusion_physical_plan:: {
53
53
aggregates:: { AggregateExec , AggregateMode , PhysicalGroupBy } ,
@@ -153,7 +153,7 @@ impl FileSource for TestSource {
153
153
154
154
fn try_pushdown_filters (
155
155
& self ,
156
- filters : & [ Arc < dyn PhysicalExpr > ] ,
156
+ filters : Vec < Arc < dyn PhysicalExpr > > ,
157
157
config : & ConfigOptions ,
158
158
) -> Result < FilterPushdownPropagation < Arc < dyn FileSource > > > {
159
159
let mut all_filters = filters. iter ( ) . map ( Arc :: clone) . collect :: < Vec < _ > > ( ) ;
@@ -167,8 +167,8 @@ impl FileSource for TestSource {
167
167
statistics : self . statistics . clone ( ) , // should be updated in reality
168
168
} ) ;
169
169
Ok ( FilterPushdownPropagation {
170
- parent_filter_result : FilterPushdowns :: all_supported ( & all_filters) ,
171
- new_node : Some ( new_node) ,
170
+ filters : PredicateSupports :: all_supported ( all_filters) ,
171
+ updated_node : Some ( new_node) ,
172
172
} )
173
173
} else {
174
174
Ok ( FilterPushdownPropagation :: unsupported ( filters) )
@@ -196,7 +196,7 @@ fn test_pushdown_into_scan() {
196
196
197
197
// expect the predicate to be pushed down into the DataSource
198
198
insta:: assert_snapshot!(
199
- OptimizationTest :: new( plan, PushdownFilter { } , true ) ,
199
+ OptimizationTest :: new( plan, FilterPushdown { } , true ) ,
200
200
@r"
201
201
OptimizationTest:
202
202
input:
@@ -220,7 +220,7 @@ fn test_pushdown_into_scan_with_config_options() {
220
220
insta:: assert_snapshot!(
221
221
OptimizationTest :: new(
222
222
Arc :: clone( & plan) ,
223
- PushdownFilter { } ,
223
+ FilterPushdown { } ,
224
224
false
225
225
) ,
226
226
@r"
@@ -239,7 +239,7 @@ fn test_pushdown_into_scan_with_config_options() {
239
239
insta:: assert_snapshot!(
240
240
OptimizationTest :: new(
241
241
plan,
242
- PushdownFilter { } ,
242
+ FilterPushdown { } ,
243
243
true
244
244
) ,
245
245
@r"
@@ -264,7 +264,7 @@ fn test_filter_collapse() {
264
264
let plan = Arc :: new ( FilterExec :: try_new ( predicate2, filter1) . unwrap ( ) ) ;
265
265
266
266
insta:: assert_snapshot!(
267
- OptimizationTest :: new( plan, PushdownFilter { } , true ) ,
267
+ OptimizationTest :: new( plan, FilterPushdown { } , true ) ,
268
268
@r"
269
269
OptimizationTest:
270
270
input:
@@ -294,7 +294,7 @@ fn test_filter_with_projection() {
294
294
295
295
// expect the predicate to be pushed down into the DataSource but the FilterExec to be converted to ProjectionExec
296
296
insta:: assert_snapshot!(
297
- OptimizationTest :: new( plan, PushdownFilter { } , true ) ,
297
+ OptimizationTest :: new( plan, FilterPushdown { } , true ) ,
298
298
@r"
299
299
OptimizationTest:
300
300
input:
@@ -318,7 +318,7 @@ fn test_filter_with_projection() {
318
318
. unwrap ( ) ,
319
319
) ;
320
320
insta:: assert_snapshot!(
321
- OptimizationTest :: new( plan, PushdownFilter { } , true ) ,
321
+ OptimizationTest :: new( plan, FilterPushdown { } , true ) ,
322
322
@r"
323
323
OptimizationTest:
324
324
input:
@@ -347,7 +347,7 @@ fn test_push_down_through_transparent_nodes() {
347
347
348
348
// expect the predicate to be pushed down into the DataSource
349
349
insta:: assert_snapshot!(
350
- OptimizationTest :: new( plan, PushdownFilter { } , true ) ,
350
+ OptimizationTest :: new( plan, FilterPushdown { } , true ) ,
351
351
@r"
352
352
OptimizationTest:
353
353
input:
@@ -411,7 +411,7 @@ fn test_no_pushdown_through_aggregates() {
411
411
412
412
// expect the predicate to be pushed down into the DataSource
413
413
insta:: assert_snapshot!(
414
- OptimizationTest :: new( plan, PushdownFilter { } , true ) ,
414
+ OptimizationTest :: new( plan, FilterPushdown { } , true ) ,
415
415
@r"
416
416
OptimizationTest:
417
417
input:
0 commit comments