{"record":{"id":"c0dea707af075f53","repo":"apache/beam","slug":"too-many-inputs","errorCode":null,"errorMessage":"too many inputs","messagePattern":"too many inputs","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/graph/bind.go","lineNumber":167,"sourceCode":"\t\t}\n\t\tif len(params)-index < arity {\n\t\t\treturn nil, nil, addContext(errors.New(\"too few params\"), params[index:], input)\n\t\t}\n\n\t\tparamsToBind := params[index : index+arity]\n\t\telm, kind, err := tryBindInbound(input, paramsToBind, index == 0)\n\t\tif err != nil {\n\t\t\treturn nil, nil, addContext(err, paramsToBind, input)\n\t\t}\n\t\tinbound = append(inbound, elm)\n\t\tkinds = append(kinds, kind)\n\t\tindex += arity\n\t}\n\tif index < len(params) {\n\t\treturn nil, nil, addContext(errors.New(\"too few inputs: forgot an input or to annotate options?\"), params, in)\n\t}\n\tif index > len(params) {\n\t\treturn nil, nil, addContext(errors.New(\"too many inputs\"), params, in)\n\t}\n\treturn inbound, kinds, nil\n}\n\nfunc tryBindInbound(t typex.FullType, args []funcx.FnParam, isMain bool) (typex.FullType, InputKind, error) {\n\tkind := Main\n\tvar other typex.FullType\n\n\tswitch t.Class() {\n\tcase typex.Concrete, typex.Container:\n\t\tif isMain {\n\t\t\tother = typex.New(args[0].T)\n\t\t} else {\n\t\t\t// We accept various forms for side input. We have to disambiguate\n\t\t\t// []string into a Singleton of type []string or a Slice of type\n\t\t\t// string by matching up the incoming type and the param type.\n\n\t\t\targ := args[0]","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/graph/bind.go#L149-L185","documentation":"The mirror case of 4414: findInbound consumed all declared inputs but more parameters were supplied than the function can accept (index > len(params)). The transform was given too many inputs for its signature.","triggerScenarios":"Passing extra PCollections/side inputs to beam.ParDo, beam.Impulse-feeding combine functions, or calling a DoFn with more main inputs than ProcessElement declares and no remaining unbound slot.","commonSituations":"Copy-pasted transform calls where an extra collection argument was left in; combining functions given both a key and value collection while the signature only expects one.","solutions":["Remove the extra input argument from the transform call.","Extend the function signature with a parameter for the additional input if it is intentional.","Check whether an argument was accidentally duplicated (e.g. passing the same PCollection twice).","Confirm whether a CombineFn vs DoFn was intended — their arities differ."],"exampleFix":"// before\nbeam.ParDo(s, &fn{}, a, b) // fn takes one input\n// after\nbeam.ParDo(s, &fn{}, a)","handlingStrategy":"validation","validationCode":"if len(inputs) > fnArity {\n    return fmt.Errorf(\"%s accepts %d inputs, got %d\", fnName, fnArity, len(inputs))\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Trim unused input arguments at transform call sites.","Check for accidentally duplicated PCollections in variadic input lists.","Verify DoFn vs CombineFn usage — they expect different arities."],"tags":["go","beam","graph","arity-mismatch"],"backgroundTag":"invalid-argument-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"}