GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||
GeezerVison is showing github.com — feat: make `read_session` optional in `ReadRowsStream.rows()` · Issue #168 · googleapis/python-bigquery-storage
This repository was archived by the owner on Nov 12, 2025. It is now read-only.
This repository was archived by the owner on Nov 12, 2025. It is now read-only.
feat: make |
| def from_read_session(read_session): | |
| schema_type = read_session._pb.WhichOneof("schema") | |
| if schema_type == "avro_schema": | |
| return _AvroStreamParser(read_session) | |
| elif schema_type == "arrow_schema": | |
| return _ArrowStreamParser(read_session) | |
| else: | |
| raise TypeError( | |
| "Unsupported schema type in read_session: {0}".format(schema_type) | |
| ) |
Behavior change: Can't raise ImportError if necessary libraries aren't installed until iteration time because without read_session, we don't know the serialization format until the first ReadRowsResponse message is parsed.
Behavior change: Empty stream returns dataframe / arrow table with no columns because schema is not available.
Edit: Since this is a breaking change, maybe we actually do still parse read_session for this? We can still deprecate read_session but wait to remove all parsing code until next major version?