prestodb/presto · error · IllegalArgumentException
unsupported column type '%s' for column '%s'
Error message
unsupported column type '%s' for column '%s'
What it means
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).
Source
Thrown at presto-record-decoder/src/main/java/com/facebook/presto/decoder/json/JsonRowDecoderFactory.java:90
case "milliseconds-since-epoch":
return new MillisecondsSinceEpochJsonFieldDecoder(column);
case "rfc2822":
return new RFC2822JsonFieldDecoder(column);
case "":
return new DefaultJsonFieldDecoder(column);
default:
throw new IllegalArgumentException(format("unknown data format '%s' used for column '%s'", column.getDataFormat(), column.getName()));
}
}
catch (IllegalArgumentException e) {
throw new PrestoException(GENERIC_USER_ERROR, e);
}
}
public static JsonFieldDecoder throwUnsupportedColumnType(DecoderColumnHandle column)
{
if (column.getDataFormat() == null) {
throw new IllegalArgumentException(format("unsupported column type '%s' for column '%s'", column.getType().getDisplayName(), column.getName()));
}
throw new IllegalArgumentException(format("unsupported column type '%s' for column '%s' with data format '%s'", column.getType(), column.getName(), column.getDataFormat()));
}
}
View on GitHub (pinned to 55bb57d202)
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
Example fix
// before
{"name":"payload","type":"map(varchar, varchar)"}
// after
{"name":"payload","type":"varchar"} then json_extract(payload, '$.x') Defensive patterns
Strategy: validation
Validate before calling
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()); Try / catch
try { decoder = JsonRowDecoderFactory.create(...); } catch (PrestoException e) { log.error("unsupported column type: " + e.getMessage()); throw new ConfigError(e); } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- unsupported type ${columnType}
- unsupported column type '%s' for column '%s' with data forma
- GENERIC_USER_ERROR
- ACCUMULO_TABLE_EXISTS
- NOT_SUPPORTED
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/e107cb057223a9f6.
Report an issue: GitHub.