{"record":{"id":"3b6630a5f4d63249","repo":"apache/beam","slug":"unknown-atomic-type-v","errorCode":null,"errorMessage":"unknown atomic type: %v","messagePattern":"unknown atomic type: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/runtime/graphx/schema/schema.go","lineNumber":767,"sourceCode":"var atomicTypeToReflectType = map[pipepb.AtomicType]reflect.Type{\n\tpipepb.AtomicType_BYTE:    reflectx.Uint8,\n\tpipepb.AtomicType_INT16:   reflectx.Int16,\n\tpipepb.AtomicType_INT32:   reflectx.Int32,\n\tpipepb.AtomicType_INT64:   reflectx.Int64,\n\tpipepb.AtomicType_FLOAT:   reflectx.Float32,\n\tpipepb.AtomicType_DOUBLE:  reflectx.Float64,\n\tpipepb.AtomicType_STRING:  reflectx.String,\n\tpipepb.AtomicType_BOOLEAN: reflectx.Bool,\n\tpipepb.AtomicType_BYTES:   reflectx.ByteSlice,\n}\n\nfunc (r *Registry) fieldTypeToReflectType(sft *pipepb.FieldType, opts []*pipepb.Option) (reflect.Type, error) {\n\tvar t reflect.Type\n\tswitch sft.GetTypeInfo().(type) {\n\tcase *pipepb.FieldType_AtomicType:\n\t\tvar ok bool\n\t\tif t, ok = atomicTypeToReflectType[sft.GetAtomicType()]; !ok {\n\t\t\treturn nil, errors.Errorf(\"unknown atomic type: %v\", sft.GetAtomicType())\n\t\t}\n\tcase *pipepb.FieldType_ArrayType:\n\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:","sourceCodeStart":749,"sourceCodeEnd":785,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/runtime/graphx/schema/schema.go#L749-L785","documentation":"Thrown by Registry.fieldTypeToReflectType when a pipepb.FieldType has an AtomicType value not present in the atomicTypeToReflectType lookup. This means the schema carries an atomic enum the Go registry does not know how to turn into a reflect.Type.","triggerScenarios":"ToType/fieldToStructField on a schema produced by another SDK or a newer Beam version whose pipepb.AtomicType enum value has no entry in atomicTypeToReflectType (e.g. DECIMAL or newer atomics without Go mapping).","commonSituations":"Cross-language pipelines where Java/Python write schemas containing atomic types Go doesn't map; running an older Go SDK against schemas emitted by a newer pipeline/runner.","solutions":["Upgrade the Go SDK so atomicTypeToReflectType covers the enum in the schema","Identify the offending AtomicType from the error text and change the producer to an atomic type Go supports","Wrap the value in a logical type that maps to a supported atomic (e.g. string) on the producer side","Log/inspect sft.GetAtomicType() and add a local mapping if you control the registry"],"exampleFix":"// before: producer uses AtomicType_DECIMAL unsupported in Go SDK vX\n// after: producer encodes amount as AtomicType_STRING (or upgrade Go SDK to a version mapping DECIMAL)","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"t, err := registry.ToType(s)\nif err != nil && strings.Contains(err.Error(), \"unknown atomic type\") {\n  return fmt.Errorf(\"schema uses an atomic type unsupported by this Go SDK: %w\", err)\n}","preventionTips":["Pin matching Beam versions across SDKs in cross-language pipelines","Prefer string/bytes/int64 for fields crossing language boundaries","Upgrade the Go SDK when producers emit newer atomic enum values"],"tags":["go","apache-beam","schema","atomic-type","cross-language"],"backgroundTag":"invalid-enum-value","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}