prestodb/presto · error · PrestoException
NOT_SUPPORTED
NOT_SUPPORTED
Error message
This connector does not support get views
What it means
getNativeIcebergView loads a view from a native Iceberg catalog. Views are only available when the underlying catalog implements the ViewCatalog interface; if the configured catalog (Hadoop/Hive-metastore flavor, etc.) does not support views, the connector throws NOT_SUPPORTED rather than attempting an unsupported cast.
Source
Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergUtil.java:314
hdfsEnvironment,
hdfsContext,
config,
manifestFileCache,
table.getSchemaName(),
table.getTableName());
return new BaseTable(operations, fullTableName(catalogName.getCatalogName(), TableIdentifier.of(table.getSchemaName(), table.getTableName())));
}
public static Table getNativeIcebergTable(IcebergNativeCatalogFactory catalogFactory, ConnectorSession session, SchemaTableName table)
{
return catalogFactory.getCatalog(session).loadTable(toIcebergTableIdentifier(table, catalogFactory.isNestedNamespaceEnabled()));
}
public static View getNativeIcebergView(IcebergNativeCatalogFactory catalogFactory, ConnectorSession session, SchemaTableName table)
{
Catalog catalog = catalogFactory.getCatalog(session);
if (!(catalog instanceof ViewCatalog)) {
throw new PrestoException(NOT_SUPPORTED, "This connector does not support get views");
}
return ((ViewCatalog) catalog).loadView(toIcebergTableIdentifier(getBaseSchemaTableName(table), catalogFactory.isNestedNamespaceEnabled()));
}
/**
* Removes Iceberg-specific suffixes from the table name
*/
private static SchemaTableName getBaseSchemaTableName(SchemaTableName table)
{
IcebergTableName icebergTableName = IcebergTableName.from(table.getTableName());
return new SchemaTableName(table.getSchemaName(), icebergTableName.getTableName());
}
public static TableOperations opsFromTable(Table table)
{
if (table instanceof BaseTransaction.TransactionTable) {
return ((BaseTransaction.TransactionTable) table).operations();
}View on GitHub (pinned to 55bb57d202)
Solutions
- Configure a catalog implementation that supports views (implements ViewCatalog), e.g. a JDBC or REST/nested-namespace catalog with view support.
- Move views out of this catalog into one that supports them, or replace views with tables.
- Check the Iceberg runtime version bundled with Presto for ViewCatalog availability.
Example fix
// before (properties) iceberg.catalog.type=hadoop // after iceberg.catalog.type=jdbc # a catalog supporting views
Defensive patterns
Strategy: type-guard
Validate before calling
Catalog catalog = catalogFactory.getCatalog(session);
if (!(catalog instanceof ViewCatalog)) {
// skip view handling or route to a view-capable catalog
} Type guard
boolean catalogSupportsViews(IcebergNativeCatalogFactory factory, ConnectorSession session) {
return factory.getCatalog(session) instanceof ViewCatalog;
} Try / catch
try {
View view = IcebergUtil.getNativeIcebergView(catalogFactory, session, name);
} catch (PrestoException e) {
if (e.getErrorCode() == NOT_SUPPORTED.toErrorCode() &&
e.getMessage().contains("does not support get views")) {
throw new UnsupportedOperationException(
"Catalog " + catalog.getClass().getSimpleName() + " has no view support; use a JDBC/REST catalog", e);
}
throw e;
} Prevention
- Check catalog instanceof ViewCatalog before any view operation
- Choose a catalog type that implements ViewCatalog if views are required
- Keep views in a dedicated view-capable catalog when mixing catalog types
- Pin an Iceberg runtime version that includes ViewCatalog support
When it happens
Trigger: Calling getNativeIcebergView (e.g. via SHOW CREATE VIEW, SELECT from a view, or metadata listing) when catalogFactory.getCatalog(session) returns a Catalog that is not a ViewCatalog.
Common situations: Using an Iceberg catalog implementation without view support (older Iceberg runtime or Hadoop catalog) while queries reference views; environment misconfiguration pointing the connector at a catalog type that lacks view tables; version downgrade removing ViewCatalog support.
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
- VIEW_NOT_FOUND
- NOT_SUPPORTED
- Not an Iceberg table: ${getSchemaTableName()}
- Table not found: ${new SchemaTableName(database, tableName)}
- NOT_SUPPORTED
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/be989c5db9679f7f.
Report an issue: GitHub.