apache/druid · error · ISE
Unsupported column type[%s]
Error message
Unsupported column type[%s]
What it means
ColumnTypeFactory.ofType() converts a source ColumnType into a canonical, interned ColumnType by recursively normalizing element types (e.g. arrays). Druid throws this ISE when the source type's root ValueType is neither ARRAY, COMPLEX, nor any of the known scalar types, meaning the type signature is corrupted or came from an unhandled future/foreign ValueType.
Source
Thrown at processing/src/main/java/org/apache/druid/segment/column/ColumnTypeFactory.java:72
case STRING:
return ColumnType.STRING;
case ARRAY:
switch (type.getElementType().getType()) {
case LONG:
return ColumnType.LONG_ARRAY;
case FLOAT:
return ColumnType.FLOAT_ARRAY;
case DOUBLE:
return ColumnType.DOUBLE_ARRAY;
case STRING:
return ColumnType.STRING_ARRAY;
default:
return ColumnType.ofArray(ofType(type.getElementType()));
}
case COMPLEX:
return INTERNER.intern(new ColumnType(ValueType.COMPLEX, type.getComplexTypeName(), null));
default:
throw new ISE("Unsupported column type[%s]", type.asTypeString());
}
}
public static ColumnType ofValueType(ValueType type)
{
switch (type) {
case LONG:
return ColumnType.LONG;
case FLOAT:
return ColumnType.FLOAT;
case DOUBLE:
return ColumnType.DOUBLE;
case STRING:
return ColumnType.STRING;
case COMPLEX:
return ColumnType.UNKNOWN_COMPLEX;
default:
throw new ISE("Unsupported column type[%s]", type);View on GitHub (pinned to 9b90983fd2)
Solutions
- Upgrade the Druid extension/version that produced the column type so both sides use the same ValueType enum
- Inspect the ColumnType being passed (log type.asTypeString()) and fix the code constructing it with an invalid ValueType
- If a new ValueType was added upstream, add a case for it in the ofType switch
Example fix
// before
ColumnType bad = new ColumnType(ValueType.valueOf("FLOAT"), null, null); // unknown/legacy value type
ColumnType fixed = ColumnTypeFactory.ofType(bad); // throws ISE
// after
ColumnType fixed = ColumnTypeFactory.ofType(ColumnType.FLOAT); // valid scalar type Defensive patterns
Strategy: type-guard
Validate before calling
if (type == null || type.getType() == null) { throw new IllegalArgumentException("ColumnType has no ValueType"); }
// ensure the root ValueType is one the factory handles before calling ofType Type guard
boolean isKnownValueType(ColumnType t) {
return t != null && EnumSet.of(ValueType.LONG, ValueType.FLOAT, ValueType.DOUBLE, ValueType.STRING, ValueType.COMPLEX, ValueType.ARRAY).contains(t.getType());
} Try / catch
try {
ColumnType canonical = ColumnTypeFactory.ofType(rawType);
} catch (ISE e) {
LOG.warn(e, "Unrecognized column type, falling back to UNKNOWN_COMPLEX");
canonical = ColumnType.UNKNOWN_COMPLEX;
} Prevention
- Never construct ColumnType with a hand-picked ValueType; use the constants on ColumnType
- Keep reader and writer Druid versions aligned across the cluster
- Log type.asTypeString() when type conversion fails to ease debugging
When it happens
Trigger: Calling ColumnTypeFactory.ofType() with a ColumnType whose ValueType falls into an unhandled switch default (e.g. a null-valued or newly introduced ValueType not covered by the switch), typically via type-signature deserialization or ArrayType/element-type recursion.
Common situations: Reading segments written by a newer Druid version that introduced a ValueType this build doesn't know; constructing ColumnType objects programmatically with an invalid ValueType; deserializing a corrupted or hand-edited segment/ingestion-spec type string.
Related errors
- Cannot handle column [%s] with type [%s]
- Cannot handle column [%s] with type [%s]
- Unhandled type: %s
- Aggregation [%s] does not support column [%s] of type [%s].
- Cannot deserialize type[%s] to an RoaringBitmap64Counter:
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/d6817238807bb49f.
Report an issue: GitHub.