mchades commented on code in PR #11362:
URL: https://github.com/apache/gravitino/pull/11362#discussion_r3348161679


##########
core/src/main/java/org/apache/gravitino/catalog/TableOperationDispatcher.java:
##########
@@ -420,6 +432,17 @@ public boolean purgeTable(NameIdentifier ident) throws 
UnsupportedOperationExcep
           } catch (Exception e) {
             throw new RuntimeException(e);
           }
+          if (droppedFromCatalog) {
+            SchemaEntityCleaner.deleteOrphanedSchemaEntities(
+                store,
+                schemaIdentifier,
+                true,
+                schemaIdent ->
+                    doWithCatalog(
+                        catalogIdent,
+                        c -> c.doWithSchemaOps(s -> 
s.schemaExists(schemaIdent)),
+                        RuntimeException.class));

Review Comment:
   Can we retrieve the results in a single call to `listSchemas` to avoid 
multiple invocations of the underlying catalog?



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