{"record":{"id":"ee88aa87d4bbc9e6","repo":"apache/beam","slug":"unable-to-convert-row-type-v","errorCode":null,"errorMessage":"unable to convert row type: %v","messagePattern":"unable to convert row type: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/runtime/graphx/schema/schema.go","lineNumber":788,"sourceCode":"\t\trt, err := r.fieldTypeToReflectType(sft.GetArrayType().GetElementType(), nil)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"unable to convert array element type\")\n\t\t}\n\t\tt = reflect.SliceOf(rt)\n\tcase *pipepb.FieldType_MapType:\n\t\tkt, err := r.fieldTypeToReflectType(sft.GetMapType().GetKeyType(), nil)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"unable to convert map key type\")\n\t\t}\n\t\tvt, err := r.fieldTypeToReflectType(sft.GetMapType().GetValueType(), nil)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"unable to convert map value type\")\n\t\t}\n\t\tt = reflect.MapOf(kt, vt) // Panics for invalid map keys (slices/iterables)\n\tcase *pipepb.FieldType_RowType:\n\t\trt, err := r.toType(sft.GetRowType().GetSchema())\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrapf(err, \"unable to convert row type: %v\", sft.GetRowType().GetSchema().GetId())\n\t\t}\n\t\tt = rt\n\t// case *pipepb.FieldType_IterableType:\n\t// TODO(BEAM-9615): handle IterableTypes (eg. CoGBK values)\n\n\tcase *pipepb.FieldType_LogicalType:\n\t\tlst := sft.GetLogicalType()\n\t\tidentifier := lst.GetUrn()\n\t\tlt, ok := r.logicalTypes[identifier]\n\t\tif !ok {\n\t\t\treturn nil, errors.Errorf(\"unknown logical type: %v\", identifier)\n\t\t}\n\t\tt = lt.GoType()\n\n\tdefault:\n\t\treturn nil, errors.Errorf(\"unknown fieldtype: %T\", sft.GetTypeInfo())\n\t}\n\tif sft.GetNullable() {","sourceCodeStart":770,"sourceCodeEnd":806,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/runtime/graphx/schema/schema.go#L770-L806","documentation":"Wraps a failure from r.toType() when converting a RowType's embedded Schema into a Go reflect.Type during map/row field conversion in schema.go. The schema ID is included in the message for diagnosis. It is thrown because a nested row's schema could not be translated (bad fields, unregistered logical types, etc.).","triggerScenarios":"fieldTypeToReflectType encountering *pipepb.FieldType_RowType whose GetSchema() fails toType conversion — e.g. a nested row containing a logical type missing from r.logicalTypes or a field type unknown to the Go converter.","commonSituations":"Cross-language pipelines (Python/Java producer, Go consumer) where nested rows carry types the Go SDK cannot represent; schema IDs referencing schemas not present in the encoded components.","solutions":["Read the wrapped inner error and the schema id in the message to locate the offending nested row","Ensure all logical types used in nested rows are registered in the Go process","Adjust the schema on the producing side to use Go-representable field types","Check schema encoding completeness when transporting graphs across language boundaries"],"exampleFix":"// before\nschema with field \"meta\" of unregistered logical type \"myco:custom\"\n// after\nschema.RegisterLogicalType(mycoCustomType{}) before toType/schema decoding, or change the field to a RowType of primitives","handlingStrategy":"validation","validationCode":"for _, f := range rowType.GetSchema().GetFields() {\n  if !goRepresentable(f.GetType()) { return fmt.Errorf(\"schema %s field %q unrepresentable\", rowType.GetSchema().GetId(), f.GetName()) }\n}","typeGuard":"func hasRegisteredLogicalTypes(s *pipepb.Schema, known map[string]bool) bool {\n  for _, f := range s.GetFields() {\n    if lt := f.GetType().GetLogicalType(); lt != nil && !known[lt.GetUrn()] { return false }\n  }\n  return true\n}","tryCatchPattern":"rt, err := r.toType(rowSchema)\nif err != nil { return fmt.Errorf(\"row %s: %w\", rowSchema.GetId(), err) }","preventionTips":["Prefer primitive/RowType fields over logical types for cross-language data","Register logical types before decoding any graph","Keep schemas simple and primitive-typed in nested rows","Confirm schema components are fully encoded when crossing language boundaries"],"tags":["go","beam","schema","row-type"],"backgroundTag":"schema-validation-failed","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"}