@Override
    public void dropDatabase(String name, boolean ignoreIfNotExists, boolean cascade)
            throws DatabaseNotExistException, DatabaseNotEmptyException, CatalogException {
        if (asNamespaceCatalog != null) {
            try {
                boolean success = asNamespaceCatalog.dropNamespace(toNamespace(name));
                if (!success && !ignoreIfNotExists) {
                    throw new DatabaseNotExistException(getName(), name);
                }
            } catch (NoSuchNamespaceException e) {
                if (!ignoreIfNotExists) {
                    throw new DatabaseNotExistException(getName(), name, e);
                }
            } catch (NamespaceNotEmptyException e) {
                throw new DatabaseNotEmptyException(getName(), name, e);
            }
        } else {
            if (!ignoreIfNotExists) {
                throw new DatabaseNotExistException(getName(), name);
            }
        }
    }
A Flink Catalog implementation that wraps an Iceberg {@link Catalog}.
<p>
The mapping between Flink database and Iceberg namespace:
Supplying a base namespace for a given catalog, so if you have a catalog that supports a 2-level namespace, you
would supply the first level in the catalog configuration and the second level would be exposed as Flink databases.
</p>
The Iceberg table manages its partitions by itself. The partition of the Iceberg table is independent of the
partition of Flink.

Copy from iceberg-flink:iceberg-flink-1.13:0.13.2
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/FlinkCatalog.java