diqiu50 commented on code in PR #9460:
URL: https://github.com/apache/gravitino/pull/9460#discussion_r2612869471
##########
catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/HiveCatalogOperations.java:
##########
@@ -496,25 +336,15 @@ public boolean dropSchema(NameIdentifier ident, boolean
cascade) throws NonEmpty
try {
clientPool.run(
client -> {
- client.dropDatabase(ident.name(), false, false, cascade);
+ client.dropDatabase(catalogName, ident.name(), cascade);
return null;
});
LOG.info("Dropped Hive schema (database) {}", ident.name());
return true;
- } catch (InvalidOperationException e) {
- throw new NonEmptySchemaException(
- e, "Hive schema (database) %s is not empty. One or more tables
exist.", ident.name());
-
- } catch (NoSuchObjectException e) {
- LOG.warn("Hive schema (database) {} does not exist in Hive Metastore",
ident.name());
+ } catch (NoSuchSchemaException e) {
return false;
-
- } catch (TException e) {
- throw new RuntimeException(
- "Failed to drop Hive schema (database) " + ident.name() + " in Hive
Metastore", e);
-
- } catch (Exception e) {
+ } catch (InterruptedException e) {
Review Comment:
Other exceptions are converted to GravitinoException. They do not need to be
handled separately.
--
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]