prestodb/presto · error
NOT_SUPPORTED
NOT_SUPPORTED
Error message
Unsupported column type: ${type.displayName} What it means
QueryBuilder.buildSql binds predicate/literal values into a PreparedStatement for a JDBC pushdown query. When the driver's ObjectWriteFunction.set throws SQLException while binding a value, the connector raises NOT_SUPPORTED with the column type's display name. This means the remote JDBC driver cannot accept a bind value of that Presto type in the generated SQL.
Source
Thrown at presto-base-jdbc/src/main/java/com/facebook/presto/plugin/jdbc/QueryBuilder.java:175
Object value = typeAndValue.getValue();
if (javaType == boolean.class) {
((BooleanWriteFunction) writeFunction).set(statement, parameterIndex, (boolean) value);
}
else if (javaType == double.class) {
((DoubleWriteFunction) writeFunction).set(statement, parameterIndex, (double) value);
}
else if (javaType == long.class) {
((LongWriteFunction) writeFunction).set(statement, parameterIndex, (long) value);
}
else if (javaType == Slice.class) {
((SliceWriteFunction) writeFunction).set(statement, parameterIndex, (Slice) value);
}
else {
try {
((ObjectWriteFunction) writeFunction).set(statement, parameterIndex, value);
}
catch (SQLException e) {
throw new PrestoException(NOT_SUPPORTED, "Unsupported column type: " + type.getDisplayName());
}
}
}
return statement;
}
public PreparedStatement buildSql(
JdbcClient client,
ConnectorSession session,
Connection connection,
String catalog,
String schema,
String table,
List<JdbcColumnHandle> columns,
TupleDomain<ColumnHandle> tupleDomain,
Optional<JdbcExpression> additionalPredicate)
throws SQLException
{View on GitHub (pinned to 55bb57d202)
Solutions
- CAST the predicate literal to a broadly supported type in the query, e.g. WHERE ts = CAST('2024-01-01' AS timestamp)
- Upgrade the target database's JDBC driver to one that supports the bind type
- Disable predicate pushdown for the problematic type (configure the connector to not push down that type) or write the filter as a non-pushable expression so it's evaluated in Presto
- If you maintain the connector, add/fix a TypeHandler for that type mapping
Example fix
// before
SELECT * FROM jdbc.t WHERE event_time = DATE '2024-01-01 10:00:00.123456';
// after
SELECT * FROM jdbc.t WHERE CAST(event_time AS timestamp(6)) = CAST('2024-01-01 10:00:00.123456' AS timestamp(6)); Defensive patterns
Strategy: try-catch
Validate before calling
// Avoid un-p pushdownable bind types: rewrite literal comparisons with CAST // e.g. check predicate literal types before running: // if a filter uses timestamp(x) / time / json literals, wrap them in CAST to a standard type
Type guard
private static boolean isPushdownSafeType(Type type) {
String n = type.getDisplayName();
return n.startsWith("varchar") || n.startsWith("bigint") || n.startsWith("integer")
|| n.startsWith("double") || n.startsWith("boolean") || n.startsWith("date")
|| n.matches("timestamp\\(\\d+\\)");
} Try / catch
try {
connector.executeSelect(...);
} catch (PrestoException e) {
if (e.getErrorCode().getCode() == StandardErrorCode.NOT_SUPPORTED.toErrorCode().getCode()) {
// rewrite the query with CAST on the predicate literal and retry
} else {
throw e;
}
} Prevention
- CAST predicate literals to simple types (varchar, bigint, timestamp) when filtering JDBC tables
- Upgrade the remote database's JDBC driver
- Avoid comparing against Presto-specific types (json, arrays) in WHERE clauses on JDBC catalogs
- If you control the connector, disable pushdown for problematic types or add a TypeHandler
When it happens
Trigger: Running a query with WHERE/join predicates against a JDBC catalog where pushdown binds a value whose Presto type (e.g. DATE with unexpected precision, TIME, JSON, or a type with no registered write function) is rejected by the driver via SQLException.
Common situations: Filtering JDBC tables by timestamp/time columns with driver-specific precision requirements; comparing against Presto-specific types after version upgrades changed type mappings; older database drivers lacking setObject support for certain types.
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/6ec2cc04ff309588.
Report an issue: GitHub.