dannycjones opened a new issue, #2576: URL: https://github.com/apache/iceberg-rust/issues/2576
### Apache Iceberg Rust version None ### Describe the bug When calculating totals, we initialize the previous as 0 if not set. Given these summaries are optional, we may incorrectly calculate the totals where files exist but don't have total summaries set. https://github.com/apache/iceberg-rust/blob/130ea0fc539f755ada9d49e4ac54c40a56a95b22/crates/iceberg/src/spec/snapshot_summary.rs#L486-L491 ### To Reproduce _No response_ ### Expected behavior I expect that we should skip calculating the totals when we do not have a previous value to reference. This does mean some other process would need to calculate the totals outside of this commit in order to introduce totals to the snapshot summaries. ### Willingness to contribute I can contribute a fix for this bug independently -- 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]
