{"record":{"id":"e107cb057223a9f6","repo":"prestodb/presto","slug":"unsupported-column-type-s-for-column-s","errorCode":null,"errorMessage":"unsupported column type '%s' for column '%s'","messagePattern":"unsupported column type '(.+?)' for column '(.+?)'","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"presto-record-decoder/src/main/java/com/facebook/presto/decoder/json/JsonRowDecoderFactory.java","lineNumber":90,"sourceCode":"                case \"milliseconds-since-epoch\":\n                    return new MillisecondsSinceEpochJsonFieldDecoder(column);\n                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":72,"sourceCodeEnd":95,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-record-decoder/src/main/java/com/facebook/presto/decoder/json/JsonRowDecoderFactory.java#L72-L95","documentation":"JsonRowDecoderFactory.throwUnsupportedColumnType signals that a column's type cannot be decoded by any JSON field decoder for the given setup. When the column has no dataFormat, the message reports just the column type and name. The type is simply not in the set the JSON decoder supports (e.g. row, map, array or other unsupported types).","triggerScenarios":"Declaring a Kafka/record column whose type (e.g. a complex type like array(F) or map(...)) has no JSON field decoder implementation and no dataFormat set, so decoder selection fails and calls throwUnsupportedColumnType.","commonSituations":"Overly ambitious table DDL trying to map nested JSON structures to complex Presto types; schema copied from a Hive connector where complex types are supported.","solutions":["Change the column to a supported primitive type (boolean, bigint, double, varchar, date, time, timestamp)","Drop the unsupported column from the table definition","Represent structured JSON via varchar and parse in queries (json_extract)","Check connector docs for supported JSON decoder column types"],"exampleFix":"// before\n{\"name\":\"payload\",\"type\":\"map(varchar, varchar)\"}\n// after\n{\"name\":\"payload\",\"type\":\"varchar\"} then json_extract(payload, '$.x')","handlingStrategy":"validation","validationCode":"boolean ok = java.util.Set.of(\"boolean\",\"bigint\",\"integer\",\"smallint\",\"tinyint\",\"double\",\"real\",\"varchar\",\"date\",\"time\",\"time with time zone\",\"timestamp\").contains(column.getType().getDisplayName().toLowerCase());","typeGuard":null,"tryCatchPattern":"try { decoder = JsonRowDecoderFactory.create(...); } catch (PrestoException e) { log.error(\"unsupported column type: \" + e.getMessage()); throw new ConfigError(e); }","preventionTips":["Restrict record-decoder columns to supported primitive types","Parse nested JSON via varchar + json_extract in queries instead of complex types","Review connector docs for type support before adding columns","Add a definition lint step that checks column types against the whitelist"],"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"}