@@ -691,7 +691,7 @@ impl FileScanConfig {
691691 }
692692
693693 pub fn projected_stats ( & self ) -> Statistics {
694- let statistics = self . file_source . file_source_statistics ( self ) . unwrap ( ) ;
694+ let statistics = self . file_source . file_source_statistics ( self ) ;
695695
696696 let table_cols_stats = self
697697 . projection_indices ( )
@@ -758,10 +758,7 @@ impl FileScanConfig {
758758 return (
759759 Arc :: clone ( & self . file_schema ) ,
760760 self . constraints . clone ( ) ,
761- self . file_source
762- . file_source_statistics ( self )
763- . unwrap ( )
764- . clone ( ) ,
761+ self . file_source . file_source_statistics ( self ) . clone ( ) ,
765762 self . output_ordering . clone ( ) ,
766763 ) ;
767764 }
@@ -993,7 +990,7 @@ impl Debug for FileScanConfig {
993990 write ! (
994991 f,
995992 "statistics={:?}, " ,
996- self . file_source. file_source_statistics( self ) . unwrap ( )
993+ self . file_source. file_source_statistics( self )
997994 ) ?;
998995
999996 DisplayAs :: fmt_as ( self , DisplayFormatType :: Verbose , f) ?;
@@ -1584,7 +1581,7 @@ mod tests {
15841581 to_partition_cols ( partition_cols. clone ( ) ) ,
15851582 ) ;
15861583
1587- let source_statistics = conf. file_source . file_source_statistics ( & conf) . unwrap ( ) ;
1584+ let source_statistics = conf. file_source . file_source_statistics ( & conf) ;
15881585 let conf_stats = conf. data_source_statistics ( ) . unwrap ( ) ;
15891586
15901587 // projection should be reflected in the file source statistics
@@ -2218,34 +2215,27 @@ mod tests {
22182215
22192216 // Verify statistics are set to unknown
22202217 assert_eq ! (
2221- config
2222- . file_source
2223- . file_source_statistics( & config)
2224- . unwrap( )
2225- . num_rows,
2218+ config. file_source. file_source_statistics( & config) . num_rows,
22262219 Precision :: Absent
22272220 ) ;
22282221 assert_eq ! (
22292222 config
22302223 . file_source
22312224 . file_source_statistics( & config)
2232- . unwrap( )
22332225 . total_byte_size,
22342226 Precision :: Absent
22352227 ) ;
22362228 assert_eq ! (
22372229 config
22382230 . file_source
22392231 . file_source_statistics( & config)
2240- . unwrap( )
22412232 . column_statistics
22422233 . len( ) ,
22432234 file_schema. fields( ) . len( )
22442235 ) ;
22452236 for stat in config
22462237 . file_source
22472238 . file_source_statistics ( & config)
2248- . unwrap ( )
22492239 . column_statistics
22502240 {
22512241 assert_eq ! ( stat. distinct_count, Precision :: Absent ) ;
0 commit comments