Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix NPE when emitting null BigQuery record fields.
When a record field on a class were marshalling is null, we used to throw an exception. java.lang.NullPointerException at com.google.appengine.tools.mapreduce.impl.BigQueryDataMarshallerByType.mapFieldNameToValue(BigQueryDataMarshallerByType.java:54) at com.google.appengine.tools.mapreduce.impl.BigQueryDataMarshallerByType.mapFieldNameToValue(BigQueryDataMarshallerByType.java:72) at com.google.appengine.tools.mapreduce.impl.BigQueryMarshallerByType.toBytes(BigQueryMarshallerByType.java:61) at com.google.appengine.tools.mapreduce.BigQueryDataMarshallerTest.toJsonString(BigQueryDataMarshallerTest.java:81) at com.google.appengine.tools.mapreduce.BigQueryDataMarshallerTest.testGeneratedJson(BigQueryDataMarshallerTest.java:60) at com.google.appengine.tools.mapreduce.BigQueryDataMarshallerTest.testGeneratedJsonForClassWithRecord(BigQueryDataMarshallerTest.java:347) With this fix we'll now emit 'null' as the json value. For example: {'record':null}.
- Loading branch information