apache/seatunnel · error · FileConnectorException
COMMON_ERROR_CODE-1
COMMON_ERROR_CODE-1
Error message
ReadColumn: unsupported ORC file column type:
What it means
OrcReadStrategy.readColumn encountered an ORC ColumnVector whose TypeDescription category has no case in the readColumn switch, so it cannot be converted to a SeaTunnel value. The library throws FileConnectorException with ILLEGAL_ARGUMENT because ORC types outside the supported set (e.g. exotic or newly added ORC categories) cannot be mapped. It is a hard fail of the read, not a data-value issue.
Source
Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/OrcReadStrategy.java:410
columnObj = readDecimalVal(colVec, dataType, rowNum);
break;
case TIMESTAMP:
columnObj = readTimestampVal(colVec, colType, dataType, rowNum);
break;
case STRUCT:
columnObj = readStructVal(colVec, colType, dataType, rowNum, charset);
break;
case LIST:
columnObj = readListVal(colVec, colType, rowNum);
break;
case MAP:
columnObj = readMapVal(colVec, colType, rowNum);
break;
case UNION:
columnObj = readUnionVal(colVec, colType, rowNum, charset);
break;
default:
throw new FileConnectorException(
CommonErrorCodeDeprecated.ILLEGAL_ARGUMENT,
"ReadColumn: unsupported ORC file column type: " + colVec.type.name());
}
}
return columnObj;
}
private Object readLongVal(
ColumnVector colVec,
TypeDescription colType,
SeaTunnelDataType<?> dataType,
int rowNum) {
Object colObj = null;
if (!colVec.isNull[rowNum]) {
LongColumnVector longVec = (LongColumnVector) colVec;
long longVal = longVec.vector[rowNum];
colObj = longVal;
if (colType.getCategory() == TypeDescription.Category.INT) {View on GitHub (pinned to cf67b549a7)
Solutions
- Inspect the ORC file schema (e.g. `orc-tools meta <file>` or Hive `describe`) and identify the unsupported column type name from the message.
- Exclude or cast the unsupported column before reading, or select only supported columns via readColumns configuration.
- Re-write the ORC file with supported types (e.g. convert exotic types to string/struct of primitives).
- If the type is common (e.g. a newer ORC category), add a case to readColumn in OrcReadStrategy and contribute upstream.
Example fix
// before (schema: col DECIMAL with unhandled variant) read columns: ["a", "mystery_col"] // after: restrict to supported columns read columns: ["a"] // or CAST mystery_col to STRING when writing the ORC file
Defensive patterns
Strategy: validation
Validate before calling
// Before reading, inspect the ORC schema and check every category
TypeDescription schema = reader.getSchema();
for (TypeDescription col : schema.getChildren()) {
Set<Category> supported = EnumSet.of(BOOLEAN, BYTE, SHORT, INT, LONG, FLOAT, DOUBLE,
STRING, VARCHAR, CHAR, DATE, TIMESTAMP, DECIMAL, BINARY, LIST, MAP, STRUCT, UNION);
if (!supported.contains(col.getCategory())) {
throw new IllegalStateException("Unsupported ORC column type: " + col.getCategory());
}
} Try / catch
try {
rows = orcSource.read();
} catch (FileConnectorException e) {
if (e.getMessage().contains("unsupported ORC file column type")) {
// fall back to reading file metadata, exclude the offending column, reconfigure
} else throw e;
} Prevention
- Run orc-tools meta on sample files before wiring the connector
- Keep source schemas to well-supported ORC primitives and simple containers
- Avoid nested/unusual ORC categories from newer engine writers
- Pin a consistent SeaTunnel + ORC version for writer and reader
When it happens
Trigger: Reading an ORC file whose schema contains a column type not handled by readColumn's switch (anything beyond the implemented primitives, struct, map, list, union cases); called from read, readStructVal, or unionValue while processing a row.
Common situations: ORC files written by newer Hive/Spark versions using ORC categories the connector doesn't cover; schema evolution adding an unsupported column; misconfigured seaTunnel schema implying a type the ORC reader can't materialize.
Related errors
- UNSUPPORTED_DATA_TYPE
- 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/f7b56e80cb219ab5.
Report an issue: GitHub.