prestodb/presto · error · PrestoException
NOT_SUPPORTED
NOT_SUPPORTED
Error message
Unsupported type:
What it means
ExpressionInterpreter.evaluateCast throws NOT_SUPPORTED when a CAST's target type string cannot be resolved by the metadata type registry. This happens when the planner evaluates a cast expression whose type name is unknown to the server (e.g. from a stale plan, a plugin/connector mismatch, or an unsupported type name).
Source
Thrown at presto-main-base/src/main/java/com/facebook/presto/sql/planner/ExpressionInterpreter.java:1132
result = LikeFunctions.likePattern(pattern.getSlice(), escape);
}
else {
result = LikeFunctions.likePattern(pattern.getSlice());
}
likePatternCache.put(node, result);
}
return result;
}
@Override
public Object visitCast(Cast node, Object context)
{
Object value = process(node.getExpression(), context);
Type targetType = metadata.getType(parseTypeSignature(node.getType()));
if (targetType == null) {
throw new PrestoException(NOT_SUPPORTED, "Unsupported type: " + node.getType());
}
if (value == null) {
return null;
}
Type sourceType = type(node.getExpression());
if (value instanceof Expression) {
if (targetType.equals(sourceType)) {
return value;
}
return new Cast((Expression) value, node.getType(), node.isSafe(), node.isTypeOnly());
}
if (node.isTypeOnly()) {
return value;
}View on GitHub (pinned to 55bb57d202)
Solutions
- Check the type name in the query/plan for typos or unsupported types.
- Ensure all connector plugins providing custom types are installed on the coordinator.
- Verify the plan was produced by the same Presto version that is executing it.
Defensive patterns
Strategy: validation
Validate before calling
if (metadata.getType(parseTypeSignature(typeName)) == null) { throw new IllegalArgumentException("Unknown type: " + typeName); } Type guard
boolean isKnownType(Metadata metadata, String typeName) { return metadata.getType(parseTypeSignature(typeName)) != null; } Try / catch
try { Object v = interpreter.evaluate(...); } catch (PrestoException e) { if (e.getErrorCode().getCode() == StandardErrorCode.NOT_SUPPORTED.toErrorCode().getCode()) { /* fallback path */ } else { throw e; } } Prevention
- Validate type names against metadata.getType before building cast expressions
- Keep plugins in sync across coordinator and workers
- Avoid hand-constructing plans with type strings from external sources
When it happens
Trigger: Interpreting a Cast expression whose node.getType() does not resolve via metadata.getType(parseTypeSignature(...)) — i.e. constant-folding a plan containing a cast to an unregistered/typo'd type.
Common situations: Plans serialized by a different Presto version, custom types from a connector plugin not installed on the coordinator, or hand-built SQL with an invalid type name reaching constant evaluation.
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
- BIGQUERY_UNSUPPORTED_COLUMN_TYPE
- Unsupported java type %s
- CHAR length scale must be in range [0, %s]
- Enum definition expected, got %s
- DECIMAL precision must be in range [1, 38]
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/09e1781cc0d1a941.
Report an issue: GitHub.