feat(bigtable): Rerouted CheckAndMutateRows and ReadModifyWriteRows to data client - #18190
feat(bigtable): Rerouted CheckAndMutateRows and ReadModifyWriteRows to data client#18190daniel-sanche wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the Bigtable row and row filter implementations to delegate to the new data client (google.cloud.bigtable.data) instead of constructing legacy v2 protobufs directly, while maintaining backwards compatibility. The review feedback points out a critical runtime AttributeError in the mock _Table class within the unit tests, and suggests adding a descriptive error message to the AttributeError raised by _MappableAttributesMixin.__getattr__ to improve debuggability.
**Changes made:** - `Row` objects hold `Mutation` and `ReadModifyWriteRowRule` objects from the data client rather than raw protos. - Rerouted `ConditionalRow.commit` and `AppendRow.commit` (CheckAndMutateRows and ReadModifyWriteRows respectively) to use the data client, or more specifically, `self._table._table_impl` - Added function `DirectRow._to_mutation_pbs` for retrieving mutations in proto form for the current `MutateRows` implementation, as well as for `DirectRow.get_mutations_size`. - Removed unnecessary helper functions and tests for helper functions
ad30839 to
c1a1d03
Compare
|
We can ignore the import profiler checks here. It is expected that imports will be a bit slower at first, since we are pulling in the data client (over time, we will be removing legacy client classes to make up for it) |
Migrating over @gkevinzheng PR from bigtable monorepo googleapis/python-bigtable#1257
Original description:
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