feat(iceberg): Enable delete files processing in snapshot producer#2367
feat(iceberg): Enable delete files processing in snapshot producer#2367CTTY wants to merge 6 commits into
Conversation
xanderbailey
left a comment
There was a problem hiding this comment.
Nice PR! Took a pass at reviewing, let me know if it makes sense!
| let snapshot_producer = SnapshotProducer::new( | ||
| table, | ||
| self.commit_uuid.unwrap_or_else(Uuid::now_v7), | ||
| self.key_metadata.clone(), | ||
| self.snapshot_properties.clone(), | ||
| self.added_data_files.clone(), | ||
| ); | ||
| let snapshot_producer = SnapshotProducer::builder() | ||
| .with_table(table) | ||
| .with_commit_uuid(self.commit_uuid.unwrap_or_else(Uuid::now_v7)) | ||
| .with_key_metadata(self.key_metadata.clone()) | ||
| .with_snapshot_properties(self.snapshot_properties.clone()) | ||
| .with_added_data_files(self.added_data_files.clone()) | ||
| .build(); | ||
|
|
| async fn manifest_file<OP: SnapshotProduceOperation, MP: ManifestProcess>( | ||
| &mut self, | ||
| snapshot_produce_operation: &OP, | ||
| manifest_process: &MP, | ||
| ) -> Result<Vec<ManifestFile>> { |
There was a problem hiding this comment.
Should we rename this trait function?
It was unclear to me what it was doing, and may be lingering with an old name from when we only had simple appends.
Ultimately, it is building a list of manifest files that will be part of the new snapshot / manifest list. Perhaps build_manifest_file_list?
There was a problem hiding this comment.
I think this makes sense, but maybe we should tackle this in a separate PR
| #[cfg(test)] | ||
| mod tests { |
There was a problem hiding this comment.
Would it be useful to have a follow-up to provide simple coverage of other manifest changes? i.e. added data files.
I'm happy to own this.
There was a problem hiding this comment.
I think added data files are tested via integration tests. But I'm not opposed to adding more unit tests :D
a82836d to
d1ef3c2
Compare
Which issue does this PR close?
What changes are included in this PR?
Are these changes tested?
Added uts in snapshot.rs, we should add end-to-end tests when actual rewrite/delete actions are supported