Skip to content

feat: Rerouted ReadRows to data client - #18198

Draft
daniel-sanche wants to merge 6 commits into
shim/10-read-rows-rst-streamfrom
shim/11-read-rows-data-client
Draft

feat: Rerouted ReadRows to data client#18198
daniel-sanche wants to merge 6 commits into
shim/10-read-rows-rst-streamfrom
shim/11-read-rows-data-client

Conversation

@daniel-sanche

@daniel-sanche daniel-sanche commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Migrating over @gkevinzheng PR from bigtable monorepo googleapis/python-bigtable#1308

Original description:

Changes Made:

  • Added methods to convert Row and Cell objects in the data client to PartialRowData and Cell objects in the legacy client.
  • Removed legacy client code related to processing ReadRowResponse chunks and testing ReadRowResponse chunks.
  • Removed _update_message_request from RowSet because it's no longer needed to create a ReadRowQuery
  • Rerouted read_row and read_rows to use their data client counterparts in table.py.

Additional Changes:

Applied some guards against removed semi-private APIs, after internal discussion:

  • 6941199: we had a couple technically public, but not meant to be accessed attributes. This commit replaces them with properties that raise a warning and return None, rather than completely removing them
  • c9617ac: Similarily, the PartialRowsData constructor was technically public, but not intended to be used. This change returns an empty generator when the previous constructor is used, with a warning
  • b51292e: handles a bug that could occur if None is passed for retries
  • 92da437: added better typing to generator

Note to reviewers: This PR has already been reviewed and merged to a staging branch, with the intention of doing a single merge to main. We are now planning to slowly rollout these changes back to the main branch. Minimal re-review should be necessary

gkevinzheng and others added 4 commits August 21, 2026 13:59
**Changes Made:**
- Added methods to convert `Row` and `Cell` objects in the data client
to `PartialRowData` and `Cell` objects in the legacy client.
- Removed legacy client code related to processing `ReadRowResponse`
chunks and testing `ReadRowResponse` chunks.
- Removed `_update_message_request` from `RowSet` because it's no longer
needed to create a `ReadRowQuery`
- Rerouted `read_row` and `read_rows` to use their data client
counterparts in `table.py`.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the Bigtable client to delegate row reading and streaming to the underlying _table_impl data client, deprecating legacy classes like _RowMerger and several attributes on PartialRowsData. The review feedback identifies potential AttributeError risks when accessing retry.deadline directly (since google.api_core.retry.Retry typically uses _deadline internally) in table.py and unit tests, as well as when calling close() on _generator in row_data.py if the generator does not support it.

Comment thread packages/google-cloud-bigtable/google/cloud/bigtable/table.py Outdated
Comment thread packages/google-cloud-bigtable/google/cloud/bigtable/table.py Outdated
Comment thread packages/google-cloud-bigtable/google/cloud/bigtable/row_data.py
Comment thread packages/google-cloud-bigtable/tests/unit/v2_client/test_table.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants