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

[BigqueryIO] MoreObjects.firstNonNull should not be called with null as default value

Details

    • Bug
    • Status: Resolved
    • P1
    • Resolution: Fixed
    • None
    • None
    • io-java-gcp
    • None

    Description

      https://github.com/apache/beam/blob/2e0f79ef2b924da3306d0e55dffd4728809b9f3d/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWritesShardedRecords.java#L516 if streamName.read() returns null, firstNonNull will throw NullPointerException. We check the emptiness in the next line so it's ok for stream to be empty string, we should use empty string as the default value.

      Attachments

        Issue Links

          Activity

            People

              Buqian Buqian Zheng
              Buqian Buqian Zheng
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 1h 10m
                  1h 10m