{"record":{"id":"648c724116fc664d","repo":"apache/beam","slug":"unable-to-map-v-to-pipepb-atomictype","errorCode":null,"errorMessage":"unable to map %v to pipepb.AtomicType","messagePattern":"unable to map (.+?) to pipepb\\.AtomicType","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/runtime/graphx/schema/schema.go","lineNumber":653,"sourceCode":"\t\t}\n\t\treturn &pipepb.FieldType{\n\t\t\tTypeInfo: &pipepb.FieldType_ArrayType{\n\t\t\t\tArrayType: &pipepb.ArrayType{\n\t\t\t\t\tElementType: vt,\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil\n\tcase reflect.Interface, reflect.Func, reflect.Chan, reflect.UnsafePointer, reflect.Complex128, reflect.Complex64, reflect.Invalid:\n\t\treturn nil, errors.Errorf(\"unable to convert unsupported type %v to schema\", ot)\n\tdefault: // must be an atomic type\n\t\tif enum, ok := reflectTypeToAtomicTypeMap[t.Kind()]; ok {\n\t\t\treturn &pipepb.FieldType{\n\t\t\t\tTypeInfo: &pipepb.FieldType_AtomicType{\n\t\t\t\t\tAtomicType: enum,\n\t\t\t\t},\n\t\t\t}, nil\n\t\t}\n\t\treturn nil, errors.Errorf(\"unable to map %v to pipepb.AtomicType\", t)\n\t}\n}\n\nvar reflectTypeToAtomicTypeMap = map[reflect.Kind]pipepb.AtomicType{\n\treflect.Uint8:   pipepb.AtomicType_BYTE,\n\treflect.Int16:   pipepb.AtomicType_INT16,\n\treflect.Int32:   pipepb.AtomicType_INT32,\n\treflect.Int64:   pipepb.AtomicType_INT64,\n\treflect.Float32: pipepb.AtomicType_FLOAT,\n\treflect.Float64: pipepb.AtomicType_DOUBLE,\n\treflect.String:  pipepb.AtomicType_STRING,\n\treflect.Bool:    pipepb.AtomicType_BOOLEAN,\n}\n\nvar reflectKindToTypeMap = map[reflect.Kind]reflect.Type{\n\treflect.Uint:    reflectx.Uint,\n\treflect.Uint8:   reflectx.Uint8,\n\treflect.Uint16:  reflectx.Uint16,","sourceCodeStart":635,"sourceCodeEnd":671,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/runtime/graphx/schema/schema.go#L635-L671","documentation":"Fallback error in reflectTypeToFieldType: the type's Kind was not in the unsupported-kinds blacklist and not present in reflectTypeToAtomicTypeMap, so no pipepb.AtomicType mapping exists. This catches kinds the switch fell through to the 'atomic' default but that Beam has no atomic representation for (e.g. uintptr, or exotic integer widths).","triggerScenarios":"Schema-encoding a struct whose field Kind is not in reflectTypeToAtomicTypeMap — e.g. uintptr, or a named type whose underlying kind is missing from the map.","commonSituations":"Using uintptr-typed handles or less common numeric kinds in Podo structs; also triggered when Beam adds new atomic types but user code relies on an older map.","solutions":["Change the field to a supported atomic type (int32/int64/float64/string/bool/[]byte etc.)","Register the type with schema.RegisterLogicalType to map it to an atomic representation","Check the reflectTypeToAtomicTypeMap in your Beam version for the list of supported kinds","Convert the value explicitly before placing it in a schema-encoded struct"],"exampleFix":"// before\ntype H struct { Handle uintptr }\n// after\ntype H struct { Handle uint64 }","handlingStrategy":"validation","validationCode":"k := field.Kind()\nif _, ok := supportedAtomicKinds[k]; !ok && k != reflect.Struct && k != reflect.Slice && k != reflect.Map {\n  return fmt.Errorf(\"kind %v has no atomic schema mapping\", k)\n}","typeGuard":null,"tryCatchPattern":"_, err := schema.FromType(t)\nif err != nil && strings.Contains(err.Error(), \"pipepb.AtomicType\") {\n  return fmt.Errorf(\"field kind lacks atomic mapping: %w\", err)\n}","preventionTips":["Stick to canonical numeric kinds: int/int32/int64/uint32/uint64/float32/float64","Avoid uintptr and exotic kinds in payload structs","Check reflectTypeToAtomicTypeMap for your Beam version before adding a field kind"],"tags":["go","apache-beam","schema","atomic-type"],"backgroundTag":"unsupported-dtype","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"}