prestodb/presto · error · PrestoException
NOT_SUPPORTED
NOT_SUPPORTED
Error message
e.getMessage()
What it means
TuplePageFilter.matches compares each column value of a candidate index tuple against the single cached tuple using the type's equalTo. Some types do not implement equality comparison (NotSupportedException), so the filter cannot evaluate the predicate and wraps the failure in a PrestoException with the type's message as text. The message is literally the underlying type's unsupported-operation message, e.g. for types lacking comparison support.
Source
Thrown at presto-main-base/src/main/java/com/facebook/presto/operator/index/TuplePageFilter.java:97
selectedPositions[position] = matches(page, position);
}
return PageFilter.positionsArrayToSelectedPositions(selectedPositions, page.getPositionCount());
}
private boolean matches(Page page, int position)
{
for (int channel = 0; channel < inputChannels.size(); channel++) {
Type type = types.get(channel);
Block outputBlock = page.getBlock(channel);
Block singleTupleBlock = tuplePage.getBlock(channel);
try {
if (!type.equalTo(singleTupleBlock, 0, outputBlock, position)) {
return false;
}
}
catch (NotSupportedException e) {
throw new PrestoException(NOT_SUPPORTED, e.getMessage(), e);
}
}
return true;
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Change the join/predicate key to a type with defined equality (e.g. CAST the column to VARCHAR or BIGINT) in the index lookup condition.
- Check the NotSupportedException message to identify which type lacks equalTo and avoid it in indexed predicates.
- If this is a connector/type-plugin you own, implement equalTo (and hash) for the type.
- Restructure the query to filter unsupported-type rows before the index join.
Example fix
// before SELECT * FROM t JOIN index_source i ON t.weird_col = i.key // after SELECT * FROM t JOIN index_source i ON CAST(t.weird_col AS VARCHAR) = CAST(i.key AS VARCHAR)
Defensive patterns
Strategy: try-catch
Validate before calling
// Cannot inspect type equality support from SQL; avoid unsupported types in join keys -- ensure predicate columns are scalar: SELECT typeof(col) ...
Try / catch
try {
runIndexJoinQuery();
} catch (PrestoException e) {
if (e.getErrorCode().getName().equals("NOT_SUPPORTED")) {
// fall back to CAST-to-VARCHAR join or hash join path
} else throw e;
} Prevention
- Use only scalar types (BIGINT, VARCHAR, DOUBLE) as index join keys
- CAST exotic types before predicates
- Check typeof() of join columns during query design
When it happens
Trigger: Running an index-join / index lookup where the equality predicate involves a column type whose Type.equalTo throws NotSupportedException (e.g. types without a defined comparison, such as unknown/complex types).
Common situations: Index joins over columns of exotic or nested types (map/row-like or custom parametric types) where the engine assumed equality was supported; often surfaces after adding a new type plugin or casting to an unusual type in the join key.
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/99171add1981d16d.
Report an issue: GitHub.