jayceslesar commented on code in PR #2172:
URL: https://github.com/apache/iceberg-python/pull/2172#discussion_r2586048413
##########
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:
yeah this makes sense, was thinking could consolidate logic across catalogs
but not sure if that makes sense given the implementation differences
--
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]