Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-12960

Error unclear for structural DoFn

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.35.0
    • sdk-go
    • None

    Description

      I recently received the following error for my structural DoFn: "failed to find ProcessElement method". However, I had implemented ProcessElement - the error was that I failed to take the address of the DoFn struct as the parameter for the ParDo.

      I think this error could be much clearer. Taking a look at the implementation, I see that it somewhat is: https://github.com/apache/beam/blob/master/sdks/go/pkg/beam/core/graph/fn.go#L154. However, this error message doesn't match the implementation, which also accepts the struct as-is. I assume the struct is accepted here for other uses of `NewFn` (eg. `RegisterFunction`), as from my example above, for the `ParDo` case, this just goes on to surface a less-clear error deeper in the call chain.

      Attachments

        Issue Links

          Activity

            People

              jrmccluskey Jack McCluskey
              aahaselgrove Andrew Haselgrove
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m