prestodb/presto · error · java.lang.UnsupportedOperationException

isRollbackStatement method is not supported!

Error message

isRollbackStatement method is not supported!

What it means

Same unsupported-operations guard as its siblings: isRollbackStatement is called on a PreparedQuery instance that was not built with statement-analysis information, so transaction-control classification is impossible.

Solutions

  1. Use the PreparedQuery subclass that wraps the analyzed Statement
  2. Check the statement class directly where the Statement is available
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at presto-common/src/main/java/com/facebook/presto/common/analyzer/PreparedQuery.java:55 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/375d703d9f7ba53c. Report an issue: GitHub.

Appendix: source

Thrown at presto-common/src/main/java/com/facebook/presto/common/analyzer/PreparedQuery.java:55

    public Optional<String> getPrepareSql()
    {
        return prepareSql;
    }

    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)