prestodb/presto · error · NotSupportedException
Unsupported Cassandra type: %s
Error message
Unsupported Cassandra type: %s
What it means
CassandraType.getCassandraType maps driver DataType objects to the connector's CassandraType enum; a driver CustomType (or any unrecognized type) has no mapping, so NotSupportedException is thrown. It means the table contains a Cassandra column type the connector cannot interpret.
Source
Thrown at presto-cassandra/src/main/java/com/facebook/presto/cassandra/CassandraType.java:240
}
else if (dataType instanceof com.datastax.oss.driver.api.core.type.MapType) {
return MAP;
}
else if (dataType instanceof com.datastax.oss.driver.api.core.type.SetType) {
return SET;
}
else if (dataType instanceof com.datastax.oss.driver.api.core.type.TupleType) {
return TUPLE;
}
// VectorType extends CustomType, so this branch must precede the CustomType check below.
else if (dataType instanceof com.datastax.oss.driver.api.core.type.VectorType) {
return VECTOR;
}
else if (dataType instanceof com.datastax.oss.driver.api.core.type.CustomType) {
return CUSTOM;
}
else {
throw new NotSupportedException(format("Unsupported Cassandra type: %s", dataType));
}
}
public static NullableValue getColumnValue(Row row, int position, FullCassandraType fullCassandraType)
{
return getColumnValue(row, position, fullCassandraType.getCassandraType(), fullCassandraType.getTypeArguments());
}
public static NullableValue getColumnValue(Row row, int position, CassandraType cassandraType,
List<CassandraType> typeArguments)
{
Type nativeType = cassandraType.getNativeType();
if (row.isNull(position)) {
return NullableValue.asNull(nativeType);
}
else {
switch (cassandraType) {
case ASCII:View on GitHub (pinned to 55bb57d202)
Solutions
- Replace the custom-typed column with a supported Cassandra type in the table schema
- Exclude the custom column from the query/projection (select only supported columns)
- Upgrade the connector to a version supporting the type
- Copy data into a new table with standard types and query that instead
Example fix
// before (cqlsh) ALTER TABLE t ADD payload <CustomType>; // after ALTER TABLE t ADD payload text;
Defensive patterns
Strategy: type-guard
Validate before calling
for (ColumnMetadata col : table.getColumns()) {
DataType dt = col.getType();
if (dt instanceof com.datastax.oss.driver.api.core.type.CustomType) {
throw new IllegalStateException("Column '" + col.getName()
+ "' uses an unsupported custom type; exclude it from queries");
}
} Type guard
boolean isSupportedCassandraType(DataType dataType) {
return !(dataType instanceof com.datastax.oss.driver.api.core.type.CustomType);
} Try / catch
try {
return metadata.getTable(handle);
} catch (NotSupportedException e) {
if (e.getMessage().startsWith("Unsupported Cassandra type:")) {
return projectOnlySupportedColumns(handle);
}
throw e;
} Prevention
- Avoid Cassandra custom types in tables queried via Presto
- Audit table schemas for custom/unusual types before connector migrations
- Standardize on built-in Cassandra types
When it happens
Trigger: Querying a table whose column uses a Cassandra custom type (or a driver type outside all instanceof branches in getCassandraType) during type mapping at planning time.
Common situations: Tables created with custom C* types (e.g. legacy 'CustomType' classes); newly introduced Cassandra types used before connector support; cross-version clusters where the driver reports an unknown type.
Related errors
- NOT_SUPPORTED
- ARROW_FLIGHT_TYPE_ERROR
- PINOT_UNSUPPORTED_COLUMN_TYPE
- PINOT_UNSUPPORTED_COLUMN_TYPE
- NOT_SUPPORTED
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/baa591d2ecdbd4a6.
Report an issue: GitHub.