Skip to content

Commit 66794a0

Browse files
chore(bigtable): Rerouted legacy client row filters to data client row filters (#18175)
Migrating over @gkevinzheng PR from bigtable monorepo googleapis/python-bigtable#1255 ### Original description: > Changes made: > - Used import aliasing to remove most of the legacy client row filter code and use the data client row filter code in its place. > - Some of the data client row filter classes had to be slightly modified for backwards compatibility with the legacy client row filter classes' interface. > - As part of this move, `to_pb` has been replaced with `_to_pb`, and I have adjusted references to `<RowFilter>.to_pb` in the libraries and unit tests. > > This is for eventually shimming up `CheckAndMutateRows`, and other row mutation operations as well. ### Additional changes on top of Kevin's: - ([3097276](3097276)) I added an alias between the new `_to_pb()` and the old `to_pb()` methods, for backwards compatibility - Originally, we were planning on dropping the method. Now, it can still be used, with a deprecation warning Note to reviewers: This PR has already been reviewed and merged to a staging branch, with the intention of doing a single merge to main. We are now planning to slowly rollout these changes back to the main branch. Minimal re-review should be necessary --------- Co-authored-by: Kevin Zheng <147537668+gkevinzheng@users.noreply.github.com>
1 parent 199aabd commit 66794a0

7 files changed

Lines changed: 248 additions & 849 deletions

File tree

packages/google-cloud-bigtable/google/cloud/bigtable/row.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def _delete_cells(self, column_family_id, columns, time_range=None, state=None):
231231
else:
232232
delete_kwargs = {}
233233
if time_range is not None:
234-
delete_kwargs["time_range"] = time_range.to_pb()
234+
delete_kwargs["time_range"] = time_range._to_pb()
235235

236236
to_append = []
237237
for column in columns:
@@ -602,7 +602,7 @@ def commit(self):
602602
resp = data_client.check_and_mutate_row(
603603
table_name=self._table.name,
604604
row_key=self._row_key,
605-
predicate_filter=self._filter.to_pb(),
605+
predicate_filter=self._filter._to_pb(),
606606
app_profile_id=self._table._app_profile_id,
607607
true_mutations=true_mutations,
608608
false_mutations=false_mutations,

0 commit comments

Comments
 (0)