apache/beam · error · UnsupportedOperationException
Unsupported type: <type.getClass()>
Error message
Unsupported type: <type.getClass()>
What it means
getFieldValue() recursively converts Delta kernel values into Beam values but only handles known DataType variants (Boolean, Byte, Short, Int, Long, Float, Double, String, Binary, Date, Timestamp, ArrayType, MapType, StructType). When the top-level column's DataType is anything else, it throws UnsupportedOperationException naming the Java class.
Source
Thrown at sdks/java/io/delta/src/main/java/org/apache/beam/sdk/io/delta/DeltaSourceDoFn.java:300
int size = mapValue.getSize();
ColumnVector keys = mapValue.getKeys();
ColumnVector values = mapValue.getValues();
DataType keyType = ((MapType) type).getKeyType();
DataType valueType = ((MapType) type).getValueType();
Map<Object, @Nullable Object> map = new LinkedHashMap<>(size);
for (int i = 0; i < size; i++) {
Object key = getVectorValue(keys, i, keyType);
if (key != null) {
map.put(key, getVectorValue(values, i, valueType));
}
}
return map;
} else if (type instanceof StructType) {
io.delta.kernel.data.Row nestedRow = row.getStruct(index);
Schema nestedBeamSchema = DeltaIO.ReadRows.convertToBeamSchema((StructType) type);
return toBeamRow(nestedRow, nestedBeamSchema);
}
throw new UnsupportedOperationException("Unsupported type: " + type.getClass());
}
// Returns the value at a specific index in a given column vector.
private static @Nullable Object getVectorValue(ColumnVector vector, int index, DataType type) {
if (vector.isNullAt(index)) {
return null;
}
if (type instanceof BooleanType) {
return vector.getBoolean(index);
} else if (type instanceof ByteType) {
return (int) vector.getByte(index);
} else if (type instanceof ShortType) {
return (int) vector.getShort(index);
} else if (type instanceof IntegerType) {
return vector.getInt(index);
} else if (type instanceof LongType) {
return vector.getLong(index);
} else if (type instanceof FloatType) {View on GitHub (pinned to 12126d8942)
Solutions
- Upgrade the Beam Delta IO connector and io.delta kernel to a version that supports the column type
- Inspect the table schema and identify the offending column/type
- Rewrite the table casting the unsupported column to a supported type (e.g. string, long)
- As a last resort, exclude the unsupported column by projecting a reduced schema before reading
Example fix
// before // column of unsupported kernel type read directly PCollection<Row> rows = input.apply(DeltaIO.read().withTable(path).withStartVersion(0L)); // after -- rewrite the table casting the unsupported column ALTER TABLE delta.`/path` ALTER COLUMN weird_col TYPE STRING; -- or rewrite via Spark with cast()
Defensive patterns
Strategy: validation
Validate before calling
// Inspect the table schema before reading and fail early on unknown types
StructType schema = /* snapshot.getSchema() via Delta client */;
for (StructField f : schema.fields()) {
if (!isSupportedBeamMapping(f.getDataType())) {
throw new IllegalStateException("Column " + f.getName() + " has unsupported type " + f.getDataType());
}
} Try / catch
try {
rows = input.apply(deltaIO);
} catch (UnsupportedOperationException e) {
if (e.getMessage().startsWith("Unsupported type:")) {
// identify column from schema, cast/rewrite table or upgrade connector
} else { throw e; }
} Prevention
- Check the table's protocol and types against connector support before onboarding it to Beam
- Keep beam-sdks-java-io-delta and io.delta kernel versions current
- Cast exotic columns to primitive types during table ETL
When it happens
Trigger: A Delta table column with a Delta Kernel DataType not covered by the conversion switch reaches toBeamRow() during processElement — typically a new/protocol-level type or a variant the connector has no mapping for.
Common situations: Reading tables written by a newer Delta protocol introducing new types; unhandled calendar-interval or variant/unparsed types in the schema; using a connector version older than the table's writer features.
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 vector type: <type.getClass()>
- Unsupported type: <type>
- Unsupported vector type: <type>
- Provided coders for type arguments of %s contain incompatibi
- Can't cast non-numeric types: +input
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/c11538eeff5097ed.
Report an issue: GitHub.