dentiny commented on code in PR #1534: URL: https://github.com/apache/iceberg-rust/pull/1534#discussion_r2225158688
########## crates/iceberg/src/transaction/snapshot.rs: ########## @@ -251,12 +251,7 @@ impl<'a> SnapshotProducer<'a> { // Write manifest file for added data files and return the ManifestFile for ManifestList. async fn write_added_manifest(&mut self) -> Result<ManifestFile> { let added_data_files = std::mem::take(&mut self.added_data_files); - if added_data_files.is_empty() { - return Err(Error::new( - ErrorKind::PreconditionFailed, - "No added data files found when write a manifest file", - )); - } + assert!(!added_data_files.is_empty()); Review Comment: sure, I updated to error status returned; I was using assertion initially because `added_data_files` has been checked at caller side and I think it's a sanity check. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org