-
Type:
Bug
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 2.10.0
-
Fix Version/s: 2.11.0
-
Component/s: io-java-gcp
-
Labels:None
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