@@ -301,6 +301,7 @@ mod tests {
301301 Expr , Operator as DFOperator , ScalarFunctionArgs , ScalarUDF , ScalarUDFImpl , Volatility , col,
302302 } ;
303303 use datafusion_functions:: expr_fn:: get_field;
304+ use datafusion_physical_expr:: planner:: logical2physical;
304305 use datafusion_physical_expr:: { PhysicalExpr , create_physical_expr} ;
305306 use datafusion_physical_plan:: expressions as df_expr;
306307 use datafusion_physical_plan:: filter_pushdown:: PushedDown ;
@@ -652,8 +653,7 @@ mod tests {
652653
653654 let df_schema = test_schema. clone ( ) . to_dfschema ( ) . unwrap ( ) ;
654655
655- let physical_filter =
656- create_physical_expr ( & filter, & df_schema, & ExecutionProps :: default ( ) ) . unwrap ( ) ;
656+ let physical_filter = logical2physical ( & filter, df_schema. as_ref ( ) ) . unwrap ( ) ;
657657
658658 let source = vortex_source ( & test_schema) ;
659659
@@ -689,8 +689,7 @@ mod tests {
689689
690690 let deep_filter = get_field ( get_field ( col ( "a" ) , "b" ) , "c" ) . eq ( datafusion_expr:: lit ( 10i32 ) ) ;
691691
692- let physical_filter =
693- create_physical_expr ( & deep_filter, & df_schema, & ExecutionProps :: default ( ) ) . unwrap ( ) ;
692+ let physical_filter = logical2physical ( & deep_filter, & df_schema. as_ref ( ) ) . unwrap ( ) ;
694693
695694 let prop = source
696695 . try_pushdown_filters ( vec ! [ physical_filter] , & ConfigOptions :: default ( ) )
@@ -762,8 +761,7 @@ mod tests {
762761 // Another weird ScalarFunction that we can't push down
763762 let deep_filter = unknown_func. eq ( datafusion_expr:: lit ( 10i32 ) ) ;
764763
765- let physical_filter =
766- create_physical_expr ( & deep_filter, & df_schema, & ExecutionProps :: default ( ) ) . unwrap ( ) ;
764+ let physical_filter = logical2physical ( & deep_filter, & df_schema. as_ref ( ) ) . unwrap ( ) ;
767765
768766 let prop = source
769767 . try_pushdown_filters ( vec ! [ physical_filter] , & ConfigOptions :: default ( ) )
0 commit comments