I noticed lines like the following in the unit tests for the table module:
session.avro_schema.schema = json.dumps(
{
"fields": [
{"name": "colA"},
# Not alphabetical to test column order.
{"name": "colC"},
{"name": "colB"},
]
}
)
Now that we're creating Arrow sessions, we should update these unit tests to populate the Arrow schema, instead. There are examples of doing this in the tests for google-cloud-bigquery-storage.
|
def _generate_arrow_read_session(arrow_schema): |
|
return bigquery_storage_v1beta1.types.ReadSession( |
|
arrow_schema={"serialized_schema": arrow_schema.serialize().to_pybytes()} |
|
) |
I noticed lines like the following in the unit tests for the table module:
Now that we're creating Arrow sessions, we should update these unit tests to populate the Arrow schema, instead. There are examples of doing this in the tests for google-cloud-bigquery-storage.
google-cloud-python/bigquery_storage/tests/unit/test_reader.py
Lines 193 to 196 in 7e16c08