googleapis / googleapis/google-cloud-python

Use shim for legacy client read_rows

未关闭
#15,293 1 条评论 0 个 reaction 已指派 1 人 已被 @gkevinzheng 认领 在 GitHub 查看
api: bigtable priority: p3 type: feature request
主要语言
Python
星标
5.4k
派生
1.8k
平均合并
3 天 4 小时
30 天内合并 PR
122

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。