prestodb/presto · error · PrestoException

NOT_SUPPORTED

NOT_SUPPORTED

Error message

Iceberg catalog of type  does not support namespace operations

What it means

Thrown by IcebergNativeCatalogFactory.getNamespaces when the underlying Iceberg catalog instance does not implement the SupportsNamespaces interface. Only certain catalog types (e.g. JDBC, Hive-metastore-like, REST) support namespace (schema/database) operations; others (e.g. Hadoop-based or memory catalogs) do not, so namespace APIs are unavailable.

Source

Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergNativeCatalogFactory.java:109

        catch (ExecutionException | UncheckedExecutionException e) {
            throwIfInstanceOf(e.getCause(), PrestoException.class);
            throwIfUnchecked(e);
            throw new UncheckedExecutionException(e);
        }
    }

    public String getCatalogWarehouseDataDir()
    {
        return this.catalogWarehouseDataDir;
    }

    public SupportsNamespaces getNamespaces(ConnectorSession session)
    {
        Catalog catalog = getCatalog(session);
        if (catalog instanceof SupportsNamespaces) {
            return (SupportsNamespaces) catalog;
        }
        throw new PrestoException(NOT_SUPPORTED, "Iceberg catalog of type " + catalogType + " does not support namespace operations");
    }

    public boolean isNestedNamespaceEnabled()
    {
        return false;
    }

    protected String getCacheKey(ConnectorSession session)
    {
        StringBuilder sb = new StringBuilder();
        sb.append(catalogName);
        getCatalogCacheKey(session).ifPresent(sb::append);
        return sb.toString();
    }

    protected Optional<String> getCatalogCacheKey(ConnectorSession session)
    {
        return Optional.empty();

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Switch ice.catalog.type (iceberg.catalog.type) to a catalog implementation that supports namespaces, e.g. JDBC or REST with SupportsNamespaces.
  2. Move schema management to the catalog backend directly (create the namespace in the catalog's own tooling) instead of through Presto.
  3. Verify the configured catalog class implements org.apache.iceberg.SupportsNamespaces before issuing schema DDL.
  4. If only table operations are needed, avoid schema-level statements entirely.

Example fix

// before (properties)
iceberg.catalog.type=hadoop
// after
iceberg.catalog.type=jdbc
Defensive patterns

Strategy: type-guard

Validate before calling

// Java: check namespace support before schema DDL
Catalog catalog = catalogFactory.getCatalog(session);
if (!(catalog instanceof SupportsNamespaces)) {
    throw new IllegalStateException("Configured catalog does not support namespace operations");
}

Type guard

boolean supportsNamespaceOps(Catalog catalog) {
    return catalog instanceof SupportsNamespaces;
}

Try / catch

try {
    metadata.dropSchema(session, schemaName);
} catch (PrestoException e) {
    if (e.getErrorCode().getCode() == StandardErrorCode.NOT_SUPPORTED.getCode()) {
        // manage namespace directly in the catalog backend
    } else throw e;
}

Prevention

When it happens

Trigger: Executing any namespace operation (CREATE SCHEMA, DROP SCHEMA, LIST SCHEMAS, renameSchema, etc.) against an Iceberg native catalog whose Catalog object is not an instance of SupportsNamespaces; getNamespaces is called and the instanceof check fails.

Common situations: Configuring an Iceberg catalog type (e.g. a Hadoop catalog or one lacking namespace support in ice-nano/JDBC wiring) and then running schema DDL; switching catalog type in properties without revisiting schema-management code; tooling that assumes every catalog supports namespaces.

Understand the failure class

Background: Presto NOT_SUPPORTED error: what "not supported" means and how to fix it — this error's family across 3 libraries.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/697b4bf8dc6c6545. Report an issue: GitHub.