apache/seatunnel · error · UnsupportedOperationException
Unsupported convert %s to %s
Error message
Unsupported convert %s to %s
What it means
BasicDataConverter.convert dispatches on the SeaTunnelDataType's SqlType and has no handler for the given type (e.g. ROW/ARRAY handled, but the value/type fell to default). It throws UnsupportedOperationException naming the value's Java class and the target SqlType, meaning this converter cannot transform that combination.
Source
Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/table/converter/BasicDataConverter.java:90
return convertLocalDate(value);
case TIME:
return convertTime(value);
case TIMESTAMP:
return convertLocalDateTime(value);
case TIMESTAMP_TZ:
return convertOffsetDateTime(value);
case BYTES:
return convertBytes(value);
case STRING:
return convertString(value);
case ROW:
return convertRow((SeaTunnelRowType) typeDefine, value);
case ARRAY:
return convertArray((ArrayType) typeDefine, value);
case MAP:
return convertMap((MapType) typeDefine, value);
default:
throw new UnsupportedOperationException(
"Unsupported convert "
+ value.getClass()
+ " to "
+ typeDefine.getSqlType());
}
}
@Override
default Object convert(T typeDefine, Column columnDefine, Object value) {
if (value == null) {
return null;
}
switch (columnDefine.getDataType().getSqlType()) {
case NULL:
return null;
case BOOLEAN:
return convertBoolean(typeDefine, value);
case TINYINT:View on GitHub (pinned to cf67b549a7)
Solutions
- Extend BasicDataConverter (or use the appropriate converter subclass) to handle the unsupported SqlType
- Flatten/simplify the schema to avoid the unsupported nested type
- Pre-convert the value before calling convert so its type matches a supported SqlType
Example fix
// before
converter.convert(mapType, rowValue); // ROW value with MAP/other type define
// after
switch (typeDefine.getSqlType()) {
case ROW: return convertRow((RowType) typeDefine, value); // handle the type explicitly
}
// or ensure value type matches typeDefine before calling convert Defensive patterns
Strategy: type-guard
Validate before calling
switch (typeDefine.getSqlType()) {
case ROW: case ARRAY: case MAP: break;
default: throw new IllegalArgumentException("Converter does not support " + typeDefine.getSqlType());
} Type guard
boolean convertible = typeDefine.getSqlType() == SqlType.ROW || typeDefine.getSqlType() == SqlType.ARRAY || typeDefine.getSqlType() == SqlType.MAP;
Try / catch
try { return converter.convert(typeDefine, value); } catch (UnsupportedOperationException e) { throw new IllegalStateException("Unsupported type in schema: " + e.getMessage(), e); } Prevention
- Match converter implementation to your schema's SqlTypes before running jobs
- Avoid unsupported nested types or pre-convert them to supported ones
- Add unit tests converting every type present in your schema
When it happens
Trigger: Calling convert(typeDefine, value) where typeDefine.getSqlType() is one not supported by this converter (e.g. MAP handled but ROW passed, or vice versa) — commonly reached indirectly through convertArray or convertRow converting nested elements.
Common situations: Sink connectors using BasicDataConverter on nested schemas containing exotic types (e.g. nested MAP inside ARRAY/ROW), or schema evolution introducing a type the converter was never written for.
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
- Unsupported convert ${value.getClass()} to Float, typeDefine
- Unsupported convert ${value.getClass()} to Float
- Unsupported convert ${value.getClass()} to Long, typeDefine:
- Unsupported convert ${value.getClass()} to Long
- Unsupported convert ${value.getClass()} to Integer, typeDefi
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/f45e1c8698483ac7.
Report an issue: GitHub.