apache/druid · error · UnsupportedColumnTypeException
Cannot handle column [%s] with type [%s]
Error message
Cannot handle column [%s] with type [%s]
What it means
FieldReaders.create dispatches on a column's ColumnType to build the matching frame field reader; array subtypes fall through to a default arm that throws UnsupportedColumnTypeException (message 'Cannot handle column [%s] with type [%s]'). This error [986] corresponds to the array-switch default: an array column of a leaf type the frame format cannot represent.
Source
Thrown at processing/src/main/java/org/apache/druid/frame/field/FieldReaders.java:78
case COMPLEX:
return ComplexFieldReader.createFromType(columnType);
case ARRAY:
switch (Preconditions.checkNotNull(columnType.getElementType().getType(), "array elementType")) {
case STRING:
return new StringArrayFieldReader();
case LONG:
return new LongArrayFieldReader();
case FLOAT:
return new FloatArrayFieldReader(frameType);
case DOUBLE:
return new DoubleArrayFieldReader(frameType);
default:
throw new UnsupportedColumnTypeException(columnName, columnType);
}
// Fall through to error for other array types
default:
throw new UnsupportedColumnTypeException(columnName, columnType);
}
}
}
View on GitHub (pinned to 9b90983fd2)
Solutions
- Check the actual column type in the error message; avoid materializing that type into frames (cast or flatten the column first).
- Use only supported array element types (LONG/FLOAT/DOUBLE arrays) in queries routed through the frame processor.
- If string/complex arrays are needed, keep them out of MSQ frame shuffles or convert to a supported representation.
- Upgrade Druid if a newer version added reader support for that array type.
Example fix
// before SELECT arr_col FROM ... -- arr_col is VARCHAR ARRAY, fails in frame creation // after SELECT ARRAY_TO_STRING(arr_col, ',') AS arr_col FROM ... -- or ARRAY_LONG cast
Defensive patterns
Strategy: validation
Validate before calling
if (columnType != null && columnType.getType() == ValueType.ARRAY
&& !EnumSet.of(ValueType.LONG, ValueType.FLOAT, ValueType.DOUBLE).contains(columnType.getElementType().getType())) {
throw new IllegalStateException("array element type not frame-supported: " + columnType);
} Try / catch
try { FieldReaders.create(name, t); } catch (UnsupportedColumnTypeException e) { /* coerce/cast column or fall back to non-frame path */ } Prevention
- Restrict frame-shuffled columns to LONG/FLOAT/DOUBLE arrays
- Cast unsupported arrays (e.g. to VARCHAR or ARRAY<DOUBLE>) upstream
- Check ColumnType support before planning MSQ stages
When it happens
Trigger: Calling FieldReaders.create(columnName, columnType) for an ARRAY column whose element type is unsupported by the frame readers (the switch handles LONG/FLOAT/DOUBLE arrays; other array element types hit the default).
Common situations: Attempting to write/query frames containing exotic array types (e.g. string arrays or complex arrays) that the frame processor does not support; ingest producing array columns from nested data and then materializing them as frames (MSQ shuffle).
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Cannot handle column [%s] with type [%s]
- Cannot handle column [%s] with unknown type
- Unsupported column type[%s]
- Aggregation [%s] does not support column [%s] of type [%s].
- endFrame[%,d] > numFrames[%,d]
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/95a399eabbd91dd9.
Report an issue: GitHub.