Uh oh!
There was an error while loading. Please reload this page.
feat: add value_bitmask_filter to the read API - #16884
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the ValueBitmask feature to the Google Cloud Bigtable V2 client, adding the ValueBitmask message type and integrating it into row filters. The PR also includes extensive refactoring, such as import reordering and whitespace adjustments. Feedback was provided to separate these non-critical refactorings into a dedicated pull request to maintain focus and improve the review process.
I am having trouble creating individual review comments. Click here to see my feedback.
packages/google-cloud-bigtable/google/cloud/bigtable_v2/init.py (19)
This pull request includes extensive non-critical refactoring, such as import reordering and whitespace adjustments. Please move these changes to a separate pull request to keep this one focused on the value_bitmask_filter feature and to simplify the review process.
References
- Defer non-critical refactoring or cleanup tasks to a separate pull request to maintain the focus and reviewability of the current one.
This PR was created outside of librarian due to b/501132869. b/501132869 should be resolved soon. In the meantime, we need to publish `value_bitmask_filter` to avoid blocking other teams. Steps used to create this PR - Clone [googleapis/googleapis](https://github.com/googleapis/googleapis) and checkout the last generated commit `a6cbf809c4c165e618ee23a059442af90a80a0f5` which matches what we have in .librarian/state.yaml https://github.com/googleapis/google-cloud-python/blob/8fa0f81cb35f93210ffb2020a8bc822a9eee5ec4/.librarian/state.yaml#L1169 - Apply this diff ``` (py392) partheniou@partheniou-vm-3:~/git/googleapis$ git diff diff --git a/google/bigtable/v2/data.proto b/google/bigtable/v2/data.proto index 8320a0c22f..af354b05a2 100644 --- a/google/bigtable/v2/data.proto +++ b/google/bigtable/v2/data.proto @@ -255,6 +255,15 @@ message ValueRange { } } +// Restricts the output to cells whose values match the given bitmask. +message ValueBitmask { + // Required. Mask applied to the value. + // Evaluated as: `(value & mask) == mask` + // The mask length must exactly match the value length, otherwise the cell is + // not considered a match. + bytes mask = 1 [(google.api.field_behavior) = REQUIRED]; +} + // Takes a row as input and produces an alternate view of the row based on // specified rules. For example, a RowFilter might trim down a row to include // just the cells from columns matching a given regular expression, or might @@ -514,6 +523,12 @@ message RowFilter { // will be applied to separate copies of the input. This may be relaxed in // the future. string apply_label_transformer = 19; + + // Matches only cells with values that satisfy the condition `(value & mask) + // == mask`. + // The mask length must exactly match the value length, otherwise the cell + // is not considered a match. + ValueBitmask value_bitmask_filter = 20; } } ``` - Clone this repo. Checkout commit `6cb5af5227e09e99ee12bb3542374f683b75d4b4` which is the last commit where generation was run: https://github.com/googleapis/google-cloud-python/commits/main/packages/google-cloud-bigtable - Run `legacylibrarian generate --api-source=<path/to/clone/of/googleapis> --library=google-cloud-bigtable` to regenerate the library using the local version of googleapis - Revert changes to `.librarian/state.yaml` Closes#16884
Manually generate the bitmask filter proto to unblock critical proto generation.