dentiny commented on code in PR #1301: URL: https://github.com/apache/iceberg-rust/pull/1301#discussion_r2082760864
########## crates/iceberg/src/transaction/snapshot.rs: ########## @@ -172,6 +179,13 @@ impl<'a> SnapshotProduceAction<'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::Unexpected, Review Comment: Sounds good! I have removed change against input argument, and use `FailedPrecondition` as the error kind for empty data entry. The error name is borrowed from grpc status code: https://grpc.io/docs/guides/status-codes/#the-full-list-of-status-codes -- 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