Skip to content

feat: make read_session optional in ReadRowsStream.rows() #168

Closed
@tswast

Description

@tswast

Is your feature request related to a problem? Please describe.

ReadRowsStream.rows() and other methods that decode the data currently take a ReadSession as a required argument. This is so that it can use the avro/arrow schema to decode the rows.

This is a bit of a pain, especially when workers are on separate processes.

Describe the solution you'd like

#166 adds arrow_schema and avro_schema properties to ReadRowsResponse. These are populated only in the first message of a read stream, but can be cached locally to decode subsequent messages.

To avoid breaking changes, a ReadSession can still be accepted, but it should be optional. Thankfully Python supports arguments which work either as args or kwargs, so I think this does not have to be a breaking change. We need to make sure we comment to the library devs that the order matters for this argument, though.

Describe alternatives you've considered

New Reader class?

Additional context

N/A

Metadata

Metadata

Assignees

Labels

api: bigquerystorageIssues related to the googleapis/python-bigquery-storage API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions