prestodb/presto · error · PrestoException
NOT_SUPPORTED
NOT_SUPPORTED
Error message
Unsupported column type:
What it means
ClickHouseColumnHandle.toMappingDefaultJdbcHandle() converts a Presto column type into the default JDBC type handle used when falling back to the base JDBC connector. Types with no mapping (e.g. TIME as shown, or other exotic types) throw PrestoException NOT_SUPPORTED.
Source
Thrown at presto-clickhouse/src/main/java/com/facebook/presto/plugin/clickhouse/ClickHouseColumnHandle.java:236
if (type.equals(DOUBLE)) {
return new ClickHouseTypeHandle(Types.DOUBLE, Optional.of("double precision"), 32, 4, Optional.empty(), Optional.empty());
}
if (type instanceof CharType || type instanceof VarcharType) {
return new ClickHouseTypeHandle(Types.VARCHAR, Optional.of("String"), 100, 0, Optional.empty(), Optional.empty());
}
if (type instanceof VarbinaryType) {
return new ClickHouseTypeHandle(Types.VARCHAR, Optional.of("String"), 2000, 0, Optional.empty(), Optional.empty());
}
if (type == DATE) {
return new ClickHouseTypeHandle(Types.DATE, Optional.of("date"), 8, 0, Optional.empty(), Optional.empty());
}
if (type == TIME) {
return new ClickHouseTypeHandle(Types.TIME, Optional.of("time"), 4, 0, Optional.empty(), Optional.empty());
}
if (type == TIMESTAMP) {
return new ClickHouseTypeHandle(Types.TIMESTAMP, Optional.of("timestamp"), 8, 0, Optional.empty(), Optional.empty());
}
throw new PrestoException(NOT_SUPPORTED, "Unsupported column type: " + type);
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Alter the ClickHouse table column to a supported type (Date/DateTime/String/numeric)
- Cast the column in your SELECT so it maps to a supported Presto type
- Exclude the unsupported column from the query
- Upgrade the plugin to a version that handles the type
Example fix
// before SELECT my_time_col FROM ch.db.t; // after SELECT CAST(my_time_col AS TIMESTAMP) AS my_time_col FROM ch.db.t;
Defensive patterns
Strategy: type-guard
Validate before calling
for (Column c : tableColumns) {
if (c.getType().equals(TIME) || c.getType() instanceof TimeWithTimeZoneType) {
throw new IllegalArgumentException("Column " + c.getName() + " type unsupported for ClickHouse reads: " + c.getType());
}
} Type guard
boolean isClickHouseReadable(Type t) {
return !(t.equals(TIME) || t.equals(TIMESTAMP) && isKnownUnsupported(t))
|| isSupportedClickHouseType(t);
} Try / catch
try {
return toMappingDefaultJdbcHandle(type);
} catch (PrestoException e) {
if (e.getErrorCode().getCode() == NOT_SUPPORTED.toErrorCode().getCode()) {
return Optional.empty(); // skip/Exclude this column
}
throw e;
} Prevention
- Avoid TIME-family columns in ClickHouse tables
- Cast unsupported columns in the SELECT list
- Keep plugin and server versions aligned
- Diff source vs ClickHouse schemas after upstream changes
When it happens
Trigger: Reading a ClickHouse table whose column maps to a Presto type the connector cannot translate to a default JDBC handle, typically during column handle conversion for reads when a ClickHouse-specific type handle is missing.
Common situations: Tables containing TIME-like columns; connector fallback paths triggered by unusual ClickHouse types; schema changed upstream after table creation.
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/ba416d65e56cc0c7.
Report an issue: GitHub.