geruh commented on code in PR #2871:
URL: https://github.com/apache/iceberg-python/pull/2871#discussion_r2667068749
##########
pyiceberg/table/update/snapshot.py:
##########
@@ -843,6 +843,13 @@ def _commit(self) -> UpdatesAndRequirements:
"""Apply the pending changes and commit."""
return self._updates, self._requirements
+ def _commit_if_ref_updates_exist(self) -> None:
+ """Commit any pending ref updates to the transaction."""
+ if self._updates:
+ self._transaction._apply(*self._commit(),
commit_transaction_if_autocommit=False)
+ self._updates = ()
+ self._requirements = ()
Review Comment:
Yeah, that makes sense! We just need to ensure that the snapshot operations
are transactional and allow subsequent chaining operations to have a consistent
state.
--
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]