You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "amogh-jahagirdar (via GitHub)" <gi...@apache.org> on 2023/09/01 17:22:52 UTC
[GitHub] [iceberg] amogh-jahagirdar commented on a diff in pull request #8465: Python: Add register table
amogh-jahagirdar commented on code in PR #8465:
URL: https://github.com/apache/iceberg/pull/8465#discussion_r1313311142
##########
python/pyiceberg/catalog/__init__.py:
##########
@@ -314,6 +314,21 @@ def load_table(self, identifier: Union[str, Identifier]) -> Table:
NoSuchTableError: If a table with the name does not exist.
"""
+ @abstractmethod
+ def register_table(self, identifier: Union[str, Identifier], metadata_location: str) -> Table:
+ """Register a new table using exiting metadata.
Review Comment:
Nit Typo: Exiting -> Existing
##########
python/pyiceberg/catalog/glue.py:
##########
@@ -225,6 +225,21 @@ def create_table(
return self.load_table(identifier=identifier)
+ def register_table(self, identifier: Union[str, Identifier], metadata_location: str) -> Table:
+ """Register a new table using exiting metadata.
Review Comment:
same typo as above: Exiting->Existing
##########
python/tests/catalog/test_rest.py:
##########
@@ -677,6 +677,120 @@ def test_create_table_409(rest_mock: Mocker, table_schema_simple: Schema) -> Non
assert "Table already exists" in str(e.value)
+def test_register_table_200(rest_mock: Mocker, table_schema_simple: Schema) -> None:
Review Comment:
Test for the unhappy case? (409 in case the table already exists at the time of registration)
--
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