prestodb/presto · error · SemanticException
NOT_SUPPORTED
NOT_SUPPORTED
Error message
is not supported
What it means
SemanticExceptions.notSupportedException wraps an arbitrary feature description into a NOT_SUPPORTED SemanticException, appending ' is not supported'. It is Presto's generic rejection path for SQL features the analyzer does not implement.
Source
Thrown at presto-analyzer/src/main/java/com/facebook/presto/sql/analyzer/SemanticExceptions.java:46
private SemanticExceptions() {}
public static SemanticException missingAttributeException(Expression node, QualifiedName name)
{
throw new SemanticException(
MISSING_ATTRIBUTE,
node,
name.getPrefix().isPresent() ? "'%s' cannot be resolved" : "Column '%s' cannot be resolved",
name);
}
public static SemanticException ambiguousAttributeException(Expression node, QualifiedName name)
{
throw new SemanticException(AMBIGUOUS_ATTRIBUTE, node, "Column '%s' is ambiguous", name);
}
public static SemanticException notSupportedException(Node node, String notSupportedFeatureDescription)
{
throw new SemanticException(NOT_SUPPORTED, node, notSupportedFeatureDescription + " is not supported");
}
public static String subQueryNotSupportedError(Node node, String notSupportedFeatureDescription)
{
if (node.getLocation().isPresent()) {
NodeLocation nodeLocation = node.getLocation().get();
return format("line %s:%s: %s", nodeLocation.getLineNumber(), nodeLocation.getColumnNumber(), notSupportedFeatureDescription + " is not supported");
}
return notSupportedFeatureDescription + " is not supported";
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Read the full message to identify the unsupported feature
- Rewrite the query using supported constructs (e.g. move a subquery into a CTE/JOIN)
- Upgrade Presto if the feature is supported in a newer release
Example fix
-- before SELECT * FROM t WHERE (SELECT max(x) FROM t2) = y -- subquery not supported here -- after WITH m AS (SELECT max(x) AS mx FROM t2) SELECT t.* FROM t, m WHERE m.mx = t.y
Defensive patterns
Strategy: try-catch
Try / catch
try { /* run query */ } catch (SemanticException e) { if ("NOT_SUPPORTED".equals(e.getErrorCode().getName())) { log.warn("Unsupported feature: {}", e.getMessage()); /* rewrite query */ } throw e; } Prevention
- Check Presto SQL documentation for supported syntax per version
- Rewrite non-standard constructs (subqueries in SELECT, exotic DDL) into supported forms
- Test migrated queries against Presto before production
When it happens
Trigger: Using a SQL construct that the current Presto analyzer/connector does not support, passed in as notSupportedFeatureDescription by the caller (e.g. certain subquery placements, DDL features, or expressions).
Common situations: Migrating queries from other engines (MySQL, Hive, Snowflake) with non-standard syntax; using newer SQL features on an older Presto version.
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/619be11f4f7421ec.
Report an issue: GitHub.