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

Improve error message when DoFn @ProcessElement has the wrong window type

Details

    • Improvement
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • None
    • 2.2.0
    • sdk-java-core

    Description

      The message today is something like this:

      processElement(org.apache.beam.sdk.transforms.DoFn$ProcessContext,org.apache.beam.sdk.transforms.windowing.IntervalWindow) expects window type org.apache.beam.sdk.transforms.windowing.IntervalWindow, which is not a supertype of actual window type org.apache.beam.sdk.transforms.windowing.GlobalWindow
      

      Someone suggested this:

      processElement(org.apache.beam.sdk.transforms.DoFn$ProcessContext,org.apache.beam.sdk.transforms.windowing.IntervalWindow) unable to provide window --  expects window type org.apache.beam.sdk.transforms.windowing.IntervalWindow (from parameter), which is not a supertype of actual window type org.apache.beam.sdk.transforms.windowing.GlobalWindow (assigned by windowing)
      

      If anyone wants to pick this up and wordsmith it more, strip some of the namespaces (where reasonable), etc, that would be great.

      Attachments

        Issue Links

          Activity

            People

              danoliveira Daniel Oliveira
              kenn Kenneth Knowles
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: