-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Splitting Bigtable Row into 3 classes based on the mutation type / RPC method used in commit() #1557
Conversation
|
||
:rtype: :class:`.Row` | ||
:rtype: :class:`.DirectRow` |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@tseaver just saw tests were failing on Travis. Looking into it. What do we need to do to keep this review moving? Really close to the finish line and want to get a release out |
OK the failure is simple to address (just a long failure) |
*lint failure. Phone autocorrect! |
For now, just renaming Row->DirectRow and creating 2 do-nothing subclasses. Class will be torn down in subsequent commits.
Simplifying most downstream issues by just removing any code in DirectRow that branched based on the presence of filter_.
Also simplifying DirectRow.commit() in the process.
Factoring behavior out into a non-public helper _set_cell() and using that helper in both DirectRow and ConditionalRow.
Factoring behavior out into a non-public helper _delete() and using that helper in both DirectRow and ConditionalRow. Also making sure ConditionalRow.delete() gets tested (codepath was only previously traversed via the parent class).
Factoring behavior out into a non-public helper _delete_cells() and using that helper in both DirectRow and ConditionalRow. Also making sure ConditionalRow.delete_cell(s) get tested (codepaths were only previously traversed via the parent class).
Long-term fix will be to create the `gcloud.bigtable.row_filters` module to reduce the amount of code in `gcloud.bigtable.row`. Also removing superflous assignment.
This mostly LGTM, pending the one open item. |
LGTM |
Merging this, will handle the open item in a small separate PR. |
Splitting Bigtable Row into 3 classes based on the mutation type / RPC method used in commit()
This is a follow-up to googleapis#1557 and prevents strange-ly true statements like `isinstance(cond_row, DirectRow)`.
This is a follow-up to googleapis#1557 and prevents strange-ly true statements like `isinstance(cond_row, DirectRow)`.
This is a follow-up to googleapis#1557 and prevents strange-ly true statements like `isinstance(cond_row, DirectRow)`.
Docs are still being updated, but I wanted to get this out there to speed up the review. Alternate implementation based on #1550.
I strongly urge reviewers to examine this commit-by-commit. The commit messages are fairly helpful (for the most part) and the diff of the PR as a whole is not so easy on the eyes.
Fixes #1548.
/cc @jonparrott @jgeewax