googleapis / googleapis/google-cloud-python

Use shim for legacy client read_rows

Ouverte
#15,293 1 commentaire 0 réactions 1 personne assignée Réclamée par @gkevinzheng Voir sur GitHub
api: bigtable priority: p3 type: feature request
Langage dominant
Python
Étoiles
5.4k
Forks
1.8k
Merge moyen
3 j 4 h
PR mergées (30 j)
122

Description

From go/bigtable_legacy_deprecation:

> Old API
> - The [Table](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/table.py#L103) class exposed a [read_row](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/table.py#L536) and [read_rows](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/table.py#L577) method
read_row simply [calls read_rows](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/table.py#L570) under the hood, with a single row_key argument
> - Read_rows [creates and returns PartialRowsData instance](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/table.py#L647), which can be iterated to return [PartialRowData](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/row.py#L1027) (no s) instances for each row in the query
> - The row merging logic is all contained within PartialRowsData, using internal [_RowMerger](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/row_merger.py#L58) and [_ReadRowsRequestManager](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/row_data.py#L274) instances
>
> Replacement
> - We can replace the[ PartialRowsData class](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/table.py#L647) with a new subclass, that instead delegates row merging logic to the [_ReadRowsOperation](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/data/_sync_autogen/_read_rows.py#L40) class provided by the new data client

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.