Fokko commented on code in PR #2266:
URL: https://github.com/apache/iceberg-python/pull/2266#discussion_r2266238795
##########
pyiceberg/table/update/snapshot.py:
##########
@@ -405,7 +405,7 @@ def _compute_deletes(self) -> Tuple[List[ManifestFile],
List[ManifestEntry], boo
def _copy_with_new_status(entry: ManifestEntry, status:
ManifestEntryStatus) -> ManifestEntry:
return ManifestEntry.from_args(
status=status,
- snapshot_id=entry.snapshot_id,
+ snapshot_id=self.snapshot_id if status !=
ManifestEntryStatus.EXISTING else entry.snapshot_id,
Review Comment:
How about being more explicit here?
```suggestion
# When a file is replaced or deleted from the dataset, its
manifest entry fields store the snapshot ID in which the file was deleted and
status 2 (deleted).
snapshot_id=self.snapshot_id if status ==
ManifestEntryStatus.DELETED else entry.snapshot_id,
```
--
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]