You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "chinmay-bhat (via GitHub)" <gi...@apache.org> on 2024/06/16 14:25:50 UTC
[PR] Support Remove Branch or Tag APIs [iceberg-python]
chinmay-bhat opened a new pull request, #822:
URL: https://github.com/apache/iceberg-python/pull/822
Support `remove_branch`and `remove_tag` snapshot management APIs. See more [here](https://iceberg.apache.org/docs/nightly/java-api-quickstart/?h=remove+tag#removing-branches-and-tags).
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Support Remove Branch or Tag APIs [iceberg-python]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko closed pull request #822: Support Remove Branch or Tag APIs
URL: https://github.com/apache/iceberg-python/pull/822
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Support Remove Branch or Tag APIs [iceberg-python]
Posted by "chinmay-bhat (via GitHub)" <gi...@apache.org>.
chinmay-bhat commented on code in PR #822:
URL: https://github.com/apache/iceberg-python/pull/822#discussion_r1644663032
##########
pyiceberg/table/__init__.py:
##########
@@ -1978,6 +2013,21 @@ def create_tag(self, snapshot_id: int, tag_name: str, max_ref_age_ms: Optional[i
self._requirements += requirement
return self
+ def remove_tag(self, tag_name: str) -> ManageSnapshots:
+ """
+ Remove a tag.
+
+ Args:
+ tag_name (str): name of tag to remove
+
+ Returns:
+ This for method chaining
+ """
+ update, requirement = self._transaction._remove_ref_snapshot(ref_name=tag_name)
Review Comment:
add `self._commit_if_ref_updates_exist()` once it's merged into main from #758 .
##########
pyiceberg/table/__init__.py:
##########
@@ -2010,6 +2060,20 @@ def create_branch(
self._requirements += requirement
return self
+ def remove_branch(self, branch_name: str) -> ManageSnapshots:
+ """
+ Remove a branch.
+
+ Args:
+ branch_name (str): name of branch to remove
+ Returns:
+ This for method chaining
+ """
+ update, requirement = self._transaction._remove_ref_snapshot(ref_name=branch_name)
Review Comment:
add `self._commit_if_ref_updates_exist()` once it's merged into main
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org