{"record":{"id":"116063ab123556af","repo":"prestodb/presto","slug":"unsupported-column-type-s-for-column-s-with","errorCode":null,"errorMessage":"unsupported column type '%s' for column '%s' with data format '%s'","messagePattern":"unsupported column type '(.+?)' for column '(.+?)' with data format '(.+?)'","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"presto-record-decoder/src/main/java/com/facebook/presto/decoder/json/JsonRowDecoderFactory.java","lineNumber":92,"sourceCode":"                case \"rfc2822\":\n                    return new RFC2822JsonFieldDecoder(column);\n                case \"\":\n                    return new DefaultJsonFieldDecoder(column);\n                default:\n                    throw new IllegalArgumentException(format(\"unknown data format '%s' used for column '%s'\", column.getDataFormat(), column.getName()));\n            }\n        }\n        catch (IllegalArgumentException e) {\n            throw new PrestoException(GENERIC_USER_ERROR, e);\n        }\n    }\n\n    public static JsonFieldDecoder throwUnsupportedColumnType(DecoderColumnHandle column)\n    {\n        if (column.getDataFormat() == null) {\n            throw new IllegalArgumentException(format(\"unsupported column type '%s' for column '%s'\", column.getType().getDisplayName(), column.getName()));\n        }\n        throw new IllegalArgumentException(format(\"unsupported column type '%s' for column '%s' with data format '%s'\", column.getType(), column.getName(), column.getDataFormat()));\n    }\n}\n","sourceCodeStart":74,"sourceCodeEnd":95,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-record-decoder/src/main/java/com/facebook/presto/decoder/json/JsonRowDecoderFactory.java#L74-L95","documentation":"The second branch of JsonRowDecoderFactory.throwUnsupportedColumnType fires when the column both has an unsupported type AND a dataFormat is set; the message includes the dataFormat to aid diagnosis. The JSON row decoder cannot produce that column type from that format combination.","triggerScenarios":"A column with dataFormat (e.g. 'iso8601', 'custom-date-time') whose type is not a temporal/primitive type the format can produce — e.g. dataFormat 'rfc2822' on a bigint column with no matching decoder.","commonSituations":"Mismatched type/format pairs in topic definition JSON (e.g. iso8601 format on a varchar column); template edits that changed type but kept dataFormat.","solutions":["Make the column type compatible with the dataFormat (e.g. timestamp/date/time for iso8601, bigint for milliseconds-since-epoch, varchar for rfc2822)","Remove the dataFormat if the default decoder is intended","Pick a dataFormat supported for the declared type","Validate type/format pairs against connector documentation"],"exampleFix":"// before\n{\"name\":\"ts\",\"type\":\"varchar\",\"dataFormat\":\"iso8601\"}\n// after\n{\"name\":\"ts\",\"type\":\"timestamp\",\"dataFormat\":\"iso8601\"}","handlingStrategy":"validation","validationCode":"boolean isoLike = java.util.Set.of(\"iso8601\",\"rfc2822\",\"custom-date-time\",\"milliseconds-since-epoch\").contains(column.getDataFormat()); boolean temporal = java.util.Set.of(\"date\",\"time\",\"time with time zone\",\"timestamp\",\"bigint\",\"varchar\").contains(column.getType().getDisplayName().toLowerCase()); boolean ok = !isoLike || temporal;","typeGuard":null,"tryCatchPattern":"try { decoder = JsonRowDecoderFactory.create(...); } catch (PrestoException e) { if (e.getErrorCode().getCode() == StandardErrorCode.GENERIC_USER_ERROR.getCode()) { log.error(\"type/format mismatch: \" + e.getMessage()); failFast(); } else throw e; }","preventionTips":["Maintain a type/dataFormat compatibility matrix in your config tooling","Change type and dataFormat together when editing definitions","Dry-run decoder construction in CI against every table definition","Consult connector docs for which formats support which types"],"tags":["presto","decoder","unsupported-type","configuration"],"backgroundTag":"unsupported-column-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"}