apache/seatunnel · error · FileConnectorException
UNSUPPORTED_DATA_TYPE
UNSUPPORTED_DATA_TYPE
Error message
Orc file not support this type [%s]
What it means
Thrown by OrcWriteStrategy.buildFieldWithRowType when a SeaTunnel column type cannot be mapped to an ORC TypeDescription. Only known types (INT, STRING, MAP, LIST, STRUCT, etc.) are supported; SQL type NULL and any unmapped/default type reach the default branch and abort schema construction.
Source
Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/writer/OrcWriteStrategy.java:224
case DATE:
return TypeDescription.createDate();
case TIME:
case TIMESTAMP:
return TypeDescription.createTimestamp();
case ROW:
TypeDescription struct = TypeDescription.createStruct();
SeaTunnelDataType<?>[] fieldTypes = ((SeaTunnelRowType) type).getFieldTypes();
for (int i = 0; i < fieldTypes.length; i++) {
struct.addField(
((SeaTunnelRowType) type).getFieldName(i),
buildFieldWithRowType(fieldTypes[i]));
}
return struct;
case NULL:
default:
String errorMsg =
String.format("Orc file not support this type [%s]", type.getSqlType());
throw new FileConnectorException(
CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE, errorMsg);
}
}
private TypeDescription buildSchemaWithRowType() {
TypeDescription schema = TypeDescription.createStruct();
for (Integer i : sinkColumnsIndexInRow) {
TypeDescription fieldType = buildFieldWithRowType(seaTunnelRowType.getFieldType(i));
schema.addField(seaTunnelRowType.getFieldName(i).toLowerCase(), fieldType);
}
return schema;
}
private void setColumn(Object value, ColumnVector vector, int row) {
if (value == null) {
vector.isNull[row] = true;
vector.noNulls = false;
} else {View on GitHub (pinned to cf67b549a7)
Solutions
- Remove or replace NULL/unsupported typed columns in the upstream schema before the ORC sink (use a transform to cast to STRING or drop the column)
- Explicitly declare sink columns with supported ORC-mappable types instead of relying on schema auto-derivation
- Check the source connector's produced SeaTunnelRowType for unmapped SqlTypes and upgrade/patch that connector
- Extend the type mapping switch in a custom write strategy if you need the type
Example fix
// before
Column c = new Column("extra", SeaTunnelRowType.NULL, 0); // reaches default branch
// after
Column c = new Column("extra", BasicType.STRING_TYPE, 0); // cast value to string upstream Defensive patterns
Strategy: validation
Validate before calling
// validate all sink columns are ORC-mappable before the job
List<SqlType> bad = rowType.getFieldTypes().stream()
.map(t -> ((SeaTunnelDataType<?>) t).getSqlType())
.filter(t -> t == SqlType.NULL)
.collect(Collectors.toList());
if (!bad.isEmpty()) throw new IllegalArgumentException("Unmappable ORC columns: " + bad); Type guard
boolean isOrcMappable(SqlType t) {
return t != SqlType.NULL; // and not in connector's known-unmapped set
} Try / catch
try {
orcSink.write(row);
} catch (FileConnectorException e) {
if (CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE.equals(e.getErrorCode())
&& e.getMessage().startsWith("Orc file not support")) {
// add a transform to cast/drop the offending column, rerun
}
} Prevention
- Declare sink schema columns explicitly with supported types
- Cast NULL-typed or exotic columns to STRING in an upstream transform
- Check the source connector's emitted SeaTunnelRowType for unmapped SqlTypes
- Keep connector version updated for broader ORC type coverage
When it happens
Trigger: Source SeaTunnelRowType contains a column whose SqlType is NULL or otherwise not in the ORC mapping switch (e.g. an unsupported/unknown type from a custom or auto-generated schema).
Common situations: Sink schema auto-derived from a source that emits SeaTunnelRow.NULL / unknown types; transform added a column with an exotic type; custom serializer returning unmapped SqlTypes; using `null` typed placeholder columns in config.
Related errors
- COMMON_ERROR_CODE-1
- Unsupported type:
- Unsupported SQL type:
- Vitess CDC bootstrap schema does not support catalog SQL typ
- UNSUPPORTED_DATA_TYPE
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/26ba32e59a800702.
Report an issue: GitHub.