{"record":{"id":"654e1901e700ac46","repo":"prestodb/presto","slug":"unsupported-query-type-s","errorCode":null,"errorMessage":"Unsupported query type: %s","messagePattern":"Unsupported query type: (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"presto-verifier/src/main/java/com/facebook/presto/verifier/framework/VerificationFactory.java","lineNumber":170,"sourceCode":"                        verificationContext,\n                        verifierConfig,\n                        executor,\n                        snapshotQueryConsumer,\n                        snapshotQueries);\n            case CREATE_TABLE:\n                return new CreateTableVerification(\n                        sqlParser,\n                        queryActions,\n                        sourceQuery,\n                        queryRewriter,\n                        exceptionClassifier,\n                        verificationContext,\n                        verifierConfig,\n                        executor,\n                        snapshotQueryConsumer,\n                        snapshotQueries);\n            default:\n                throw new IllegalStateException(format(\"Unsupported query type: %s\", queryType));\n        }\n    }\n}\n","sourceCodeStart":152,"sourceCodeEnd":174,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-verifier/src/main/java/com/facebook/presto/verifier/framework/VerificationFactory.java#L152-L174","documentation":"VerificationFactory.get dispatches a QueryType to the corresponding verification class (QueryVerification, CreateTableVerification, CreateViewVerification, CreateTableAsSelectVerification, etc.) via a switch. A QueryType with no case reaches default and throws IllegalStateException with this message, meaning the verifier does not know how to execute that statement type.","triggerScenarios":"Calling factory.get(...) (e.g. from verify) with a suite whose QueryType enum value is not handled by the switch — typically after a new QueryType was added or an unhandled statement kind (INSERT/DELETE/DESCRIBE) appears in the verifier configuration.","commonSituations":"Running the verifier against a suite containing unsupported statement types; adding a QueryType enum constant without extending VerificationFactory; version skew between the verifier config generator and the verifier binary.","solutions":["Check the queryType value in the message and the suite's SQL — remove or move unsupported statement types to a different suite.","Add a case in VerificationFactory.get mapping the new QueryType to a verification implementation.","Ensure the verifier configuration files match what this verifier build supports.","Upgrade/downgrade the verifier so the enum and factory agree."],"exampleFix":"// before\ndefault:\n    throw new IllegalStateException(format(\"Unsupported query type: %s\", queryType));\n// after\ncase CREATE_OR_REPLACE_VIEW:\n    return new CreateOrReplaceViewVerification(...);\ndefault:\n    throw new IllegalStateException(format(\"Unsupported query type: %s\", queryType));","handlingStrategy":"validation","validationCode":"// Java: pre-check supported query types before dispatch\nEnumSet<QueryType> supported = EnumSet.of(SELECT, CREATE_TABLE, CREATE_TABLE_AS_SELECT, CREATE_VIEW, CREATE_VIEW_AS_SELECT, CREATE_OR_REPLACE_VIEW, CREATE_FUNCTION, DESCRIBE, EXPLAIN, INSERT, DELETE, REFRESH, CREATE_MATERIALIZED_VIEW, DROP_TABLE);\nif (!supported.contains(queryType)) {\n    throw new IllegalArgumentException(\"Query type not supported by this verifier build: \" + queryType);\n}","typeGuard":null,"tryCatchPattern":"try {\n    verification = factory.get(...);\n} catch (IllegalStateException e) {\n    if (e.getMessage().startsWith(\"Unsupported query type\")) {\n        report.skip(query, e.getMessage());\n        return;\n    }\n    throw e;\n}","preventionTips":["Keep VerificationFactory's switch in sync with the QueryType enum; add a coverage test.","Filter verifier suites to statement types the verifier build supports.","Regenerate verifier configs with a matching verifier version.","Fail fast at config-load time on unknown statement kinds."],"tags":["verifier","unsupported","state-error","dispatch"],"backgroundTag":"unsupported-query-type","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"}