apache/druid · error · UnsupportedColumnTypeException
Cannot handle column
Error message
Cannot handle column [%s] with unknown type
What it means
FrameColumnWriters.create builds a column writer for the given ColumnType. A null type means the RowSignature never assigned a type to the column, so no writer can be chosen; it throws UnsupportedColumnTypeException(column, null) immediately. This fails fast at frame-writing time for untyped columns.
Solutions
- Give every column an explicit type in the RowSignature or ingestion spec
- CAST untyped expressions in the SQL (e.g. CAST(x AS BIGINT)) before they reach frame writing
- Fix schema-inference code so it never yields null ColumnTypes
Example fix
// before
.add("nullableCol", null)
// after
.add("nullableCol", ColumnType.STRING) Defensive patterns
Strategy: validation
Validate before calling
Preconditions.checkNotNull(signature.getColumnType(colIdx).orElse(null), "Column %s must be typed", column);
Type guard
boolean writableColumnType(ColumnType t) { return t != null; } Try / catch
try { FrameColumnWriters.create(...); } catch (UnsupportedColumnTypeException e) { /* assign a type and rebuild the writer */ } Prevention
- Never build RowSignature entries without types
- CAST NULL/untyped expressions in SQL
- Validate signatures before FrameWriterFactory creation
When it happens
Trigger: Calling FrameColumnWriters.create (via FrameWriterFactory/FrameWriterUtils pipelines) with a signature column whose ColumnType is null — e.g. a signature built from inferred or external schema without a type.
Common situations: Ingestion/MSQ specs selecting untyped expressions (NULL literals, untyped nested queries); programmatic RowSignature building omitting types; schema inference returning nothing for empty input.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Cannot handle column
- Cannot handle column
- Cannot create comparator for array type
- Cannot handle column
- Cannot handle column
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/cbf20db80f95a0bf.
Report an issue: GitHub.
Appendix: source
Thrown at processing/src/main/java/org/apache/druid/frame/write/columnar/FrameColumnWriters.java:67
private FrameColumnWriters()
{
// No instantiation.
}
/**
* Helper used by {@link ColumnarFrameWriterFactory}.
*
* @throws UnsupportedColumnTypeException if "type" cannot be handled
*/
static FrameColumnWriter create(
final ColumnSelectorFactory columnSelectorFactory,
final MemoryAllocator allocator,
final String column,
final ColumnType type
)
{
if (type == null) {
throw new UnsupportedColumnTypeException(column, null);
}
switch (type.getType()) {
case LONG:
return makeLongWriter(columnSelectorFactory, allocator, column);
case FLOAT:
return makeFloatWriter(columnSelectorFactory, allocator, column);
case DOUBLE:
return makeDoubleWriter(columnSelectorFactory, allocator, column);
case STRING:
return makeStringWriter(columnSelectorFactory, allocator, column);
case ARRAY:
switch (type.getElementType().getType()) {
case STRING:
return makeStringArrayWriter(columnSelectorFactory, allocator, column);
case LONG:
return makeLongArrayWriter(columnSelectorFactory, allocator, column);
case FLOAT:View on GitHub (pinned to 9b90983fd2)