Skip to content

feat: Add ValueBitmask to the filter DSL#16981

Merged
steveniemitz merged 2 commits intogoogleapis:mainfrom
steveniemitz:value-bitmask
May 7, 2026
Merged

feat: Add ValueBitmask to the filter DSL#16981
steveniemitz merged 2 commits intogoogleapis:mainfrom
steveniemitz:value-bitmask

Conversation

@steveniemitz
Copy link
Copy Markdown
Contributor

No description provided.

@steveniemitz steveniemitz requested a review from a team as a code owner May 7, 2026 12:55
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds the ValueBitmaskFilter class to the Bigtable row filters, enabling filtering based on a bitmask. The implementation includes protobuf conversion and unit tests for both byte and string inputs. Reviewer feedback includes a correction to the bitmask condition in the docstring to align with the Bigtable API, the removal of trailing spaces, and the addition of a repr method for consistency with other filter classes.

Comment thread packages/google-cloud-bigtable/google/cloud/bigtable/row_filters.py
Comment thread packages/google-cloud-bigtable/google/cloud/bigtable/row_filters.py
@steveniemitz steveniemitz enabled auto-merge (squash) May 7, 2026 13:41
@parthea
Copy link
Copy Markdown
Contributor

parthea commented May 7, 2026

nox > Running session mypy
nox > Creating virtual environment (virtualenv) using python3.14 in .nox/mypy
nox > python -m pip install -e .
nox > python -m pip install mypy types-setuptools types-protobuf types-mock types-requests
nox > python -m pip install google-cloud-testutils
nox > mypy -p google.cloud.bigtable.data
google/cloud/bigtable/data/execute_query/_byte_cursor.py:109: error: Argument 1 to "append" of "list" has incompatible type "memoryview[int]"; expected "bytes"  [arg-type]

@steveniemitz
Copy link
Copy Markdown
Contributor Author

yeah, my change obviously didn't break that :P

@parthea
Copy link
Copy Markdown
Contributor

parthea commented May 7, 2026

Filed #16984. I'll open a PR to use a previous version of mypy until #16984 is fixed

@steveniemitz steveniemitz merged commit 3f429f2 into googleapis:main May 7, 2026
33 checks passed
@steveniemitz steveniemitz deleted the value-bitmask branch May 7, 2026 17:08
noahdietz added a commit that referenced this pull request May 7, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v0.12.0
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:234b9d1f2ddb057ed7ac6a38db0bf8163d839c65c6cf88ade52530cddebce59e
<details><summary>google-cloud-bigtable: v2.38.0</summary>

##
[v2.38.0](google-cloud-bigtable-v2.37.0...google-cloud-bigtable-v2.38.0)
(2026-05-07)

### Features

* Add ValueBitmask to the filter DSL (#16981)
([3f429f2](3f429f23))

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants