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

SpannerIO: unspecified key column value causes NPE

Details

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 2.10.0
    • 2.11.0
    • io-java-gcp
    • None

    Description

      When creating a Mutation, if a column value is unspecified where the column is a table key would cause an NPE:

      Original exception report in 2.5.0
      Caused by: java.lang.NullPointerException 
      at org.apache.beam.sdk.io.gcp.spanner.MutationGroupEncoder.encodeKey(MutationGroupEncoder.java:489) 
      at org.apache.beam.sdk.io.gcp.spanner.SpannerIO$SerializeMutationsFn.processElement(SpannerIO.java:922) 

      Link to line of code: 
      https://github.com/apache/beam/blob/29bf6b7ef7092dc11385af935a60bfad2db1a531/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/MutationGroupEncoder.java#L489

      That code has been moved to MutationKeyEncoder in BEAM 2.9.0

      Attachments

        Activity

          People

            nielm Niel Markwick
            nielm Niel Markwick
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: