You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: remove duplicated cell when interleave filter is applied
It seems Bigtable classic client & veneer client behaves differently for duplicated `cells`. A Row can contain duplicated cell when user applies `Interleave` filters. Behavior of both of these clients are:
- Classic client: Here, we check if a `cell` contains some `labels` or not, If it does then we include that cell in end result, if it doesn't then we compare `timestamp` and `qualifier` with previous no label cell(Because a cell with label could have been produced by applying filters).
- Veneer client: Here, we do not performs these checks.(Most of other client allows duplicate cells confirmed on `Go/NodeJs/C#` bigtable client. Not sure why but `python-bigtable` does not allows duplicate cells)
**Assumption:** The labels are applied to determine which filters produced those cells, So we are including all cells where labels are present.
chore: added javadoc to inform user about this bug
- Added class JavaDoc and code comment for future reference.
- reset the `previousNoLabelCell` in reset().
- added unit test to verify dedupe logic.
Copy file name to clipboardExpand all lines: bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/wrappers/veneer/RowResultAdapter.java
Copy file name to clipboardExpand all lines: bigtable-client-core-parent/bigtable-hbase/src/test/java/com/google/cloud/bigtable/hbase/wrappers/veneer/TestRowResultAdapter.java
+60Lines changed: 60 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -154,6 +154,66 @@ public void testOnlyValueIsDifferent() {
154
154
assertResult(expected, actual);
155
155
}
156
156
157
+
@Test
158
+
publicvoidtestDeduplicationLogic() {
159
+
List<String> EMPTY_LABEL = ImmutableList.of();
160
+
ByteStringvalueForNewQual = ByteString.copyFromUtf8("value for new qualifier");
161
+
ByteStringvalueForCellWithoutLabel = ByteString.copyFromUtf8("value for Cell without label");
162
+
ByteStringvalueForCellWithLabel = ByteString.copyFromUtf8("value for cell with labels");
0 commit comments