Skip to content

Commit 406b508

Browse files
committed
handled merge conflicts
1 parent 1c3fbc2 commit 406b508

4 files changed

Lines changed: 4 additions & 74 deletions

File tree

packages/google-cloud-bigtable/google/cloud/bigtable/data/exceptions.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,8 @@ def __repr__(self):
141141
return f"{self.__class__.__name__}({message!r}, {self.exceptions!r})"
142142

143143

144-
<<<<<<< HEAD
145-
=======
146144
# TODO: When working on mutations batcher, rework exception handling to guarantee that
147145
# MutationsExceptionGroup only stores FailedMutationEntryErrors.
148-
>>>>>>> 80c350f891a (feat: Shimmed RowSet and RowRange for ReadRows. (#1296))
149146
class MutationsExceptionGroup(_BigtableExceptionGroup):
150147
"""
151148
Represents one or more exceptions that occur during a bulk mutation operation

packages/google-cloud-bigtable/google/cloud/bigtable/row_filters.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,14 @@
4747
from google.cloud.bigtable.data.row_filters import (
4848
ConditionalRowFilter as BaseConditionalRowFilter,
4949
)
50-
<<<<<<< HEAD
5150
from google.cloud.bigtable.data.row_filters import (
5251
TimestampRangeFilter as BaseTimestampRangeFilter,
5352
)
54-
=======
5553
from google.cloud.bigtable.helpers import _MappableAttributesMixin
56-
>>>>>>> 80c350f891a (feat: Shimmed RowSet and RowRange for ReadRows. (#1296))
5754

5855
_PACK_I64 = struct.Struct(">q").pack
5956

6057

61-
<<<<<<< HEAD
6258
def _deprecated_to_pb(self):
6359
import warnings
6460

@@ -75,37 +71,6 @@ def _deprecated_to_pb(self):
7571
# Provide to_pb alias with DeprecationWarning for backwards compatibility with legacy client code
7672
RowFilter.to_pb = _deprecated_to_pb # type: ignore[attr-defined]
7773
TimestampRange.to_pb = _deprecated_to_pb # type: ignore[attr-defined]
78-
79-
80-
class _MappableAttributesMixin:
81-
"""
82-
Mixin for classes that need some of their attribute names remapped.
83-
84-
This is for taking some of the classes from the data client row filters
85-
that are 1:1 with their legacy client counterparts but with some of their
86-
attributes renamed. To use in a class, override the base class with this mixin
87-
class and define a map _attribute_map from legacy client attributes to data client
88-
attributes.
89-
90-
Attributes are remapped and redefined in __init__ as well as getattr/setattr.
91-
"""
92-
93-
def __init__(self, *args, **kwargs):
94-
new_kwargs = {self._attribute_map.get(k, k): v for (k, v) in kwargs.items()}
95-
super(_MappableAttributesMixin, self).__init__(*args, **new_kwargs)
96-
97-
def __getattr__(self, name):
98-
if name not in self._attribute_map:
99-
raise AttributeError
100-
return getattr(self, self._attribute_map[name])
101-
102-
def __setattr__(self, name, value):
103-
attribute = self._attribute_map.get(name, name)
104-
super(_MappableAttributesMixin, self).__setattr__(attribute, value)
105-
106-
107-
=======
108-
>>>>>>> 80c350f891a (feat: Shimmed RowSet and RowRange for ReadRows. (#1296))
10974
# The classes defined below are to provide constructors and members
11075
# that have an interface that does not match the one used by the data
11176
# client, for backwards compatibility purposes.

packages/google-cloud-bigtable/google/cloud/bigtable/row_set.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@
1515
"""User-friendly container for Google Cloud Bigtable RowSet"""
1616

1717
from google.cloud._helpers import _to_bytes
18+
1819
from google.cloud.bigtable.data.read_rows_query import (
19-
RowRange as BaseRowRange,
2020
ReadRowsQuery,
2121
)
22+
from google.cloud.bigtable.data.read_rows_query import (
23+
RowRange as BaseRowRange,
24+
)
2225
from google.cloud.bigtable.helpers import _MappableAttributesMixin
2326

2427

packages/google-cloud-bigtable/tests/unit/v2_client/test_row_set.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -48,41 +48,6 @@ def test_row_set__eq__type_differ():
4848
assert not (row_set1 == row_set2)
4949

5050

51-
<<<<<<< HEAD
52-
def test_row_set__eq__len_row_keys_differ():
53-
from google.cloud.bigtable.row_set import RowSet
54-
55-
row_key1 = b"row_key1"
56-
row_key2 = b"row_key1"
57-
58-
row_set1 = RowSet()
59-
row_set2 = RowSet()
60-
61-
row_set1.add_row_key(row_key1)
62-
row_set1.add_row_key(row_key2)
63-
row_set2.add_row_key(row_key2)
64-
65-
assert not (row_set1 == row_set2)
66-
67-
68-
def test_row_set__eq__len_row_ranges_differ():
69-
from google.cloud.bigtable.row_set import RowRange, RowSet
70-
71-
row_range1 = RowRange(b"row_key4", b"row_key9")
72-
row_range2 = RowRange(b"row_key4", b"row_key9")
73-
74-
row_set1 = RowSet()
75-
row_set2 = RowSet()
76-
77-
row_set1.add_row_range(row_range1)
78-
row_set1.add_row_range(row_range2)
79-
row_set2.add_row_range(row_range2)
80-
81-
assert not (row_set1 == row_set2)
82-
83-
84-
=======
85-
>>>>>>> 80c350f891a (feat: Shimmed RowSet and RowRange for ReadRows. (#1296))
8651
def test_row_set__eq__row_keys_differ():
8752
from google.cloud.bigtable.row_set import RowSet
8853

0 commit comments

Comments
 (0)