prestodb/presto · error · PrestoException
NOT_SUPPORTED
NOT_SUPPORTED
Error message
Unsupported statement type: " + preparedQuery.getStatementClass().getSimpleName()
What it means
Default-case guard in LocalDispatchQueryFactory.createDispatchQuery: the prepared query's statement class is not one of the supported dispatch types (the switch over statement kinds fell through), so no query execution machinery exists for it. The statement class simple name is included.
Source
Thrown at presto-main/src/main/java/com/facebook/presto/dispatcher/LocalDispatchQueryFactory.java:166
preparedQuery.getPrepareSql(),
session,
locationFactory.createQueryLocation(session.getQueryId()),
resourceGroup,
queryType,
preparedQuery.isTransactionControlStatement(),
transactionManager,
accessControl,
executor,
metadata,
warningCollector);
stateMachine.addStateChangeListener(new QueryStateTracingListener(stateMachine.getSession().getTracer().orElse(NoopTracerProvider.NOOP_TRACER)));
queryMonitor.queryCreatedEvent(stateMachine.getBasicQueryInfo(Optional.empty()));
ListenableFuture<QueryExecution> queryExecutionFuture = executor.submit(() -> {
QueryExecutionFactory<?> queryExecutionFactory = executionFactoriesManager.getExecutionFactory(preparedQuery);
if (queryExecutionFactory == null) {
throw new PrestoException(NOT_SUPPORTED, "Unsupported statement type: " + preparedQuery.getStatementClass().getSimpleName());
}
return queryExecutionFactory.createQueryExecution(analyzerProviderManager.getAnalyzerProvider(getAnalyzerType(session)), preparedQuery, stateMachine, slug, retryCount, warningCollector, queryType, accessControl, query);
});
return new LocalDispatchQuery(
stateMachine,
queryMonitor,
queryExecutionFuture,
clusterSizeMonitor,
executor,
queryQueuer,
queryManager::createQuery,
retryCount > 0,
queryPrerequisitesManager);
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Report as a bug or unsupported feature: a statement type reached dispatch without a matching execution path
- Retry with an equivalent supported statement form
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at presto-main/src/main/java/com/facebook/presto/dispatcher/LocalDispatchQueryFactory.java:166 when the library encounters an invalid state.
Common situations: See trigger scenarios.
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.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/9de9f15b2e92a417.
Report an issue: GitHub.