apache/beam · error · UnsupportedOperationException
Unsupported Beam type: {typeName}
Error message
Unsupported Beam type: {typeName} What it means
addIcebergValue switches over the Beam field type's type name; any Beam FieldType that is not handled (e.g. MAP, unsupported logical types, or future Beam types) falls into the default branch and throws UnsupportedOperationException with the type name. This signals the Iceberg->Beam converter has no mapping for that column type.
Source
Thrown at sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/IcebergUtils.java:652
case ROW:
Schema nestedSchema =
checkArgumentNotNull(
field.getType().getRowSchema(),
"Corrupted schema: Row type did not have associated nested schema.");
if (icebergValue instanceof Record) {
rowBuilder.addValue(icebergRecordToBeamRow(nestedSchema, (Record) icebergValue));
} else if (icebergValue instanceof StructLike) {
rowBuilder.addValue(structToRow(nestedSchema, (StructLike) icebergValue));
} else {
throw new UnsupportedOperationException(
"Unsupported row type: " + icebergValue.getClass());
}
break;
case LOGICAL_TYPE:
rowBuilder.addValue(getLogicalTypeValue(icebergValue, field.getType()));
break;
default:
throw new UnsupportedOperationException(
"Unsupported Beam type: " + field.getType().getTypeName());
}
}
private static DateTime getBeamDateTimeValue(Object icebergValue) {
long micros;
if (icebergValue instanceof OffsetDateTime) {
micros = DateTimeUtil.microsFromTimestamptz((OffsetDateTime) icebergValue);
} else if (icebergValue instanceof LocalDateTime) {
micros = DateTimeUtil.microsFromTimestamp((LocalDateTime) icebergValue);
} else if (icebergValue instanceof Long) {
micros = (long) icebergValue;
} else if (icebergValue instanceof String) {
return DateTime.parse((String) icebergValue);
} else {
throw new UnsupportedOperationException(
"Unsupported Iceberg type for Beam type DATETIME: " + icebergValue.getClass());
}View on GitHub (pinned to 12126d8942)
Solutions
- Check the Beam version's IcebergUtils for supported type cases and upgrade Beam if a newer release added the missing mapping
- Avoid the unsupported column type: project only supported columns from the Iceberg table before conversion
- Extend the switch in a fork/build to map the missing typeName, and contribute the fix upstream
- If the field is unnecessary, drop it from the Beam schema so addIcebergValue never sees that type name
Example fix
// before
.add("tags", FieldType.map(FieldType.STRING, FieldType.STRING))
// after — use ITERABLE of nested row or upgrade Beam supporting MAP
.add("tags", FieldType.iterable(FieldType.row(new Schema(...)))) Defensive patterns
Strategy: fallback
Validate before calling
Set<String> unsupported = beamSchema.getFields().stream()
.map(f -> f.getType().getTypeName().name())
.filter(n -> !SUPPORTED_TYPE_NAMES.contains(n)).collect(Collectors.toSet());
if (!unsupported.isEmpty()) throw new IllegalArgumentException("Unsupported Beam types: " + unsupported); Type guard
boolean isConvertible(Schema.FieldType t) {
switch (t.getTypeName()) { case BYTE: case INT16: case INT32: case INT64:
case FLOAT: case DOUBLE: case STRING: case BOOLEAN: case DATETIME:
case DECIMAL: case ROW: case ITERABLE: case LOGICAL_TYPE: return true;
default: return false; }
} Try / catch
try {
row = icebergRecordToBeamRow(schema, record);
} catch (UnsupportedOperationException e) {
LOG.error("Beam type not supported by Iceberg IO: {}", e.getMessage());
// drop column / project narrower schema / route record to dead-letter
} Prevention
- Check supported-type tables in IcebergUtils before designing the schema
- Upgrade Beam when using MAP or other newly supported types
- Project only needed columns to avoid exotic types
When it happens
Trigger: A Beam schema declared for the Iceberg table contains a FieldType whose type name has no conversion case — commonly Beam FieldType.MAP when the table schema includes an Iceberg map column that the current converter version does not support, or an unusual LOGICAL_TYPE that getLogicalTypeValue can't handle is routed elsewhere but an exotic typeName like ITERABLE in an unexpected place hits default.
Common situations: Using a Beam version whose Iceberg IO predates map/struct support while the table schema contains those types; hand-written Beam schemas with exotic field types; upgrading Beam and new FieldType variants not yet mapped in IcebergUtils.
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
- Received null value for required field '{fieldName}'.
- Converting %s to Beam schema type is not supported
- Unable to generate coder for schema {schema}
- Expecting exactly one field, found
- The input schema must have exactly one field of type byte.
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/26b9f32164878d80.
Report an issue: GitHub.