I've encountered an issue with the AvroGenericRecordToStorageApiProto.java class in Apache Beam, which is responsible for converting an Avro generic record into a proto object for writing to BigQuery using the Storage API.
The class contains two primary methods for handling the conversion:
What happened?
I've encountered an issue with the
AvroGenericRecordToStorageApiProto.java
class in Apache Beam, which is responsible for converting an Avro generic record into a proto object for writing to BigQuery using the Storage API.The class contains two primary methods for handling the conversion:
private TableFieldSchema fieldDescriptorFromAvroField(Schema.Field field)
private static Object toProtoValue(FieldDescriptor fieldDescriptor, Schema avroSchema, Object value)
These methods handle array types effectively when the array in the Avro schema is defined as follows:
However, the application crashes when a nullable array is used, such as:
This issue seems to stem from the handling of nullable arrays in the conversion methods.
Issue Priority
Priority: 3 (minor)
Issue Components