@@ -741,22 +741,22 @@ fn roundtrip_parquet_exec_with_pruning_predicate() -> Result<()> {
741
741
let source = Arc :: new (
742
742
ParquetSource :: new ( options) . with_predicate ( Arc :: clone ( & file_schema) , predicate) ,
743
743
) ;
744
+ let statistics = Statistics {
745
+ num_rows : Precision :: Inexact ( 100 ) ,
746
+ total_byte_size : Precision :: Inexact ( 1024 ) ,
747
+ column_statistics : Statistics :: unknown_column ( & Arc :: new ( Schema :: new ( vec ! [
748
+ Field :: new( "col" , DataType :: Utf8 , false ) ,
749
+ ] ) ) ) ,
750
+ } ;
744
751
745
- let scan_config = FileScanConfig {
752
+ let mut scan_config = FileScanConfig {
746
753
object_store_url : ObjectStoreUrl :: local_filesystem ( ) ,
747
754
file_schema,
748
755
file_groups : vec ! [ vec![ PartitionedFile :: new(
749
756
"/path/to/file.parquet" . to_string( ) ,
750
757
1024 ,
751
758
) ] ] ,
752
759
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
760
projection : None ,
761
761
limit : None ,
762
762
table_partition_cols : vec ! [ ] ,
@@ -765,6 +765,7 @@ fn roundtrip_parquet_exec_with_pruning_predicate() -> Result<()> {
765
765
new_lines_in_values : false ,
766
766
file_source : source,
767
767
} ;
768
+ scan_config = scan_config. with_statistics ( statistics) ;
768
769
769
770
roundtrip_test ( scan_config. build ( ) )
770
771
}
@@ -806,21 +807,23 @@ fn roundtrip_parquet_exec_with_custom_predicate_expr() -> Result<()> {
806
807
. with_predicate ( Arc :: clone ( & file_schema) , custom_predicate_expr) ,
807
808
) ;
808
809
809
- let scan_config = FileScanConfig {
810
+ let statistics = Statistics {
811
+ num_rows : Precision :: Inexact ( 100 ) ,
812
+ total_byte_size : Precision :: Inexact ( 1024 ) ,
813
+ column_statistics : Statistics :: unknown_column ( & Arc :: new ( Schema :: new ( vec ! [
814
+ Field :: new( "col" , DataType :: Utf8 , false ) ,
815
+ ] ) ) ) ,
816
+ } ;
817
+
818
+ let mut scan_config = FileScanConfig {
810
819
object_store_url : ObjectStoreUrl :: local_filesystem ( ) ,
811
820
file_schema,
812
821
file_groups : vec ! [ vec![ PartitionedFile :: new(
813
822
"/path/to/file.parquet" . to_string( ) ,
814
823
1024 ,
815
824
) ] ] ,
816
825
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
- } ,
826
+
824
827
projection : None ,
825
828
limit : None ,
826
829
table_partition_cols : vec ! [ ] ,
@@ -829,6 +832,7 @@ fn roundtrip_parquet_exec_with_custom_predicate_expr() -> Result<()> {
829
832
new_lines_in_values : false ,
830
833
file_source : source,
831
834
} ;
835
+ scan_config = scan_config. with_statistics ( statistics) ;
832
836
833
837
#[ derive( Debug , Clone , Eq ) ]
834
838
struct CustomPredicateExpr {
@@ -1616,7 +1620,6 @@ async fn roundtrip_projection_source() -> Result<()> {
1616
1620
1024 ,
1617
1621
) ] ] ,
1618
1622
constraints : Constraints :: empty ( ) ,
1619
- statistics,
1620
1623
file_schema : schema. clone ( ) ,
1621
1624
projection : Some ( vec ! [ 0 , 1 , 2 ] ) ,
1622
1625
limit : None ,
0 commit comments