File tree Expand file tree Collapse file tree
crates/core/src/kernel/snapshot Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -550,13 +550,11 @@ pub(crate) async fn resolve_snapshot(
550550 }
551551}
552552
553- fn read_adds_size ( array : & dyn ProvidesColumnByName ) -> DeltaResult < usize > {
554- if let Some ( arr) = ex:: extract_and_cast_opt :: < StructArray > ( array, "add" ) {
555- let size = ex:: extract_and_cast :: < Int64Array > ( arr, "size" ) ?;
556- let sum = sum_array_checked :: < arrow:: array:: types:: Int64Type , _ > ( size) ?. unwrap_or_default ( ) ;
557- Ok ( sum as usize )
553+ fn read_adds_size ( array : & dyn ProvidesColumnByName ) -> usize {
554+ if let Some ( size) = ex:: extract_and_cast_opt :: < Int64Array > ( array, "size" ) {
555+ sum_array_checked :: < arrow:: array:: types:: Int64Type , _ > ( size) . unwrap ( ) . unwrap_or_default ( ) as usize
558556 } else {
559- Ok ( 0 )
557+ 0
560558 }
561559}
562560
@@ -716,7 +714,7 @@ impl EagerSnapshot {
716714 self
717715 . files
718716 . iter ( )
719- . map ( |frb| read_adds_size ( frb) . unwrap_or_default ( ) )
717+ . map ( |frb| read_adds_size ( frb) )
720718 . sum ( )
721719 }
722720
You can’t perform that action at this time.
0 commit comments