ZENOTME commented on code in PR #738:
URL: https://github.com/apache/iceberg-rust/pull/738#discussion_r1868871965
##########
crates/iceberg/src/spec/manifest.rs:
##########
@@ -203,12 +206,80 @@ impl ManifestWriter {
partition_summary
}
- /// Write a manifest.
- pub async fn write(mut self, manifest: Manifest) -> Result<ManifestFile> {
+ /// Add a new manifest entry.
+ pub fn add(&mut self, mut entry: ManifestEntry) -> Result<()> {
Review Comment:
I think the reason here use ManifesEntry is that in some case we will add
entry from other Manifest. In this case, there are some info we need from
original ManifsetEntry. E.g. when we add the delete manifest entry, we change
the snapshot id and keep the original sequence number.
```
/// Add a delete manifest entry.
pub fn delete(&mut self, mut entry: ManifestEntry) -> Result<()> {
entry.status = ManifestStatus::Deleted;
entry.snapshot_id = Some(self.snapshot_id);
self.add_entry(entry)?;
Ok(())
}
```
--
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]