private void createDatabase(
            String databaseName, Map<String, String> metadata, boolean ignoreIfExists)
            throws DatabaseAlreadyExistException, CatalogException {
        if (asNamespaceCatalog != null) {
            try {
                asNamespaceCatalog.createNamespace(appendLevel(baseNamespace, databaseName), metadata);
            } catch (AlreadyExistsException e) {
                if (!ignoreIfExists) {
                    throw new DatabaseAlreadyExistException(getName(), databaseName, e);
                }
            }
        } else {
            throw new UnsupportedOperationException(
                    "Namespaces are not supported by catalog: " + getName());
        }
    }
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