jayceslesar commented on code in PR #2172:
URL: https://github.com/apache/iceberg-python/pull/2172#discussion_r2363946690


##########
pyiceberg/catalog/sql.py:
##########
@@ -572,8 +572,8 @@ def drop_namespace(self, namespace: Union[str, Identifier]) 
-> None:
             raise NoSuchNamespaceError(f"Namespace does not exist: 
{namespace}")
 
         namespace_str = Catalog.namespace_to_string(namespace)
-        if tables := self.list_tables(namespace):
-            raise NamespaceNotEmptyError(f"Namespace {namespace_str} is not 
empty. {len(tables)} tables exist.")
+        if tables := list(self.list_tables(namespace)):
+            raise NamespaceNotEmptyError(f"Namespace {namespace_str} is not 
empty. {len(list(tables))} tables exist.")

Review Comment:
   good catch



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