tengqm commented on code in PR #5761:
URL: https://github.com/apache/gravitino/pull/5761#discussion_r1872625636


##########
core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java:
##########
@@ -677,11 +678,42 @@ public boolean dropCatalog(NameIdentifier ident, boolean 
force)
     } catch (NoSuchMetalakeException | NoSuchCatalogException ignored) {
       return false;
 
-    } catch (IOException e) {
+    } catch (GravitinoRuntimeException e) {
+      throw e;
+
+    } catch (Exception e) {
       throw new RuntimeException(e);
     }
   }
 
+  private boolean haveAvailableSchemas(
+      List<SchemaEntity> schemaEntities, CatalogEntity catalogEntity, 
CatalogWrapper catalogWrapper)
+      throws Exception {
+    if (schemaEntities.isEmpty()) {
+      return false;
+    }
+
+    if (schemaEntities.size() == 1 && 
catalogEntity.getProvider().equals("kafka")) {

Review Comment:
   so ... do we have that 'default' schema recorded as we do for other catalogs?
   We can remove this `if ()` condition if so.
   In theory, the `default` schema is still a schema. Returning `false` is not 
a good idea. And this shortcut complicates the code.
   
   I was striving to reduce hard-coded specializations in the code.



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