dannycjones commented on code in PR #2589:
URL: https://github.com/apache/iceberg-rust/pull/2589#discussion_r3381130455


##########
crates/iceberg/src/spec/snapshot_summary.rs:
##########
@@ -483,27 +483,37 @@ fn update_totals(
     added_property: &str,
     removed_property: &str,
 ) {
-    let previous_total = previous_summary.map_or(0, |previous_summary| {
-        previous_summary
-            .additional_properties
-            .get(total_property)
-            .map_or(0, |value| value.parse::<u64>().unwrap())
-    });
+    let previous_total = match previous_summary {
+        Some(previous_summary) => {

Review Comment:
   My bad, I had misunderstood the original logic here. I see that we were 
panicking rather than resetting to 0.
   
   Marking as resolved since the logic has changed here in the newest commit.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to