@Override
    public void dropDatabase(String name, boolean ignoreIfNotExists, boolean cascade)
            throws DatabaseNotExistException, DatabaseNotEmptyException, CatalogException {
        if (asNamespaceCatalog != null) {
            try {
                boolean success = asNamespaceCatalog.dropNamespace(appendLevel(baseNamespace, 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);
            }
        }
    }
Append a new level to the base namespace
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/FlinkCatalog.java