{"record":{"id":"b7debef788c464d9","repo":"apache/beam","slug":"builddescriptor-failed-to-handle-coder-on-stage-v-for-side","errorCode":null,"errorMessage":"buildDescriptor: failed to handle coder on stage %v for side input %+v, pcol %q %v:\n%w","messagePattern":"buildDescriptor: failed to handle coder on stage (.+?) for side input %\\+v, pcol %q (.+?):\n%w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/prism/internal/stage.go","lineNumber":582,"sourceCode":"\t\tcol2Coders[o.Global] = engine.PColInfo{\n\t\t\tGlobalID:    o.Global,\n\t\t\tWindowCoder: winCoder,\n\t\t\tWDec:        wDec,\n\t\t\tWEnc:        wEnc,\n\t\t\tEDec:        ed,\n\t\t\tKeyDec:      kd,\n\t\t}\n\t\ttransforms[sinkID] = sinkTransform(sinkID, portFor(wOutCid, wk), o.Global)\n\t}\n\n\tvar prepareSides []func(b *worker.B, watermark mtime.Time)\n\tfor _, si := range stg.sideInputs {\n\t\tcol := clonePColToBundle(si.Global)\n\n\t\toCID := col.GetCoderId()\n\t\tnCID, err := lpUnknownCoders(oCID, coders, comps.GetCoders())\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"buildDescriptor: failed to handle coder on stage %v for side input %+v, pcol %q %v:\\n%w\", stg.ID, si, si.Global, prototext.Format(col), err)\n\t\t}\n\t\tif oCID != nCID {\n\t\t\t// Add a synthetic PCollection set with the new coder.\n\t\t\tnewGlobal := si.Global + \"_prismside\"\n\t\t\tpcollections[newGlobal] = &pipepb.PCollection{\n\t\t\t\tDisplayData:         col.GetDisplayData(),\n\t\t\t\tUniqueName:          col.GetUniqueName(),\n\t\t\t\tCoderId:             nCID,\n\t\t\t\tIsBounded:           col.GetIsBounded(),\n\t\t\t\tWindowingStrategyId: col.WindowingStrategyId,\n\t\t\t}\n\t\t\t// Update side inputs to point to new PCollection with any replaced coders.\n\t\t\ttransforms[si.Transform].GetInputs()[si.Local] = newGlobal\n\t\t\t// TODO: replace si.Global with newGlobal?\n\t\t}\n\t\tprepSide, err := handleSideInput(si, comps, transforms, pcollections, coders, em)\n\t\tif err != nil {\n\t\t\tslog.Error(\"buildDescriptor: handleSideInputs\", \"error\", err, slog.String(\"transformID\", si.Transform))","sourceCodeStart":564,"sourceCodeEnd":600,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/stage.go#L564-L600","documentation":"Side input PCollections must have coders that can be rewritten to concrete portable coders before a stage runs. If lpUnknownCoders fails on the side input's coder ID, prism cannot materialize the side input data and aborts stage construction, reporting the stage, side input, and PCollection proto.","triggerScenarios":"lpUnknownCoders(oCID, coders, comps.GetCoders()) errors while processing a stage's sideInputs — coder referenced by the side input PCollection is unknown or has unresolvable components.","commonSituations":"Side inputs whose elements use custom coders; cross-language side inputs; malformed component graph after fusion/optimization.","solutions":["Check the wrapped error for the specific unknown coder URN/ID","Register or replace the custom coder with a standard (LP-representable) coder","Verify side input PCollection coders exist in components.coders","Test with default coders to confirm the coder is the cause"],"exampleFix":"// before\nsi := beam.SideInput{...} // element coder unknown to runner\n// after\npc := beam.Create(p, myItems...)\nbeam.RegisterCoder(reflect.TypeOf(MyType{}), encodeFn, decodeFn) // make coder portable","handlingStrategy":"validation","validationCode":"// Ensure side input is KV-encodable with known coders before use\nif _, ok := comps.GetCoders()[sideInputPcol.GetCoderId()]; !ok {\n    return fmt.Errorf(\"side input coder %q unknown\", sideInputPcol.GetCoderId())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer standard coders for side inputs","Avoid unregistered custom coders in cross-language side inputs","Verify with a small pipeline that side inputs materialize"],"tags":["beam","prism","side-input","coder"],"backgroundTag":"resource-not-found","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"}