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

[Go SDK] passert.Count succeeds for empty PCollections.

Details

    • Improvement
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • None
    • 2.40.0
    • sdk-go
    • None

    Description

      https://github.com/apache/beam/blob/sdks/v2.39.0/sdks/go/pkg/beam/testing/passert/count.go#L28

      Since it's using a Combine to do the count, it never executes for empty Pcollections, and is unable to fail.

      The fix is: when count > 0, plumb the pcollection through as a side input to a DoFn that requires the side input to be non-empty. This would catch the empty PCollection case.

      Attachments

        Issue Links

          Activity

            People

              jrmccluskey Jack McCluskey
              lostluck Robert Burke
              Votes:
              0 Vote for this issue
              Watchers:
              1 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 - 3.5h
                  3.5h