{"record":{"id":"4916d4714c746cac","repo":"prestodb/presto","slug":"not-supported-4916d4","errorCode":null,"errorMessage":" not supported","messagePattern":" not supported","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"presto-cli/src/main/java/com/facebook/presto/cli/Query.java","lineNumber":345,"sourceCode":"        switch (format) {\n            case ALIGNED:\n                return new AlignedTablePrinter(fieldNames, writer);\n            case VERTICAL:\n                return new VerticalRecordPrinter(fieldNames, writer);\n            case CSV:\n                return new CsvPrinter(fieldNames, writer, false);\n            case CSV_HEADER:\n                return new CsvPrinter(fieldNames, writer, true);\n            case TSV:\n                return new TsvPrinter(fieldNames, writer, false);\n            case TSV_HEADER:\n                return new TsvPrinter(fieldNames, writer, true);\n            case JSON:\n                return new JsonPrinter(fieldNames, writer);\n            case NULL:\n                return new NullPrinter();\n        }\n        throw new RuntimeException(format + \" not supported\");\n    }\n\n    private static Writer createWriter(OutputStream out)\n    {\n        return new OutputStreamWriter(out, UTF_8);\n    }\n\n    @Override\n    public void close()\n    {\n        client.close();\n    }\n\n    public void renderFailure(PrintStream out)\n    {\n        QueryStatusInfo results = client.finalStatusInfo();\n        QueryError error = results.getError();\n        checkState(error != null);","sourceCodeStart":327,"sourceCodeEnd":363,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-cli/src/main/java/com/facebook/presto/cli/Query.java#L327-L363","documentation":"Query.createOutputPrinter switches over the requested --output-format and throws if none of the known cases (CSV, TSV, TSV_HEADER, JSON, NULL) match. The message is the raw format string plus ' not supported', indicating an unrecognized output format value.","triggerScenarios":"Passing an --output-format value that doesn't match the enum (case-sensitive or misspelled, e.g. 'csv_json', 'text', 'ALIGNED' typo) to createOutputPrinter via createOutputHandler.","commonSituations":"Misspelling the format in scripts; assuming case-insensitivity (e.g. 'csv' vs 'CSV'); copying a format name from another tool (e.g. 'vertical').","solutions":["Use a supported value: ALIGNED, VERTICAL, CSV, CSV_HEADER, TSV, TSV_HEADER, JSON, NULL (check presto --help)","Match the exact spelling/case of the enum constant","Update old scripts that reference a format removed in this CLI version"],"exampleFix":"// before\npresto --output-format excel --execute \"SELECT 1\"\n// after\npresto --output-format CSV --execute \"SELECT 1\"","handlingStrategy":"validation","validationCode":"// validate format against supported set before invoking\nconst VALID = [\"ALIGNED\",\"VERTICAL\",\"CSV\",\"CSV_HEADER\",\"TSV\",\"TSV_HEADER\",\"JSON\",\"NULL\"];\nif (!VALID.includes(format)) throw new Error(`Unsupported output format: ${format}`);","typeGuard":null,"tryCatchPattern":"try { runCli(\"--output-format\", fmt, ...); } catch (RuntimeException e) { if (e.getMessage().endsWith(\" not supported\")) { /* retry with CSV default */ } else throw e; }","preventionTips":["Copy format names exactly from presto --help","Validate format strings in scripts against the enum","Note that matching is case-sensitive"],"tags":["cli","invalid-argument","output-format"],"backgroundTag":"invalid-output-format","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"}