HonahX commented on code in PR #728:
URL: https://github.com/apache/iceberg-python/pull/728#discussion_r1621822758


##########
pyiceberg/table/__init__.py:
##########
@@ -277,6 +279,50 @@ def __init__(self, table: Table, autocommit: bool = False):
         self._autocommit = autocommit
         self._updates = ()
         self._requirements = ()
+        self._manage_snapshots = Transaction.ManageSnapshot(self)
+
+    class ManageSnapshot:

Review Comment:
   Thanks for the update! 
   
   > So no updates or requirements are added to ManageSnapshots and 
ManageSnapshots.commit() doesn't update the table
   
   Yeah, I think that will still be a reasonable implementation. Just one thing 
to note: in `cherrypick` operation we need to commit any pending snapshot ref 
updates before cherrypick. For example:
   ```python
   class ManageSnapshots:
     def cherrypick(self, snapshot_id: int) -> ManageSnapshots:
         self.commit()
         CherryPickSnapshot(snapshot_id, .....).cherrypick()
         return self
   ```
   We could also add other helper `UpdateTableMetadata` implementation if 
needed and make them private.
   



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to