File tree 1 file changed +15
-4
lines changed
datafusion/datasource/src
1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -422,7 +422,7 @@ impl From<FileScanConfig> for FileScanConfigBuilder {
422
422
Self {
423
423
object_store_url : config. object_store_url ,
424
424
file_schema : config. file_schema ,
425
- file_source : config. file_source . clone ( ) ,
425
+ file_source : Arc :: < dyn FileSource > :: clone ( & config. file_source ) ,
426
426
file_groups : config. file_groups ,
427
427
statistics : config. file_source . statistics ( ) . ok ( ) ,
428
428
output_ordering : config. output_ordering ,
@@ -2157,10 +2157,21 @@ mod tests {
2157
2157
assert ! ( config. constraints. is_empty( ) ) ;
2158
2158
2159
2159
// Verify statistics are set to unknown
2160
- assert_eq ! ( config. file_source. statistics( ) . unwrap( ) . num_rows, Precision :: Absent ) ;
2161
- assert_eq ! ( config. file_source. statistics( ) . unwrap( ) . total_byte_size, Precision :: Absent ) ;
2162
2160
assert_eq ! (
2163
- config. file_source. statistics( ) . unwrap( ) . column_statistics. len( ) ,
2161
+ config. file_source. statistics( ) . unwrap( ) . num_rows,
2162
+ Precision :: Absent
2163
+ ) ;
2164
+ assert_eq ! (
2165
+ config. file_source. statistics( ) . unwrap( ) . total_byte_size,
2166
+ Precision :: Absent
2167
+ ) ;
2168
+ assert_eq ! (
2169
+ config
2170
+ . file_source
2171
+ . statistics( )
2172
+ . unwrap( )
2173
+ . column_statistics
2174
+ . len( ) ,
2164
2175
file_schema. fields( ) . len( )
2165
2176
) ;
2166
2177
for stat in config. file_source . statistics ( ) . unwrap ( ) . column_statistics {
You can’t perform that action at this time.
0 commit comments