{"record":{"id":"729a89b931ca25f5","repo":"prestodb/presto","slug":"getstatementclass-method-is-not-supported","errorCode":null,"errorMessage":"getStatementClass method is not supported!","messagePattern":"getStatementClass method is not supported!","errorType":"exception","errorClass":"java.lang.UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"presto-common/src/main/java/com/facebook/presto/common/analyzer/PreparedQuery.java","lineNumber":60,"sourceCode":"\n    public Optional<QueryType> getQueryType()\n    {\n        throw new UnsupportedOperationException(\"getQueryType method is not supported!\");\n    }\n\n    public boolean isTransactionControlStatement()\n    {\n        throw new UnsupportedOperationException(\"isTransactionControlStatement method is not supported!\");\n    }\n\n    public boolean isRollbackStatement()\n    {\n        throw new UnsupportedOperationException(\"isRollbackStatement method is not supported!\");\n    }\n\n    public Class<?> getStatementClass()\n    {\n        throw new UnsupportedOperationException(\"getStatementClass method is not supported!\");\n    }\n\n    public boolean isExplainTypeValidate()\n    {\n        throw new UnsupportedOperationException(\"isExplainTypeValidate method is not supported!\");\n    }\n}\n","sourceCodeStart":42,"sourceCodeEnd":68,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-common/src/main/java/com/facebook/presto/common/analyzer/PreparedQuery.java#L42-L68","documentation":"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.","triggerScenarios":"Thrown at presto-common/src/main/java/com/facebook/presto/common/analyzer/PreparedQuery.java:60 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the PreparedQuery subclass that wraps the analyzed Statement","Derive the statement class from the query analysis instead"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}