docs: add connector libraries overview table to package README - #17939
docs: add connector libraries overview table to package README#17939shuoweil wants to merge 21 commits into
Conversation
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…row and add mypy type ignore
…ction_does_not_leak_sockets
There was a problem hiding this comment.
Code Review
This pull request deprecates retrieving Arrow record batches directly via google-cloud-bigquery-storage, delegating this functionality to a new arrow module in pandas-gbq. It also adds related documentation and updates tests. The review feedback identifies two important issues in the new pandas_gbq/arrow.py file: a potential AttributeError when accessing arrow_record_batch if it is None, and an invalid attribute access on pyarrow.ipc.Message, which does not possess a schema attribute.
| batch_schema = ( | ||
| arrow_schema | ||
| if arrow_schema is not None | ||
| else getattr(msg, "schema", pa.schema([])) | ||
| ) |
There was a problem hiding this comment.
A pyarrow.ipc.Message object does not have a schema attribute, so getattr(msg, "schema", ...) will always fall back to the default value. Since we cannot retrieve the schema from the message itself in this context, we should simplify this to use arrow_schema directly if available, or fall back to an empty schema.
batch_schema = arrow_schema if arrow_schema is not None else pa.schema([])Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
The
google-cloud-bigqueryreference page serves as the package README. Adding a connector libraries table guides users seeking DataFrame operations to high-level BigQuery libraries.Changes
packages/google-cloud-bigquery/README.rst.bigframes): Scalable pandas-like and scikit-learn-like API powered by BigQuery.pandas-gbq: Lightweight integration forread_gbq()andto_gbq().Fixes #<522853190> 🦕