CTTY commented on code in PR #2367:
URL: https://github.com/apache/iceberg-rust/pull/2367#discussion_r3307507162


##########
crates/iceberg/src/transaction/snapshot.rs:
##########
@@ -289,9 +295,16 @@ 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() {
+    async fn write_added_manifest(
+        &mut self,
+        content_type: ManifestContentType,
+    ) -> Result<ManifestFile> {
+        let added_files = match content_type {
+            ManifestContentType::Data => std::mem::take(&mut 
self.added_data_files),
+            ManifestContentType::Deletes => std::mem::take(&mut 
self.added_delete_files),
+        };
+
+        if added_files.is_empty() {
             return Err(Error::new(
                 ErrorKind::PreconditionFailed,
                 "No added data files found when write an added manifest file",

Review Comment:
   changed this to `No added files`



-- 
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