apache/seatunnel · error · UnsupportedOperationException
Unsupported type: ${dataType}
Error message
Unsupported type: ${dataType} What it means
RowDataToAvroConverters.createConverter maps SeaTunnelRowType SQL type families to Avro row converters; any type outside the handled cases (ROW, MAP, and primitive branches) falls to default and throws UnsupportedOperationException because there is no Avro conversion path for it.
Source
Thrown at seatunnel-connectors-v2/connector-hudi/src/main/java/org/apache/seatunnel/connectors/seatunnel/hudi/sink/convert/RowDataToAvroConverters.java:201
@Override
public Object convert(Schema schema, Object object) {
BigDecimal javaDecimal = (BigDecimal) object;
return DECIMAL_CONVERSION.toFixed(
javaDecimal, schema, schema.getLogicalType());
}
};
break;
case ARRAY:
converter = createArrayConverter((ArrayType<?, ?>) dataType);
break;
case ROW:
converter = createRowConverter((SeaTunnelRowType) dataType);
break;
case MAP:
converter = createMapConverter(dataType);
break;
default:
throw new UnsupportedOperationException("Unsupported type: " + dataType);
}
// wrap into nullable converter
return new RowDataToAvroConverter() {
private static final long serialVersionUID = 1L;
@Override
public Object convert(Schema schema, Object object) {
if (object == null) {
return null;
}
// get actual schema if it is a nullable schema
Schema actualSchema;
if (schema.getType() == Schema.Type.UNION) {
List<Schema> types = schema.getTypes();
int size = types.size();
if (size == 2 && types.get(1).getType() == Schema.Type.NULL) {View on GitHub (pinned to cf67b549a7)
Solutions
- Change the offending column to a supported type via a Cast/SQL transform before the Hudi sink
- Flatten or convert the unsupported complex type (e.g. MAP<...> to string/JSON) upstream
- Upgrade SeaTunnel if a newer version added a converter for this type
- Extend createConverter with a new converter for the type if contributing
Example fix
// before: schema includes ARRAY<MAP<STRING,STRING>> (unsupported) // after: cast to STRING upstream SQL transform: SELECT CAST(my_array_col AS STRING) AS my_array_col, ...
Defensive patterns
Strategy: validation
Validate before calling
// before creating the sink, verify each field type is supported
for (SeaTunnelDataType<?> t : rowType.getFieldTypes()) {
if (!(t.getSqlType() == SqlType.ROW || t.getSqlType() == SqlType.MAP
|| t.getSqlType() == SqlType.STRING || t.getSqlType() == SqlType.INT
|| t.getSqlType() == SqlType.BOOLEAN /* ...primitives */)) {
throw new IllegalArgumentException("Unsupported type for Hudi sink: " + t);
}
} Try / catch
try {
sink.write(row);
} catch (UnsupportedOperationException e) {
LOG.error("Column type not supported by Hudi Avro conversion: {}", e.getMessage());
// route row to dead-letter or cast upstream and restart
} Prevention
- Cast complex columns to STRING/JSON before the Hudi sink
- Check connector docs for supported SeaTunnel types
- Bump SeaTunnel version if a needed converter was added upstream
When it happens
Trigger: A SeaTunnel schema (SeaTunnelRowType) passed to elementConverter/valueConverter contains a field whose SeaTunnelType has no case in createConverter's switch (e.g. certain array/nested or unsupported complex types).
Common situations: Reading from a source producing exotic types (e.g. specific array element types, bytes variants) and sinking to Hudi; schema evolution adding a new column type; version mismatch between SeaTunnel API types supported by the connector.
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 to derive Schema for type: ${dataType}
- Avro format doesn't support non-string as key type of map. T
- The Avro schema is not a nullable type: ${schema}
- Fail to serialize at field: ${fieldName}.
- COMMON-17
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/d4761925e0fe1d7a.
Report an issue: GitHub.