googleapis / googleapis/google-cloud-python

Use shim for legacy client sample_row_keys

Aperta
#15,288 1 commento 0 reazioni 1 assegnatario Rivendicata da @gkevinzheng Vedi su GitHub
api: bigtable priority: p3 samples type: feature request
Lingua principale
Python
Stelle
5.4k
Fork
1.8k
Merge medio
3g 4h
PR unite (30g)
122

Descrizione

The legacy client exposes [sample_row_keys as a method](https://github.com/googleapis/python-bigtable/blob/3648d7000df4a108524e29a9c55639dc92c1c2cc/google/cloud/bigtable/table.py#L741) on the Table class. This should be simple to swap out for the [veneer substitute](https://github.com/googleapis/python-bigtable/blob/3648d7000df4a108524e29a9c55639dc92c1c2cc/google/cloud/bigtable/data/_sync_autogen/client.py#L990)

The one complication should be the return types; the legacy client seems to return the gapic response directly, while the veneer client [unpacks it into a tuple list](https://github.com/googleapis/python-bigtable/blob/3648d7000df4a108524e29a9c55639dc92c1c2cc/google/cloud/bigtable/data/_sync_autogen/client.py#L1045) (with a [type alias of RowKeySamples](https://github.com/googleapis/python-bigtable/blob/3648d7000df4a108524e29a9c55639dc92c1c2cc/google/cloud/bigtable/data/_helpers.py#L39)). We could re-build the proto object to keep things consistent, or possibly change the return type as a breaking change. Depends on what we see about typical usage

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.