flyrain commented on code in PR #3693:
URL: https://github.com/apache/polaris/pull/3693#discussion_r2778090447


##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java:
##########
@@ -423,7 +423,22 @@ public boolean dropTable(TableIdentifier tableIdentifier, 
boolean purge) {
         dropTableLike(
             PolarisEntitySubType.ICEBERG_TABLE, tableIdentifier, 
storageProperties, purge);
     if (!dropEntityResult.isSuccess()) {
-      return false;
+      switch (dropEntityResult.getReturnStatus()) {
+        case BaseResult.ReturnStatus.ENTITY_NOT_FOUND:
+          return false;
+
+        case BaseResult.ReturnStatus.ENTITY_UNDROPPABLE:
+          throw new ForbiddenException(
+              "Table %s cannot be dropped: %s",
+              tableIdentifier, dropEntityResult.getExtraInformation());
+
+        default:
+          throw new ServiceFailureException(
+              "Unexpected error dropping table %s: %s. ExtraInfo: %s",

Review Comment:
   Minor: 
   ```suggestion
                 "Failed to drop table %s, status=%s, extraInfo=%s",
   ```



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

Reply via email to