evanchen852 opened a new pull request, #41858: URL: https://github.com/apache/beam/pull/41858
`FILE_LOADS` Avro writes (`withAvroFormatFunction` / `withAvroWriter`) throw `UnresolvedUnionException` when a NULLABLE RECORD is filled with a user-supplied record whose namespace differs from the schema Beam generates from the BigQuery table. The Avro error shows the union and the field values, not the two namespaces. `AvroRowWriter` now catches that case and throws `BigQueryRowSerializationException` with both full names, and points to `request.getSchema()` or `withAvroSchemaFactory()`. Other append failures are unchanged. The record is not rewritten. addresses #19866 ## Test plan - [x] `BigQueryAvroUtilsTest.testNullableNestedRecordWithDifferentNamespaceFailsToWrite` reproduces the `UnresolvedUnionException`. - [x] `BigQueryAvroUtilsTest.testAvroRowWriterReportsNamespaceMismatch` checks the new message names both `com.example.events.address` and `org.apache.beam.sdk.io.gcp.bigquery.address`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
