Skip to content

BigQuery: Remove references to avro_schema from tests/unit/test_table.py. #8855

Closed

Description

@tswast

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()}
)

Activity

  1. added
    api: bigqueryIssues related to the BigQuery API.
    type: cleanupAn internal cleanup or hygiene concern.
    on Jul 31, 2019
  2. self-assigned this
    on Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the BigQuery API.type: cleanupAn internal cleanup or hygiene concern.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions