googleapis / googleapis/google-cloud-python
Use shim for legacy client read_rows
- Lingua principale
- Python
- Stelle
- 5.4k
- Fork
- 1.8k
- Merge medio
- 3g 4h
- PR unite (30g)
- 122
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.