googleapis / googleapis/google-cloud-python
Use shim for legacy client read_rows
- Ngôn ngữ chính
- Python
- Star
- 5.4k
- Fork
- 1.8k
- Merge trung bình
- 3 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 122
Mô tả
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
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.