prestodb/presto · error · PrestoException
NOT_SUPPORTED
NOT_SUPPORTED
Error message
unsupported type: ${type} What it means
RcFileEncoding.getEncoding maps a Presto/Hive type to its RCFile column encoder. If the type has no registered encoder (the switch over type signatures falls through), the library throws PrestoException(NOT_SUPPORTED) because RCFile RCBinary/Text encoding simply has no implementation for that type.
Source
Thrown at presto-rcfile/src/main/java/com/facebook/presto/rcfile/RcFileEncoding.java:127
}
String baseType = type.getTypeSignature().getBase();
if (ARRAY.equals(baseType)) {
ColumnEncoding elementType = getEncoding(type.getTypeParameters().get(0));
return listEncoding(type, elementType);
}
if (MAP.equals(baseType)) {
ColumnEncoding keyType = getEncoding(type.getTypeParameters().get(0));
ColumnEncoding valueType = getEncoding(type.getTypeParameters().get(1));
return mapEncoding(type, keyType, valueType);
}
if (ROW.equals(baseType)) {
return structEncoding(
type,
type.getTypeParameters().stream()
.map(this::getEncoding)
.collect(toList()));
}
throw new PrestoException(NOT_SUPPORTED, "unsupported type: " + type);
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Identify the unsupported type from the message and change the table column to a supported type (e.g. convert INTERVAL or custom types to VARCHAR/BIGINT)
- Rewrite the table in ORC or Parquet format, which supports far more types
- If the type should be supported, upgrade Presto to a newer version where RCFile type coverage was extended
- Catch PrestoException with code NOT_SUPPORTED and fall back to a different connector/format
Example fix
// before CREATE TABLE t (i interval day to second) WITH (format = 'RCFILE'); // after CREATE TABLE t (i varchar) WITH (format = 'RCFILE'); -- or use ORC
Defensive patterns
Strategy: validation
Validate before calling
Set<Signature> supported = ...; // from RcFileEncoding switch
if (!isSupportedRcFileType(columnType)) {
throw new IllegalArgumentException("Column type not supported by RCFile: " + columnType);
}
try {
encodingFactory.getEncoding(columnType);
} catch (PrestoException e) {
if (e.getErrorCode() == StandardErrorCode.NOT_SUPPORTED.toErrorCode().getCode()) {
// fall back to ORC or reject table
}
} Type guard
boolean isSupportedRcFileType(Type type) {
return type instanceof BigintType || type instanceof IntegerType || type instanceof SmallintType
|| type instanceof TinyintType || type instanceof DoubleType || type instanceof RealType
|| type instanceof BooleanType || type instanceof VarcharType || type instanceof VarbinaryType
|| type instanceof DateType || type instanceof TimestampType;
} Try / catch
try { enc = getEncoding(type); } catch (PrestoException e) { if (NOT_SUPPORTED == e.getErrorCode().getName()) { enc = fallbackEncodingFor(type); } else { throw e; } } Prevention
- Check the RCFile type support list before creating RCFile tables
- Prefer ORC/Parquet for exotic or deeply nested types
- Add a schema lint step that validates all column types against supported encodings
- Upgrade Presto before assuming a type is unsupported
When it happens
Trigger: Calling getEncoding (directly or via columnEncoding/elementType/keyType/valueType) with a type outside the supported set — e.g. exotic types like INTERVAL, UNKNOWN, custom parametric types, or nested types whose component types are unsupported (a MAP with an unsupported key type recurses into keyType and throws here).
Common situations: Tables created with Hive types Presto's RCFile reader doesn't implement; a schema change adding a new column type to an existing RCFile table; deeply nested types (array<map<...>>) where an inner type is unsupported.
Understand the failure class
Background: Presto NOT_SUPPORTED error: what "not supported" means and how to fix it — this error's family across 3 libraries.
Related errors
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/3099bd1944e2bf1f.
Report an issue: GitHub.