@@ -358,6 +358,13 @@ impl FileOpener for VortexOpener {
358358 . transpose ( )
359359 . map_err ( |e| DataFusionError :: External ( e. into ( ) ) ) ?;
360360
361+ tracing:: debug!(
362+ ?filter,
363+ ?projection,
364+ ?projection_expr,
365+ "opening file with predicate and projection"
366+ ) ;
367+
361368 if let Some ( limit) = limit
362369 && filter. is_none ( )
363370 {
@@ -435,8 +442,6 @@ mod tests {
435442 use datafusion_datasource:: file:: FileSource ;
436443 use datafusion_datasource:: file_scan_config:: FileScanConfigBuilder ;
437444 use datafusion_execution:: object_store:: ObjectStoreUrl ;
438- use datafusion_physical_expr:: utils:: conjunction;
439- use datafusion_physical_plan:: filter_pushdown:: FilterPushdownPropagation ;
440445 use datafusion_physical_plan:: filter_pushdown:: PushedDown ;
441446 use futures:: pin_mut;
442447 use insta:: assert_snapshot;
@@ -456,30 +461,6 @@ mod tests {
456461 use super :: * ;
457462 use crate :: VortexSource ;
458463
459- fn check_pushdown_result (
460- filters : Vec < PhysicalExprRef > ,
461- expected_pushed_filters : impl IntoIterator < Item = PhysicalExprRef > ,
462- pushdown_result : & FilterPushdownPropagation < Arc < dyn FileSource > > ,
463- ) {
464- assert_eq ! ( filters. len( ) , pushdown_result. filters. len( ) ) ;
465-
466- for filter in & pushdown_result. filters {
467- assert ! ( matches!( filter, PushedDown :: No ) ) ;
468- }
469-
470- let updated_src = pushdown_result
471- . updated_node
472- . as_ref ( )
473- . expect ( "try_pushdown_filters for VortexSource should always return updated node" ) ;
474- let vortex_src = updated_src
475- . as_any ( )
476- . downcast_ref :: < VortexSource > ( )
477- . expect ( "downcast to VortexSource" ) ;
478-
479- let expected = conjunction ( expected_pushed_filters) ;
480- assert_eq ! ( Some ( expected) , vortex_src. pushed_predicate) ;
481- }
482-
483464 /// Fixtures used for integration testing the FileSource and FileOpener
484465 struct TestFixtures {
485466 object_store : Arc < dyn ObjectStore > ,
@@ -649,10 +630,10 @@ mod tests {
649630 let pushdown_result =
650631 source. try_pushdown_filters ( vec ! [ filter. clone( ) ] , & ConfigOptions :: default ( ) ) ?;
651632
652- check_pushdown_result ( vec ! [ filter. clone( ) ] , vec ! [ filter. clone( ) ] , & pushdown_result) ;
653-
654633 let source = pushdown_result. updated_node . unwrap ( ) ;
655634
635+ assert_eq ! ( source. filter( ) , Some ( filter) ) ;
636+
656637 let base_config = FileScanConfigBuilder :: new (
657638 ObjectStoreUrl :: parse ( "s3://in-memory" ) ?,
658639 table_schema. clone ( ) ,
@@ -816,9 +797,8 @@ mod tests {
816797 let pushdown_result =
817798 source. try_pushdown_filters ( vec ! [ filter. clone( ) ] , & ConfigOptions :: default ( ) ) ?;
818799
819- check_pushdown_result ( vec ! [ filter. clone( ) ] , vec ! [ filter] , & pushdown_result) ;
820-
821800 let source = pushdown_result. updated_node . unwrap ( ) ;
801+ assert_eq ! ( source. filter( ) , Some ( filter) ) ;
822802
823803 let base_config = FileScanConfigBuilder :: new (
824804 ObjectStoreUrl :: parse ( "s3://in-memory" ) ?,
0 commit comments