apache/beam · error

unexpected param kind

Error message

unexpected param kind: %v

What it means

Defensive guard in tryBindInbound's default branch: the side-input parameter's funcx kind is none of the known cases (FnValue, FnIter, FnReIter, FnMultiMap). Because the switch above exhausts all exported ParamKinds for side inputs, hitting this means an unrecognized ParamKind value — effectively a Beam library/registration bug rather than a user pipeline error.

Solutions

  1. Report a Beam bug with the DoFn signature that triggers it
  2. Verify Beam SDK versions match across the pipeline (no mixed-version registrations)
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at sdks/go/pkg/beam/core/graph/bind.go:221 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/20901d4b4546d0e8. Report an issue: GitHub.

Appendix: source

Thrown at sdks/go/pkg/beam/core/graph/bind.go:221

				kind = Iter
				other = typex.New(trimmed[0])

			case funcx.FnReIter:
				values, _ := funcx.UnfoldReIter(args[0].T)
				trimmed := trimIllegal(values)
				if len(trimmed) != 1 {
					return nil, kind, errors.Errorf("%v cannot bind to %v", t, args[0])
				}

				kind = ReIter
				other = typex.New(trimmed[0])

			case funcx.FnMultiMap:
				return nil, kind, errors.Errorf("input to MultiMap side input must be KV, got %v", t)

			default:
				return nil, kind, errors.Errorf("unexpected param kind: %v", arg)
			}
		}
	case typex.Composite:
		switch t.Type() {
		case typex.KVType:
			if isMain {
				if args[0].Kind != funcx.FnValue {
					return nil, kind, errors.Errorf("key of %v cannot bind to %v", t, args[0])
				}
				if args[1].Kind != funcx.FnValue {
					return nil, kind, errors.Errorf("value of %v cannot bind to %v", t, args[1])
				}
				other = typex.NewKV(typex.New(args[0].T), typex.New(args[1].T))
			} else {
				switch args[0].Kind {
				case funcx.FnIter:
					values, _ := funcx.UnfoldIter(args[0].T)
					trimmed := trimIllegal(values)

View on GitHub (pinned to 12126d8942)