@@ -517,7 +517,16 @@ mod tests {
517517 . await ?;
518518
519519 // Scan and read data
520- let exec = scan_format ( & ctx, & format, Some ( file_schema) , tmp_dir. path ( ) . to_str ( ) . unwrap ( ) , "array.json" , None , None ) . await ?;
520+ let exec = scan_format (
521+ & ctx,
522+ & format,
523+ Some ( file_schema) ,
524+ tmp_dir. path ( ) . to_str ( ) . unwrap ( ) ,
525+ "array.json" ,
526+ None ,
527+ None ,
528+ )
529+ . await ?;
521530 let batches = collect ( exec, task_ctx) . await ?;
522531
523532 assert_eq ! ( 1 , batches. len( ) ) ;
@@ -526,7 +535,10 @@ mod tests {
526535
527536 // Verify data
528537 let array_a = as_int64_array ( batches[ 0 ] . column ( 0 ) ) ?;
529- assert_eq ! ( vec![ 1 , 2 , 3 ] , ( 0 ..3 ) . map( |i| array_a. value( i) ) . collect:: <Vec <_>>( ) ) ;
538+ assert_eq ! (
539+ vec![ 1 , 2 , 3 ] ,
540+ ( 0 ..3 ) . map( |i| array_a. value( i) ) . collect:: <Vec <_>>( )
541+ ) ;
530542
531543 Ok ( ( ) )
532544 }
@@ -540,18 +552,24 @@ mod tests {
540552
541553 let tmp_dir = tempfile:: TempDir :: new ( ) ?;
542554 let path = format ! ( "{}/array.json" , tmp_dir. path( ) . to_string_lossy( ) ) ;
543- std:: fs:: write (
544- & path,
545- r#"[{"a": 1, "b": "hello"}, {"a": 2, "b": "world"}]"# ,
546- ) ?;
555+ std:: fs:: write ( & path, r#"[{"a": 1, "b": "hello"}, {"a": 2, "b": "world"}]"# ) ?;
547556
548557 let format = JsonFormat :: default ( ) . with_format_array ( true ) ;
549558 let file_schema = format
550559 . infer_schema ( & ctx, & store, & [ local_unpartitioned_file ( & path) ] )
551560 . await ?;
552561
553562 // Project only column "a"
554- let exec = scan_format ( & ctx, & format, Some ( file_schema) , tmp_dir. path ( ) . to_str ( ) . unwrap ( ) , "array.json" , Some ( vec ! [ 0 ] ) , None ) . await ?;
563+ let exec = scan_format (
564+ & ctx,
565+ & format,
566+ Some ( file_schema) ,
567+ tmp_dir. path ( ) . to_str ( ) . unwrap ( ) ,
568+ "array.json" ,
569+ Some ( vec ! [ 0 ] ) ,
570+ None ,
571+ )
572+ . await ?;
555573 let batches = collect ( exec, task_ctx) . await ?;
556574
557575 assert_eq ! ( 1 , batches. len( ) ) ;
0 commit comments