@@ -691,7 +691,7 @@ impl FileScanConfig {
691
691
}
692
692
693
693
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 ) ;
695
695
696
696
let table_cols_stats = self
697
697
. projection_indices ( )
@@ -758,10 +758,7 @@ impl FileScanConfig {
758
758
return (
759
759
Arc :: clone ( & self . file_schema ) ,
760
760
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 ( ) ,
765
762
self . output_ordering . clone ( ) ,
766
763
) ;
767
764
}
@@ -993,7 +990,7 @@ impl Debug for FileScanConfig {
993
990
write ! (
994
991
f,
995
992
"statistics={:?}, " ,
996
- self . file_source. file_source_statistics( self ) . unwrap ( )
993
+ self . file_source. file_source_statistics( self )
997
994
) ?;
998
995
999
996
DisplayAs :: fmt_as ( self , DisplayFormatType :: Verbose , f) ?;
@@ -1584,7 +1581,7 @@ mod tests {
1584
1581
to_partition_cols ( partition_cols. clone ( ) ) ,
1585
1582
) ;
1586
1583
1587
- let source_statistics = conf. file_source . file_source_statistics ( & conf) . unwrap ( ) ;
1584
+ let source_statistics = conf. file_source . file_source_statistics ( & conf) ;
1588
1585
let conf_stats = conf. data_source_statistics ( ) . unwrap ( ) ;
1589
1586
1590
1587
// projection should be reflected in the file source statistics
@@ -2218,34 +2215,27 @@ mod tests {
2218
2215
2219
2216
// Verify statistics are set to unknown
2220
2217
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,
2226
2219
Precision :: Absent
2227
2220
) ;
2228
2221
assert_eq ! (
2229
2222
config
2230
2223
. file_source
2231
2224
. file_source_statistics( & config)
2232
- . unwrap( )
2233
2225
. total_byte_size,
2234
2226
Precision :: Absent
2235
2227
) ;
2236
2228
assert_eq ! (
2237
2229
config
2238
2230
. file_source
2239
2231
. file_source_statistics( & config)
2240
- . unwrap( )
2241
2232
. column_statistics
2242
2233
. len( ) ,
2243
2234
file_schema. fields( ) . len( )
2244
2235
) ;
2245
2236
for stat in config
2246
2237
. file_source
2247
2238
. file_source_statistics ( & config)
2248
- . unwrap ( )
2249
2239
. column_statistics
2250
2240
{
2251
2241
assert_eq ! ( stat. distinct_count, Precision :: Absent ) ;
0 commit comments