@@ -738,33 +738,23 @@ fn roundtrip_parquet_exec_with_pruning_predicate() -> Result<()> {
738738 let mut options = TableParquetOptions :: new ( ) ;
739739 options. global . pushdown_filters = true ;
740740
741- let source = Arc :: new (
741+ let file_source = Arc :: new (
742742 ParquetSource :: new ( options) . with_predicate ( Arc :: clone ( & file_schema) , predicate) ,
743743 ) ;
744744
745- let scan_config = FileScanConfig {
746- object_store_url : ObjectStoreUrl :: local_filesystem ( ) ,
747- file_schema,
748- file_groups : vec ! [ vec![ PartitionedFile :: new(
749- "/path/to/file.parquet" . to_string( ) ,
750- 1024 ,
751- ) ] ] ,
752- constraints : Constraints :: empty ( ) ,
753- statistics : Statistics {
754- num_rows : Precision :: Inexact ( 100 ) ,
755- total_byte_size : Precision :: Inexact ( 1024 ) ,
756- column_statistics : Statistics :: unknown_column ( & Arc :: new ( Schema :: new ( vec ! [
757- Field :: new( "col" , DataType :: Utf8 , false ) ,
758- ] ) ) ) ,
759- } ,
760- projection : None ,
761- limit : None ,
762- table_partition_cols : vec ! [ ] ,
763- output_ordering : vec ! [ ] ,
764- file_compression_type : FileCompressionType :: UNCOMPRESSED ,
765- new_lines_in_values : false ,
766- file_source : source,
767- } ;
745+ let scan_config =
746+ FileScanConfig :: new ( ObjectStoreUrl :: local_filesystem ( ) , file_schema, file_source)
747+ . with_file_groups ( vec ! [ vec![ PartitionedFile :: new(
748+ "/path/to/file.parquet" . to_string( ) ,
749+ 1024 ,
750+ ) ] ] )
751+ . with_statistics ( Statistics {
752+ num_rows : Precision :: Inexact ( 100 ) ,
753+ total_byte_size : Precision :: Inexact ( 1024 ) ,
754+ column_statistics : Statistics :: unknown_column ( & Arc :: new ( Schema :: new (
755+ vec ! [ Field :: new( "col" , DataType :: Utf8 , false ) ] ,
756+ ) ) ) ,
757+ } ) ;
768758
769759 roundtrip_test ( scan_config. build ( ) )
770760}
@@ -777,9 +767,9 @@ async fn roundtrip_parquet_exec_with_table_partition_cols() -> Result<()> {
777767 vec ! [ wrap_partition_value_in_dict( ScalarValue :: Int64 ( Some ( 0 ) ) ) ] ;
778768 let schema = Arc :: new ( Schema :: new ( vec ! [ Field :: new( "col" , DataType :: Utf8 , false ) ] ) ) ;
779769
780- let source = Arc :: new ( ParquetSource :: default ( ) ) ;
770+ let file_source = Arc :: new ( ParquetSource :: default ( ) ) ;
781771 let scan_config =
782- FileScanConfig :: new ( ObjectStoreUrl :: local_filesystem ( ) , schema, source )
772+ FileScanConfig :: new ( ObjectStoreUrl :: local_filesystem ( ) , schema, file_source )
783773 . with_projection ( Some ( vec ! [ 0 , 1 ] ) )
784774 . with_file_group ( vec ! [ file_group] )
785775 . with_table_partition_cols ( vec ! [ Field :: new(
@@ -801,34 +791,24 @@ fn roundtrip_parquet_exec_with_custom_predicate_expr() -> Result<()> {
801791 inner : Arc :: new ( Column :: new ( "col" , 1 ) ) ,
802792 } ) ;
803793
804- let source = Arc :: new (
794+ let file_source = Arc :: new (
805795 ParquetSource :: default ( )
806796 . with_predicate ( Arc :: clone ( & file_schema) , custom_predicate_expr) ,
807797 ) ;
808798
809- let scan_config = FileScanConfig {
810- object_store_url : ObjectStoreUrl :: local_filesystem ( ) ,
811- file_schema,
812- file_groups : vec ! [ vec![ PartitionedFile :: new(
813- "/path/to/file.parquet" . to_string( ) ,
814- 1024 ,
815- ) ] ] ,
816- constraints : Constraints :: empty ( ) ,
817- statistics : Statistics {
818- num_rows : Precision :: Inexact ( 100 ) ,
819- total_byte_size : Precision :: Inexact ( 1024 ) ,
820- column_statistics : Statistics :: unknown_column ( & Arc :: new ( Schema :: new ( vec ! [
821- Field :: new( "col" , DataType :: Utf8 , false ) ,
822- ] ) ) ) ,
823- } ,
824- projection : None ,
825- limit : None ,
826- table_partition_cols : vec ! [ ] ,
827- output_ordering : vec ! [ ] ,
828- file_compression_type : FileCompressionType :: UNCOMPRESSED ,
829- new_lines_in_values : false ,
830- file_source : source,
831- } ;
799+ let scan_config =
800+ FileScanConfig :: new ( ObjectStoreUrl :: local_filesystem ( ) , file_schema, file_source)
801+ . with_file_groups ( vec ! [ vec![ PartitionedFile :: new(
802+ "/path/to/file.parquet" . to_string( ) ,
803+ 1024 ,
804+ ) ] ] )
805+ . with_statistics ( Statistics {
806+ num_rows : Precision :: Inexact ( 100 ) ,
807+ total_byte_size : Precision :: Inexact ( 1024 ) ,
808+ column_statistics : Statistics :: unknown_column ( & Arc :: new ( Schema :: new (
809+ vec ! [ Field :: new( "col" , DataType :: Utf8 , false ) ] ,
810+ ) ) ) ,
811+ } ) ;
832812
833813 #[ derive( Debug , Clone , Eq ) ]
834814 struct CustomPredicateExpr {
0 commit comments