apache/beam · error · UnsupportedOperationException
Unsupported type:
Error message
Unsupported type:
What it means
TableSchema.parseDefaultExpression evaluates a column's DEFAULT/MATERIALIZED expression and converts the literal result to a Java value based on the column's TypeName. If the column type has no conversion case in this switch, it throws UnsupportedOperationException("Unsupported type: " + columnType), meaning defaults for that type are not implemented.
Solutions
- Remove the DEFAULT expression from the unsupported column in the schema, or set the default client-side/in the table DDL instead.
- Add a case for the needed TypeName in parseDefaultExpression and contribute/patch the connector.
- Handle UnsupportedOperationException when calling parse() on schemas that may contain such columns and skip default materialization for them.
Example fix
// before // schema: "tags Array(String) DEFAULT []" -> Unsupported type: ARRAY(Array...) // after // schema: "tags Array(String)" // no default expression
Defensive patterns
Strategy: try-catch
Validate before calling
if (column.getDefaultExpression() != null &&
Set.of("ARRAY","MAP","TUPLE","STRUCT","IPV4","IPV6","UUID","ENUM")
.contains(column.getType().getTypeName().name())) {
throw new IllegalStateException("default expressions unsupported for " + column.getType().getTypeName());
} Try / catch
try {
schema = TableSchema.parse(str);
} catch (IllegalArgumentException | UnsupportedOperationException e) {
// strip DEFAULT expressions from unsupported columns and retry, or skip defaults
} Prevention
- Avoid DEFAULT expressions on array/map/tuple columns when using the connector.
- Keep defaults in the ClickHouse table DDL rather than the parsed schema string.
- Check the connector version for supported default-expression types.
When it happens
Trigger: Parsing a schema whose column with a default expression has a TypeName not handled by the switch (e.g. ARRAY, MAP, STRUCT/TUPLE, or other complex types) — only numeric, string, bool, and decimal cases are implemented.
Common situations: Schemas containing DEFAULT expressions on composite types like Array(String) or Map(...), or newly added ClickHouse types that the Beam ClickHouse connector's default-expression support has not caught up with.
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
- char type not supported yet…
- Converting BigQuery type
- Converting to Beam schema type is not supported
- DateTime64 precision must be in [0, 9], got
- Decimal precision must be in [1, 76], got
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/5207add7129f6e89.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/java/io/clickhouse/src/main/java/org/apache/beam/sdk/io/clickhouse/TableSchema.java:451
case ENUM16:
case ENUM8:
case FIXEDSTRING:
case STRING:
return value;
case UINT8:
return Short.valueOf(value);
case UINT16:
return Integer.valueOf(value);
case UINT32:
return Long.valueOf(value);
case UINT64:
return Long.valueOf(value);
case BOOL:
return Boolean.valueOf(value);
case DECIMAL:
return new BigDecimal(value);
default:
throw new UnsupportedOperationException("Unsupported type: " + columnType);
}
}
abstract Builder toBuilder();
public static Builder builder() {
return new AutoValue_TableSchema_ColumnType.Builder();
}
@AutoValue.Builder
abstract static class Builder {
public abstract Builder typeName(TypeName typeName);
public abstract Builder arrayElementType(ColumnType arrayElementType);
public abstract Builder nullable(boolean nullable);
View on GitHub (pinned to 12126d8942)