prestodb/presto · error
NOT_SUPPORTED
NOT_SUPPORTED
Error message
Unsupported column type: ${type.displayName} What it means
The JDBC connector's page sink sets each column value on the prepared INSERT statement via a type-specific ObjectWriteFunction. If setting the value throws a SQLException, the connector concludes the underlying JDBC driver cannot handle Presto's column type and wraps it in a NOT_SUPPORTED PrestoException with the type's display name. It means the JDBC driver rejected the value binding for that column type.
Source
Thrown at presto-base-jdbc/src/main/java/com/facebook/presto/plugin/jdbc/JdbcPageSink.java:144
WriteFunction writeFunction = columnWriters.get(channel);
if (javaType == boolean.class) {
((BooleanWriteFunction) writeFunction).set(statement, parameter, type.getBoolean(block, position));
}
else if (javaType == long.class) {
((LongWriteFunction) writeFunction).set(statement, parameter, type.getLong(block, position));
}
else if (javaType == double.class) {
((DoubleWriteFunction) writeFunction).set(statement, parameter, type.getDouble(block, position));
}
else if (javaType == Slice.class) {
((SliceWriteFunction) writeFunction).set(statement, parameter, type.getSlice(block, position));
}
else {
try {
((ObjectWriteFunction) writeFunction).set(statement, parameter, type.getObject(block, position));
}
catch (SQLException e) {
throw new PrestoException(NOT_SUPPORTED, "Unsupported column type: " + type.getDisplayName());
}
}
}
@Override
public CompletableFuture<Collection<Slice>> finish()
{
// commit and close
try (Connection connection = this.connection;
PreparedStatement statement = this.statement) {
if (batchSize > 0) {
statement.executeBatch();
connection.commit();
}
}
catch (SQLNonTransientException e) {
throw new PrestoException(JDBC_NON_TRANSIENT_ERROR, e);
}View on GitHub (pinned to 55bb57d202)
Solutions
- Check the Presto column type in the error message and cast unsupported columns to a supported type in your INSERT query (e.g. CAST(col AS varchar))
- Verify the JDBC driver version is current; upgrade the driver jar so it supports setObject for the type
- Check the connector's TypeHandlers/JdbcTypeHandle mapping and register an additional type handler for the type in a custom connector
- Avoid writing columns with unsupported types: create a view excluding them or use a different sink
Example fix
// before INSERT INTO jdbc_table SELECT ip_col, hll_col FROM source; // after INSERT INTO jdbc_table SELECT CAST(ip_col AS varchar), CAST(hll_col AS varchar) FROM source;
Defensive patterns
Strategy: try-catch
Validate before calling
// Check column types before writing
for (int i = 0; i < types.size(); i++) {
String name = types.get(i).getDisplayName();
if (name.equals("json") || name.equals("HyperLogLog") || name.equals("IPaddress") || name.equals("array") || name.equals("map")) {
throw new IllegalArgumentException("Column " + i + " type " + name + " may be unsupported by the JDBC sink; CAST it first");
}
} Type guard
private static boolean isSupportedColumnType(Type type) {
String name = type.getDisplayName();
return name.startsWith("varchar") || name.startsWith("integer") || name.startsWith("bigint")
|| name.startsWith("double") || name.startsWith("boolean") || name.startsWith("date")
|| name.startsWith("timestamp");
} Try / catch
try {
sink.appendPage(page);
} catch (PrestoException e) {
if (e.getErrorCode().getCode() == StandardErrorCode.NOT_SUPPORTED.toErrorCode().getCode()
&& e.getMessage().startsWith("Unsupported column type:")) {
// cast offending column to varchar/bigint and retry
} else {
throw e;
}
} Prevention
- CAST Presto-specific types (json, IPaddress, HyperLogLog, arrays, maps) to varchar/bigint before inserting via JDBC
- Keep the target database JDBC driver up to date
- Inspect the connector's type mapping documentation before choosing column types
- Test INSERTs against staging tables with the same schema before production writes
When it happens
Trigger: Calling appendPage on a JdbcPageSink where a column's Presto type (e.g. a custom or exotic type like JSON, IPADDRESS, HyperLogLog, or an unsupported mapping) has no write function accepted by the target database's driver; PreparedStatement.setObject fails with SQLException for that parameter.
Common situations: Inserting into a JDBC table whose schema maps a Presto type the remote driver can't accept (e.g. writing time/timestamp with unusual precision, arrays, maps into databases like MySQL/PostgreSQL with older drivers); custom JDBC connectors with incomplete type mappings.
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/4cfaf6002b3549c3.
Report an issue: GitHub.