Fokko commented on code in PR #1772:
URL: https://github.com/apache/iceberg-python/pull/1772#discussion_r2050541351
##########
pyiceberg/table/update/snapshot.py:
##########
@@ -279,6 +296,30 @@ def _commit(self) -> UpdatesAndRequirements:
(AssertRefSnapshotId(snapshot_id=self._transaction.table_metadata.current_snapshot_id,
ref="main"),),
)
+ def _validate(self, starting_snapshot: Snapshot, current_snapshot:
Snapshot) -> None:
+ # Define allowed operations for each type of operation
+ allowed_operations = {
+ Operation.APPEND: {Operation.APPEND, Operation.REPLACE,
Operation.OVERWRITE, Operation.DELETE},
+ Operation.REPLACE: {Operation.APPEND},
Review Comment:
Thanks @sungwy for jumping in here, and creating the issues 🙌
Indeed, depending on whether we do snapshot or serializable isolation, we
should allow for new data (or not). Would you be willing to split out the
different levels in a separate PR? It would be nice to get this in so we can
start working independently on the subtasks that you created.
I think this one was mostly blocked on
https://github.com/apache/iceberg-python/pull/1903
--
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]