Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
* (Python) Fixed occasional pipeline stuckness that was affecting Python 3.11 users ([#33966](https://github.com/apache/beam/issues/33966)).
* (Java) Fixed TIME field encodings for BigQuery Storage API writes on GenericRecords ([#34059](https://github.com/apache/beam/pull/34059)).
* (Java) Fixed a race condition in JdbcIO which could cause hangs trying to acquire a connection ([#34058](https://github.com/apache/beam/pull/34058)).
* (Java) Fix BigQuery Storage Write compatibility with Avro 1.8 ([#34281](https://github.com/apache/beam/pull/34281)).

## Security Fixes
* Fixed (CVE-YYYY-NNNN)[https://www.cve.org/CVERecord?id=CVE-YYYY-NNNN] (Java/Python/Go) ([#X](https://github.com/apache/beam/issues/X)).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ public static DynamicMessage messageFromGenericRecord(
return builder.build();
}

@SuppressWarnings("nullness")
private static TableFieldSchema fieldDescriptorFromAvroField(org.apache.avro.Schema.Field field) {
@Nullable Schema schema = field.schema();
Preconditions.checkNotNull(schema, "Unexpected null schema!");
Expand Down Expand Up @@ -350,10 +351,11 @@ private static TableFieldSchema fieldDescriptorFromAvroField(org.apache.avro.Sch
throw new RuntimeException("Unexpected null element type!");
}
TableFieldSchema keyFieldSchema =
fieldDescriptorFromAvroField(new Schema.Field("key", keyType, "key of the map entry"));
fieldDescriptorFromAvroField(
new Schema.Field("key", keyType, "key of the map entry", null));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TableFieldSchema valueFieldSchema =
fieldDescriptorFromAvroField(
new Schema.Field("value", valueType, "value of the map entry"));
new Schema.Field("value", valueType, "value of the map entry", null));
builder =
builder
.setType(TableFieldSchema.Type.STRUCT)
Expand All @@ -371,7 +373,8 @@ private static TableFieldSchema fieldDescriptorFromAvroField(org.apache.avro.Sch
elementType.getType() != Schema.Type.UNION,
"Multiple non-null union types are not supported.");
TableFieldSchema unionFieldSchema =
fieldDescriptorFromAvroField(new Schema.Field(field.name(), elementType, field.doc()));
fieldDescriptorFromAvroField(
new Schema.Field(field.name(), elementType, field.doc(), null));
builder =
builder
.setType(unionFieldSchema.getType())
Expand Down
Loading