apache/druid · error · UnsupportedColumnTypeException
Cannot handle column
Error message
Cannot handle column [%s] with type [%s]
What it means
FrameColumnWriters.create's switch over ColumnType falls through to default when the type family (or array element type within a family) has no corresponding writer. It throws UnsupportedColumnTypeException(column, type) naming the concrete unsupported type. This covers exotic complex types or array element types the frame writer cannot encode.
Solutions
- Cast the column to a supported type in the SQL/spec before frame writing
- Upgrade Druid so both sides support the type, or exclude the column from the output
- Check FrameColumnWriters.create's supported types before selecting columns for frame output
- File/patch support for the missing ColumnType case if legitimate
Example fix
// before SELECT someNewTypeCol FROM ... // after SELECT CAST(someNewTypeCol AS VARCHAR) AS someNewTypeCol FROM ...
Defensive patterns
Strategy: type-guard
Validate before calling
ColumnType t = signature.getColumnType(idx).orElse(null); if (t != null && !SUPPORTED_WRITE_TYPES.contains(t.getFamily())) { /* cast or drop */ } Type guard
boolean isWritableType(ColumnType t) { return t != null && (t.is(LONG)||t.is(FLOAT)||t.is(DOUBLE)||t.is(STRING)||t.isArray()||t.is(COMPLEX)); } Try / catch
try { writer = FrameColumnWriters.create(...); } catch (UnsupportedColumnTypeException e) { log.warn("Unwritable column {} type {}", e.getColumnName(), e.getColumnType()); } Prevention
- Cast unsupported types before frame output
- Keep writer-side and reader-side versions aligned
- Extend the switch when adding new ColumnTypes
When it happens
Trigger: Writing a frame column whose ColumnType is a family other than LONG/FLOAT/DOUBLE/STRING/ARRAY/COMPLEX branches (or an array with unsupported element type), e.g. a newly added type not yet mapped in the switch.
Common situations: Version skew where a writer node emits a type older readers/writers don't know; querying with expression results of new types; ingestion specs introducing complex types not supported by the frame format.
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
- 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/550b2180d049307f.
Report an issue: GitHub.
Appendix: source
Thrown at processing/src/main/java/org/apache/druid/frame/write/columnar/FrameColumnWriters.java:90
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:
return makeFloatArrayWriter(columnSelectorFactory, allocator, column);
case DOUBLE:
return makeDoubleArrayWriter(columnSelectorFactory, allocator, column);
default:
throw new UnsupportedColumnTypeException(column, type);
}
case COMPLEX:
return makeComplexWriter(columnSelectorFactory, allocator, column, type.getComplexTypeName());
default:
throw new UnsupportedColumnTypeException(column, type);
}
}
private static LongFrameColumnWriter makeLongWriter(
final ColumnSelectorFactory selectorFactory,
final MemoryAllocator allocator,
final String columnName
)
{
final ColumnCapabilities capabilities = selectorFactory.getColumnCapabilities(columnName);
final ColumnValueSelector<?> selector =
TypeCastSelectors.makeColumnValueSelector(selectorFactory, columnName, ColumnType.LONG);
return new LongFrameColumnWriter(selector, allocator, hasNullsForNumericWriter(capabilities));View on GitHub (pinned to 9b90983fd2)