riteshghorse opened a new issue, #29565:
URL: https://github.com/apache/beam/issues/29565
### What happened?
There is an encoding issue when reading from BigQueryIO using
`readTableRowsWithSchema()`. This happens only when the query contains an array
of structs like shown below:
```
SELECT ARRAY[STRUCT(1, 2)] AS data
```
With this, the inferred schema has `NOT NULL` property attached to it:
```
Schema: Fields: Field{name=id, description=, type=STRING, options={{}}}
Field{name=field2, description=, type=ARRAY<ROW<id STRING, name STRING>NOT
NULL>NOT NULL, options={{}}}
```
So when an element to be encoded has one of the field as NULL, it throws a
null pointer exception along with the following encoding exception:
```
Unable to encode element `{...}` with coder `SchemaCoder<Schema: Fields:
Field{name=id, description=, type=STRING, options={{}}} Field{name=field2,
description=, type=ARRAY<ROW<id STRING, name STRING>NOT NULL>NOT NULL,
options={{}}}`
```
### 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]