Skip to content
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

fix: allow filters using false-y but not undefined values or ranges #1516

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

airhorns
Copy link

@airhorns airhorns commented Nov 8, 2024

Before this change, the filter code was erroneously omitting filters that checked if a cell value was equal to 0, as 0 is not truth-y in JS. It is however a valid byte string to check against inside bigtable, so we should still send it along as a filter. This bug applied to both {value: 0} exact value filters, or {value: {start: 0}} style range filters, and this commit fixes both.

Before this change, the filter code was erroneously omitting filters that checked if a cell value was equal to `0`, as `0` is not truth-y in JS. It is however a valid byte string to check against inside bigtable, so we should still send it along as a filter. This bug applied to both `{value: 0}` exact value filters, or `{value: {start: 0}}` style range filters, and this commit fixes both.
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigtable Issues related to the googleapis/nodejs-bigtable API. labels Nov 8, 2024
@airhorns airhorns marked this pull request as ready for review November 8, 2024 23:48
@airhorns airhorns requested review from a team as code owners November 8, 2024 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/nodejs-bigtable API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant