abnobdoss commented on code in PR #2149:
URL: https://github.com/apache/iceberg-python/pull/2149#discussion_r3338254388
##########
pyiceberg/catalog/__init__.py:
##########
@@ -744,6 +744,19 @@ def create_view(
ViewAlreadyExistsError: If a view with the name already exists.
"""
+ @abstractmethod
+ def rename_view(self, from_identifier: str | Identifier, to_identifier:
str | Identifier) -> None:
+ """Rename a fully classified view name.
Review Comment:
minor: fully qualified instead of fully classified?
##########
pyiceberg/catalog/sql.py:
##########
@@ -784,3 +784,6 @@ def close(self) -> None:
"""
if hasattr(self, "engine"):
self.engine.dispose()
+
+ def rename_view(self, from_identifier: str | Identifier, to_identifier:
str | Identifier) -> None:
Review Comment:
Is this missing the override decorator?
##########
pyiceberg/catalog/rest/__init__.py:
##########
@@ -1471,6 +1474,29 @@ def drop_view(self, identifier: str | Identifier) ->
None:
except HTTPError as exc:
_handle_non_200_response(exc, {404: NoSuchViewError})
+ @retry(**_RETRY_ARGS)
+ def rename_view(self, from_identifier: str | Identifier, to_identifier:
str | Identifier) -> None:
Review Comment:
Is this missing an override decorator?
##########
tests/integration/test_catalog.py:
##########
@@ -669,6 +669,25 @@ def test_rest_drop_view(
assert not rest_catalog.view_exists(identifier)
[email protected]
+def test_rest_rename_view(
Review Comment:
Would it be possible to also include a cross namespace rename test for
completeness?
##########
pyiceberg/catalog/bigquery_metastore.py:
##########
@@ -334,6 +334,9 @@ def load_view(self, identifier: str | Identifier) -> View:
raise NotImplementedError
@override
+ def rename_view(self, from_identifier: str | Identifier, to_identifier:
str | Identifier) -> None:
Review Comment:
It seems the override decorator for `load_namespace_properties` was
accidentally lost?
--
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]