jerqi commented on code in PR #6978:
URL: https://github.com/apache/gravitino/pull/6978#discussion_r2055315163


##########
core/src/main/java/org/apache/gravitino/catalog/SchemaOperationDispatcher.java:
##########
@@ -336,6 +337,15 @@ public boolean dropSchema(NameIdentifier ident, boolean 
cascade) throws NonEmpty
             store.delete(ident, SCHEMA, cascade);
           } catch (NoSuchEntityException e) {
             LOG.warn("The schema to be dropped does not exist in the store: 
{}", ident, e);
+          } catch (NonEmptyEntityException e) {
+            LOG.warn("The schema to be dropped does not empty in the store: 
{}", ident, e);
+            // then cascade delete the schema, otherwise, the schema will 
never be deleted.
+            try {
+              store.delete(ident, SCHEMA, true);

Review Comment:
   OK, I got it. So it looks good to me.



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