rambleraptor commented on code in PR #2149:
URL: https://github.com/apache/iceberg-python/pull/2149#discussion_r2411544159


##########
pyiceberg/catalog/rest/__init__.py:
##########
@@ -877,6 +879,18 @@ def drop_view(self, identifier: Union[str]) -> None:
         except HTTPError as exc:
             _handle_non_200_response(exc, {404: NoSuchViewError})
 
+    @retry(**_RETRY_ARGS)
+    def rename_view(self, from_identifier: Union[str, Identifier], 
to_identifier: Union[str, Identifier]) -> None:
+        payload = {
+            "source": self._split_identifier_for_json(from_identifier),
+            "destination": self._split_identifier_for_json(to_identifier),
+        }
+        response = self._session.post(self.url(Endpoints.rename_view), 
json=payload)
+        try:
+            response.raise_for_status()
+        except HTTPError as exc:
+            _handle_non_200_response(exc, {404: NoSuchViewError, 409: 
ViewAlreadyExistsError})

Review Comment:
   I've also fixed this on this PR for `rename_view`.



-- 
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]

Reply via email to