public boolean dropNamespace(String[] namespace, boolean cascade)
      throws NoSuchNamespaceException {
    String database = namespaceToDatabase(namespace);
    if (!unifiedCatalog.databaseExists(database)) {
      throw new NoSuchNamespaceException(namespace);
    }
    List<TableIDWithFormat> tables = unifiedCatalog.listTables(database);
    if (!tables.isEmpty() && !cascade) {
      throw new IllegalStateException("Namespace '" + database + "' is non empty.");
    }

    for (TableIDWithFormat id : tables) {
      unifiedCatalog.dropTable(database, id.getIdentifier().getTableName(), true);
    }
    unifiedCatalog.dropDatabase(database);
    return !unifiedCatalog.databaseExists(database);
  }
Unified catalog implement for spark engine.
amoro-format-mixed/amoro-mixed-spark/amoro-mixed-spark-3-common/src/main/java/org/apache/amoro/spark/SparkUnifiedCatalogBase.java