DANIELK121 opened a new issue, #29516: URL: https://github.com/apache/beam/issues/29516
### What happened? Beam Version - 2.52.0 Language - Java This is the problematic function:  In line 278 is the case handling a MAP Avro schema type. In line 280 it is trying to compute the value type of the Map but accessing the `Schema::getElementType` method, which is implemented only by the `org.Apache.Avro.ArraySchema` (and not by the `org.Apache.Avro.MapSchema`). This is causing the case to throw an `AvroRuntimeException` with a message "Not an array: ...", and NEVER succeed the handling. I believe that in line 280, instead of calling `Schema::getElementType`, it should call `Schema::getValueType` which is implemented by the `org.Apache.Avro.MapSchema` class. P.S - It seems that same bug exists in the org.apache.beam.sdk.io.gcp.bigquery.AvroGenericRecordToStorageApiProto.fieldDescriptorFromAvroField function when handling a MAP type schema. ### Issue Priority Priority: 2 (default / most bugs should be filed as P2) ### Issue Components - [ ] Component: Python SDK - [X] Component: Java SDK - [ ] Component: Go SDK - [ ] Component: Typescript SDK - [X] Component: IO connector - [ ] Component: Beam YAML - [ ] Component: Beam examples - [ ] Component: Beam playground - [ ] Component: Beam katas - [ ] Component: Website - [ ] Component: Spark Runner - [ ] Component: Flink Runner - [ ] Component: Samza Runner - [ ] Component: Twister2 Runner - [ ] Component: Hazelcast Jet Runner - [ ] Component: Google Cloud Dataflow Runner -- 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]
