You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Which issue does this PR close?
- Closes #. There was no open issue for this. I noticed this while
trying out iceberg-rust.
## What changes are included in this PR?
The first line in the method `SnapshotProducer::write_added_manifest`
(`let added_data_files = std::mem::take(&mut self.added_data_files);`)
sets the `self.added_data_files` to an empty vec.
`SnapshotProducer::write_added_manifest` is called via the call chain
`SnapshotProducer::commit` -> `SnapshotProducer::manifest_file` ->
`SnapshotProducer::write_added_manifest`). Hence, if
`SnapshotProducer::summary` is called after calling
`SnapshotProducer::manifest_file`, the summary produced was empty due to
empty `self.added_data_files`.
This PR rearranges the code in `SnapshotProducer::commit` to make sure
the produced summary is not empty.
## Are these changes tested?
No new tests have been added for this as there were no previous tests.
0 commit comments