Description
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