@@ -373,7 +373,7 @@ impl<'schema> TreeNodeRewriter for PushdownChecker<'schema> {
373373 //
374374 // See comments on `FilterCandidateBuilder` for more information
375375 let null_value = ScalarValue :: try_from ( field. data_type ( ) ) ?;
376- Ok ( Transformed :: yes ( Arc :: new ( Literal :: new ( null_value) ) as _ ) )
376+ Ok ( Transformed :: yes ( Arc :: new ( Literal :: from ( null_value) ) as _ ) )
377377 } )
378378 // If the column is not in the table schema, should throw the error
379379 . map_err ( |e| arrow_datafusion_err ! ( e) ) ;
@@ -699,9 +699,10 @@ mod test {
699699 . expect ( "expected error free record batch" ) ;
700700
701701 // Test all should fail
702- let expr = col ( "timestamp_col" ) . lt ( Expr :: Literal (
703- ScalarValue :: TimestampNanosecond ( Some ( 1 ) , Some ( Arc :: from ( "UTC" ) ) ) ,
704- ) ) ;
702+ let expr = col ( "timestamp_col" ) . lt ( Expr :: from ( ScalarValue :: TimestampNanosecond (
703+ Some ( 1 ) ,
704+ Some ( Arc :: from ( "UTC" ) ) ,
705+ ) ) ) ;
705706 let expr = logical2physical ( & expr, & table_schema) ;
706707 let candidate = FilterCandidateBuilder :: new ( expr, & file_schema, & table_schema)
707708 . build ( & metadata)
@@ -723,9 +724,10 @@ mod test {
723724 assert ! ( matches!( filtered, Ok ( a) if a == BooleanArray :: from( vec![ false ; 8 ] ) ) ) ;
724725
725726 // Test all should pass
726- let expr = col ( "timestamp_col" ) . gt ( Expr :: Literal (
727- ScalarValue :: TimestampNanosecond ( Some ( 0 ) , Some ( Arc :: from ( "UTC" ) ) ) ,
728- ) ) ;
727+ let expr = col ( "timestamp_col" ) . gt ( Expr :: from ( ScalarValue :: TimestampNanosecond (
728+ Some ( 0 ) ,
729+ Some ( Arc :: from ( "UTC" ) ) ,
730+ ) ) ) ;
729731 let expr = logical2physical ( & expr, & table_schema) ;
730732 let candidate = FilterCandidateBuilder :: new ( expr, & file_schema, & table_schema)
731733 . build ( & metadata)
@@ -826,7 +828,7 @@ mod test {
826828
827829 let expr = col ( "str_col" )
828830 . is_not_null ( )
829- . or ( col ( "int_col" ) . gt ( Expr :: Literal ( ScalarValue :: UInt64 ( Some ( 5 ) ) ) ) ) ;
831+ . or ( col ( "int_col" ) . gt ( Expr :: from ( ScalarValue :: UInt64 ( Some ( 5 ) ) ) ) ) ;
830832
831833 assert ! ( can_expr_be_pushed_down_with_schemas(
832834 & expr,
0 commit comments