{"record":{"id":"d711b4e44b16dbe3","repo":"apache/beam","slug":"unwindowed-coder-v-on-datasource-v-v","errorCode":null,"errorMessage":"unwindowed coder %v on DataSource %v: %v","messagePattern":"unwindowed coder (.+?) on DataSource (.+?): (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/runtime/exec/translate.go","lineNumber":78,"sourceCode":"\t\tif transform.GetSpec().GetUrn() != urnDataSource {\n\t\t\tcontinue\n\t\t}\n\t\tif len(transform.GetOutputs()) != 1 {\n\t\t\treturn nil, errors.Errorf(\"expected one output from DataSource, got %v\", transform.GetOutputs())\n\t\t}\n\n\t\tport, cid, err := unmarshalPort(transform.GetSpec().GetPayload())\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tu := &DataSource{UID: b.idgen.New()}\n\t\tu.Coder, err = b.coders.Coder(cid) // Expected to be windowed coder\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif !coder.IsW(u.Coder) {\n\t\t\treturn nil, errors.Errorf(\"unwindowed coder %v on DataSource %v: %v\", cid, id, u.Coder)\n\t\t}\n\n\t\t// There's only a single pair in this map, but a for loop range statement\n\t\t// is the easiest way to extract it, so this loop will iterate only once.\n\t\tfor key, pid := range transform.GetOutputs() {\n\t\t\tu.SID = StreamID{PtransformID: id, Port: port}\n\t\t\tu.Name = key\n\n\t\t\tu.Out, err = b.makePCollection(pid)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\t// Elide the PCollection Node for DataSources\n\t\t\t// DataSources can get byte samples directly, and can handle CoGBKs.\n\t\t\t// Copying the PCollection here is fine, as the PCollection will never\n\t\t\t// have used it's mutex yet.\n\t\t\tu.PCol = *u.Out.(*PCollection)\n\t\t\tu.Out = u.PCol.Out","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/runtime/exec/translate.go#L60-L96","documentation":"The DataSource node requires a windowed coder so elements carry window information. After resolving the coder from the plan's coder registry, UnmarshalPlan checks coder.IsW; if the coder is not windowed, plan construction fails with this error naming the coder id and transform.","triggerScenarios":"Runner sends a DataSource whose payload references a non-windowed coder id, during UnmarshalPlan/getOrCreatePlan.","commonSituations":"Runner/SDK protocol mismatch where the runner encodes raw coders without window wrapping; custom coder registration that bypasses windowing; older runners incompatible with the Go SDK's windowed-coder expectations.","solutions":["Ensure the runner window-encodes the coder for the DataSource (use graphx coders that wrap with window coders)","Align runner and Beam Go SDK versions","Check that custom coder registration isn't stripping the window coder wrapper"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Check coder is windowed before submitting pipeline\nc, _ := coders.Coder(cid)\nif c != nil && !coder.IsW(c) {\n    return fmt.Errorf(\"coder %s must be windowed for source\", cid)\n}","typeGuard":"func isWindowed(c *coder.Coder) bool { return c != nil && coder.IsW(c) }","tryCatchPattern":"if err := unmarshalPlan(desc); err != nil {\n    if strings.Contains(err.Error(), \"unwindowed coder\") {\n        // re-encode source coder with window wrapper and retry\n    }\n}","preventionTips":["Always encode source coders through graphx window-aware coder registry","Test cross-version runner/SDK compatibility in CI"],"tags":["go","apache-beam","coder","windowing"],"backgroundTag":"type-mismatch","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"}