prestodb/presto · error · java.lang.UnsupportedOperationException
getStatementClass method is not supported!
Error message
getStatementClass method is not supported!
What it means
Sentinel UnsupportedOperationException in getStatementClass: the PreparedQuery lacks the analyzed statement object, so the JDBC statement class cannot be resolved — the query was prepared through a path that skips statement analysis.
Source
Thrown at presto-common/src/main/java/com/facebook/presto/common/analyzer/PreparedQuery.java:60
public Optional<QueryType> getQueryType()
{
throw new UnsupportedOperationException("getQueryType method is not supported!");
}
public boolean isTransactionControlStatement()
{
throw new UnsupportedOperationException("isTransactionControlStatement method is not supported!");
}
public boolean isRollbackStatement()
{
throw new UnsupportedOperationException("isRollbackStatement method is not supported!");
}
public Class<?> getStatementClass()
{
throw new UnsupportedOperationException("getStatementClass method is not supported!");
}
public boolean isExplainTypeValidate()
{
throw new UnsupportedOperationException("isExplainTypeValidate method is not supported!");
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Use the PreparedQuery subclass that wraps the analyzed Statement
- Derive the statement class from the query analysis instead
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at presto-common/src/main/java/com/facebook/presto/common/analyzer/PreparedQuery.java:60 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/729a89b931ca25f5.
Report an issue: GitHub.