{"record":{"id":"7ae066e605d9666a","repo":"apache/beam","slug":"proto-type-s-is-unsupported","errorCode":null,"errorMessage":"proto type %s is unsupported.","messagePattern":"proto type (.+?) is unsupported\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/TableRowToStorageApiProto.java","lineNumber":1255,"sourceCode":"        tableFieldSchemaBuilder.setName(fieldNameFromProtoFieldDescriptor(fieldDescriptor));\n\n    switch (fieldDescriptor.getType()) {\n      case MESSAGE:\n        if (fieldDescriptor.getMessageType().getName().equals(\"TimestampPicos\")) {\n          tableFieldSchemaBuilder.setType(TableFieldSchema.Type.TIMESTAMP);\n          tableFieldSchemaBuilder.setPrecision(PICOSECOND_PRECISION);\n        } else {\n          tableFieldSchemaBuilder = tableFieldSchemaBuilder.setType(TableFieldSchema.Type.STRUCT);\n          TableSchema nestedTableField =\n              tableSchemaFromDescriptor(fieldDescriptor.getMessageType());\n          tableFieldSchemaBuilder =\n              tableFieldSchemaBuilder.addAllFields(nestedTableField.getFieldsList());\n        }\n        break;\n      default:\n        TableFieldSchema.Type type = PRIMITIVE_TYPES_PROTO_TO_BQ.get(fieldDescriptor.getType());\n        if (type == null) {\n          throw new UnsupportedOperationException(\n              \"proto type \" + fieldDescriptor.getType() + \" is unsupported.\");\n        }\n        tableFieldSchemaBuilder = tableFieldSchemaBuilder.setType(type);\n    }\n\n    if (fieldDescriptor.isRepeated()) {\n      tableFieldSchemaBuilder = tableFieldSchemaBuilder.setMode(TableFieldSchema.Mode.REPEATED);\n    } else if (fieldDescriptor.isRequired()) {\n      tableFieldSchemaBuilder = tableFieldSchemaBuilder.setMode(TableFieldSchema.Mode.REQUIRED);\n    } else {\n      tableFieldSchemaBuilder = tableFieldSchemaBuilder.setMode(TableFieldSchema.Mode.NULLABLE);\n    }\n    return tableFieldSchemaBuilder.build();\n  }\n\n  @VisibleForTesting\n  static DescriptorProto descriptorSchemaFromTableSchema(\n      com.google.api.services.bigquery.model.TableSchema tableSchema,","sourceCodeStart":1237,"sourceCodeEnd":1273,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/TableRowToStorageApiProto.java#L1237-L1273","documentation":"When converting a BigQuery TableFieldSchema back into a protobuf DescriptorProto, any protobuf field type that has no mapped BigQuery primitive type is rejected with an UnsupportedOperationException. It indicates the proto descriptor contains a type outside the supported primitive set (e.g. internal groups or message types handled elsewhere).","triggerScenarios":"fieldDescriptorFromTableField-based schema translation (proto -> BigQuery TableFieldSchema, used for CDC / schema propagation) encounters a FieldDescriptor type not present in PRIMITIVE_TYPES_PROTO_TO_BQ — e.g. GROUP type or unexpected message types falling into the default branch.","commonSituations":"Using custom/extended proto schemas with the Storage Write API; Beam internal schemas with group fields; version mismatches where a new proto type isn't mapped yet.","solutions":["Remove or flatten unsupported proto field types (groups, unsupported message fields) from the schema.","Ensure only fields backed by PRIMITIVE_TYPES_PROTO_TO_BQ entries reach this conversion.","Handle RECORD/message fields explicitly before the primitive branch so they don't fall through to default.","Upgrade the Beam version — newer releases map more types."],"exampleFix":"// before\nproto descriptor contains field of type GROUP reaching default branch\n// after\nif (fieldDescriptor.getType() == Type.GROUP) { recurse as nested record instead of treating as primitive }","handlingStrategy":"type-guard","validationCode":"boolean allSupported(Descriptor d) { return d.getFields().stream().allMatch(f -> f.isRepeated() || f.getType() != Type.GROUP && PRIMITIVE_TYPES.contains(f.getType()) || f.getMessageType() != null); }","typeGuard":"boolean isMappedPrimitive(FieldDescriptor fd) { return PRIMITIVE_TYPES_PROTO_TO_BQ.containsKey(fd.getType()); }","tryCatchPattern":"try { toTableSchema(descriptor); } catch (UnsupportedOperationException e) { LOG.error(\"Unmapped proto type: {}\", e.getMessage()); }","preventionTips":["Only feed proto descriptors built from supported primitive types","Recurse into message/group fields explicitly instead of letting them hit the default branch","Pin a recent Beam version where more proto types are mapped"],"tags":["bigquery","protobuf","unsupported-type","java"],"backgroundTag":"unsupported-enum-value","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}