apache/beam · error · RuntimeException
Does not support converting unknown type value: " + beamFiel
Error message
Does not support converting unknown type value: " + beamFieldTypeName
What it means
Thrown as RuntimeException from the default branch of convertAvroFormat's TypeName switch when the Beam field's type name is none of the handled cases (BYTE/INT16/INT32/INT64/FLOAT/DOUBLE/STRING/BYTES/BOOLEAN/DATETIME/DECIMAL/ARRAY/LOGICAL_TYPE/ROW/MAP). The BigQuery Avro converter does not know how to decode an Avro value into that Beam type.
Source
Thrown at sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryUtils.java:1085
String.format(
"Unknown timestamp truncation option: %s", options.getTruncateTimestamps()));
}
} else if (logicalType instanceof PassThroughLogicalType) {
return convertAvroFormat(logicalType.getBaseType(), avroValue, options);
} else {
throw new RuntimeException("Unknown logical type " + identifier);
}
case ROW:
Schema rowSchema = beamFieldType.getRowSchema();
if (rowSchema == null) {
throw new IllegalArgumentException("Nested ROW missing row schema");
}
GenericData.Record record = (GenericData.Record) avroValue;
return toBeamRow(record, rowSchema, options);
case MAP:
return convertAvroRecordToMap(beamFieldType, avroValue, options);
default:
throw new RuntimeException(
"Does not support converting unknown type value: " + beamFieldTypeName);
}
}
private static ReadableInstant safeToMillis(Object value) {
long subMilliPrecision = ((long) value) % 1000;
if (subMilliPrecision != 0) {
throw new IllegalArgumentException(
String.format(
"BigQuery data contained value %s with sub-millisecond precision, which Beam does"
+ " not currently support."
+ " You can enable truncating timestamps to millisecond precision"
+ " by using BigQueryIO.withTruncatedTimestamps",
value));
} else {
return truncateToMillis(value);
}
}View on GitHub (pinned to 12126d8942)
Solutions
- Upgrade the Beam SDK so the switch covers the type name shown in the error.
- Change the offending schema field to a supported type (primitive, ARRAY, ROW, MAP, DATETIME, DECIMAL, or known logical type).
- Check for Beam version skew between the component that produced the schema and the one converting it.
- If you control the fork, add the missing TypeName case to convertAvroFormat.
Example fix
// before FieldType bad = FieldType.iterable(FieldType.INT32); // exotic container // after FieldType ok = FieldType.array(FieldType.INT32); // ARRAY handled by converter
Defensive patterns
Strategy: validation
Validate before calling
// Java: whitelist supported TypeNames before conversion
Set<TypeName> ok = EnumSet.of(TypeName.BYTE, TypeName.INT16, TypeName.INT32, TypeName.INT64,
TypeName.FLOAT, TypeName.DOUBLE, TypeName.STRING, TypeName.BYTES, TypeName.BOOLEAN,
TypeName.DATETIME, TypeName.DECIMAL, TypeName.ARRAY, TypeName.LOGICAL_TYPE,
TypeName.ROW, TypeName.MAP);
schema.getFields().forEach(f -> {
if (!ok.contains(f.getType().getTypeName())) throw new IllegalStateException("Unsupported: " + f.getType());
}); Type guard
// Java
static boolean isConvertibleTypeName(TypeName tn) {
return tn.isPrimitiveType() || tn == TypeName.ARRAY || tn == TypeName.ROW
|| tn == TypeName.MAP || tn == TypeName.DATETIME || tn == TypeName.DECIMAL
|| tn == TypeName.LOGICAL_TYPE;
} Try / catch
try { ... } catch (RuntimeException e) { if (e.getMessage().startsWith("Does not support converting unknown type value")) { log.error("Field type {} unsupported; fix schema or upgrade Beam", e.getMessage()); } throw e; } Prevention
- Keep Beam SDK versions aligned so new TypeNames are handled by the converter.
- Stick to documented BigQueryIO-supported schema types when defining Beam schemas.
When it happens
Trigger: Beam schema containing a TypeName not covered by the switch — typically from schema evolution/beam version skew introducing a new TypeName, or a malformed/custom schema fed to BigQueryIO.readTableRows' avro conversion path.
Common situations: Running older Beam against schemas produced by newer Beam (new TypeName constants); programmatically built schemas with exotic types; incorrect deserialization producing a garbage type name.
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
- is not primitive type.
- Unexpected beam type " + fieldSchema
- Error converting field :
- Unknown timestamp truncation option: %s
- Unknown logical type
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/768b0b7e4df22bc3.
Report an issue: GitHub.