HonahX commented on code in PR #678:
URL: https://github.com/apache/iceberg-python/pull/678#discussion_r1587074970


##########
tests/catalog/integration_test_dynamodb.py:
##########
@@ -262,3 +262,8 @@ def test_update_namespace_properties(test_catalog: Catalog, 
database_name: str)
         else:
             assert k in update_report.removed
     assert "updated test description" == 
test_catalog.load_namespace_properties(database_name)["comment"]
+
+    def test_table_exists(test_catalog: Catalog, table_schema_nested: Schema, 
database_name: str, table_name: str) -> None:
+        test_catalog.create_namespace(database_name)
+        test_catalog.create_table((database_name, table_name), 
table_schema_nested)
+        assert test_catalog.table_exists((database_name, table_name)) is True

Review Comment:
   ```suggestion
   def test_table_exists(test_catalog: Catalog, table_schema_nested: Schema, 
database_name: str, table_name: str) -> None:
       test_catalog.create_namespace(database_name)
       test_catalog.create_table((database_name, table_name), 
table_schema_nested)
       assert test_catalog.table_exists((database_name, table_name)) is True
   ```
   The test seems to have an extra tab in the front



##########
pyiceberg/catalog/__init__.py:
##########
@@ -661,6 +661,14 @@ def create_table_transaction(
         )
 
     def table_exists(self, identifier: Union[str, Identifier]) -> bool:
+        """Check if a table exists.
+
+        Args:
+            identifier (str | Identifier): Table identifier.
+
+        Returns:
+            bool: True if the table exists, False otherwise.
+        """

Review Comment:
   I think it can automatically inherit the docstring from the super class' 
`Catalog.table_exists`. Shall we remove these such that if anything need to be 
changed in the future, we only have to update the docstring in class `Catalog`?



-- 
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-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to