stoty commented on code in PR #6457:
URL: https://github.com/apache/hbase/pull/6457#discussion_r1839949834


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFuzzyRowFilter.java:
##########
@@ -221,94 +239,95 @@ public void testGetNextForFuzzyRuleForward() {
 
   @Test
   public void testGetNextForFuzzyRuleReverse() {
+    // In the reverse case the last non-max byte should be increased to make 
sure that the proper
+    // row is selected next.
+    // e.g. 112 -> 113 or 11(0xFF)2 -> 11(0xFF)3, 5101 -> 5102 etc.

Review Comment:
   This needs a bit more explanation, this comment does not make much sense 
without the mask and current row.



##########
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FuzzyRowFilter.java:
##########
@@ -200,7 +200,7 @@ public boolean filterRow() throws IOException {
 
   @Override
   public ReturnCode filterCell(final Cell c) {
-    final int startIndex = lastFoundIndex >= 0 ? lastFoundIndex : 0;
+    final int startIndex = Math.max(lastFoundIndex, 0);

Review Comment:
   I have checked, this compiles to the same inline, so it's not a performance 
problem.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to