apache/beam · error · UnsupportedOperationException
Unsupported type: {fieldType}
Error message
Unsupported type: {fieldType} What it means
SchemaUtils.getDataCatalogType converts Beam SQL (Calcite) column types into Data Catalog standard SQL types. When a field's type falls outside the handled cases (e.g. MAP and other exotic types are supported but anything hitting the default branch is not), the method throws UnsupportedOperationException. It signals that a column type in your schema cannot be represented in Data Catalog's type model.
Source
Thrown at sdks/java/extensions/sql/datacatalog/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/datacatalog/SchemaUtils.java:187
Schema.LogicalType<?, ?> logical = fieldType.getLogicalType();
if (SqlTypes.TIME.getIdentifier().equals(logical.getIdentifier())) {
return "TIME";
} else if (SqlTypes.DATE.getIdentifier().equals(logical.getIdentifier())) {
return "DATE";
} else if (SqlTypes.DATETIME.getIdentifier().equals(logical.getIdentifier())) {
return "DATETIME";
} else {
throw new UnsupportedOperationException("Unsupported logical type: " + logical);
}
case ROW:
return "STRUCT";
case MAP:
return String.format(
"MAP<%s,%s>",
getDataCatalogType(fieldType.getMapKeyType()),
getDataCatalogType(fieldType.getMapValueType()));
default:
throw new UnsupportedOperationException("Unsupported type: " + fieldType);
}
}
}
View on GitHub (pinned to 12126d8942)
Solutions
- Inspect the FieldType being passed and simplify the schema to use supported SQL types (e.g. primitive types, ARRAY, MAP if supported).
- Upgrade the Beam SDK version, as newer releases add more type mappings to SchemaUtils.
- If the type is genuinely unmappable, drop or coerce that column before registering the table with Data Catalog.
Example fix
// before
Field field = schema.getField("config"); // FieldType of unsupported logical type
// after
Schema simplified = Schema.builder().addStringField("config").build(); // use a supported type Defensive patterns
Strategy: validation
Validate before calling
// before registering with Data Catalog
schema.getFields().forEach(f -> {
if (!SUPPORTED_TYPES.contains(f.getType().getTypeName())) {
throw new IllegalArgumentException("Field " + f.getName() + " uses unsupported type " + f.getType());
}
}); Type guard
boolean isSupportedType(FieldType t) {
switch (t.getTypeName()) {
case BOOLEAN: case INTEGER: case BIGINT: case DOUBLE: case STRING: case DATE: case TIMESTAMP: case ARRAY: case MAP: return true;
default: return false;
}
} Try / catch
try {
DataCatalogSchemaUtils.toStandardSqlType(schema);
} catch (UnsupportedOperationException e) {
// inspect e.getMessage() for the offending type, simplify schema or skip field
} Prevention
- Prefer primitive types and well-supported composites in Beam schemas destined for Data Catalog.
- Keep the Beam SDK version current so newly added FieldTypes have mappings.
- Unit-test schema conversion with your production schema before deployment.
When it happens
Trigger: Calling getDataCatalogType (directly or via colBuilder during schema conversion) with a FieldType that has no mapping in the switch statement, e.g. unsupported nested or logical types.
Common situations: Creating a Data Catalog table from a Beam schema containing types newly added to Beam that SchemaUtils has not been updated to map; using MAP/complex types in an older Beam version where only some cases were implemented.
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
- Arrow schema conversion does not support Beam type '%s' for
- Schema has to contain '%s' field
- key field type should be STRING but was %s
- Schema fields count: '%s' does not fit columnsMapping count:
- columnsMapping '%s' does not fit to schema field names '%s'
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/be8f33e8e7638984.
Report an issue: GitHub.