Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
StreamPartition,
TimestampRange,
Value,
ValueBitmask,
ValueRange,
)
from .types.feature_flags import FeatureFlags
Expand Down Expand Up @@ -245,5 +246,6 @@ def _get_version(dependency_name):
"TimestampRange",
"Type",
"Value",
"ValueBitmask",
"ValueRange",
)
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
StreamPartition,
TimestampRange,
Value,
ValueBitmask,
ValueRange,
)
from .feature_flags import (
Expand Down Expand Up @@ -132,6 +133,7 @@
"StreamPartition",
"TimestampRange",
"Value",
"ValueBitmask",
"ValueRange",
"FeatureFlags",
"PeerInfo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"ColumnRange",
"TimestampRange",
"ValueRange",
"ValueBitmask",
"RowFilter",
"Mutation",
"ReadModifyWriteRule",
Expand Down Expand Up @@ -558,6 +559,24 @@ class ValueRange(proto.Message):
)


class ValueBitmask(proto.Message):
r"""Restricts the output to cells whose values match the given
bitmask.

Attributes:
mask (bytes):
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.
"""

mask: bytes = proto.Field(
proto.BYTES,
number=1,
)


class RowFilter(proto.Message):
r"""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
Expand Down Expand Up @@ -805,6 +824,13 @@ class RowFilter(proto.Message):
be applied to separate copies of the input. This may be
relaxed in the future.

This field is a member of `oneof`_ ``filter``.
value_bitmask_filter (google.cloud.bigtable_v2.types.ValueBitmask):
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.

This field is a member of `oneof`_ ``filter``.
"""

Expand Down Expand Up @@ -1012,6 +1038,12 @@ class Condition(proto.Message):
number=19,
oneof="filter",
)
value_bitmask_filter: "ValueBitmask" = proto.Field(
proto.MESSAGE,
number=20,
oneof="filter",
message="ValueBitmask",
)


class Mutation(proto.Message):
Expand Down
Loading