travis-bowen commented on code in PR #3693:
URL: https://github.com/apache/polaris/pull/3693#discussion_r2784170500
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java:
##########
@@ -648,12 +663,23 @@ public boolean dropNamespace(Namespace namespace) throws
NamespaceNotEmptyExcept
Map.of(),
realmConfig.getConfig(FeatureConfiguration.CLEANUP_ON_NAMESPACE_DROP));
- if (!dropEntityResult.isSuccess() &&
dropEntityResult.failedBecauseNotEmpty()) {
- throw new NamespaceNotEmptyException("Namespace %s is not empty",
namespace);
+ if (!dropEntityResult.isSuccess()) {
+ switch (dropEntityResult.getReturnStatus()) {
+ case BaseResult.ReturnStatus.NAMESPACE_NOT_EMPTY:
+ case BaseResult.ReturnStatus.CATALOG_NOT_EMPTY:
Review Comment:
So I also think it feels weird, but it is what the existing method uses, so
I kept it to minimize logic changes.
https://github.com/apache/polaris/blob/7de070d59008afa6d369268cec88f27d555ead7b/polaris-core/src/main/java/org/apache/polaris/core/persistence/dao/entity/DropEntityResult.java#L76
--
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]