PDavid commented on code in PR #6361:
URL: https://github.com/apache/hbase/pull/6361#discussion_r1818975275


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java:
##########
@@ -142,6 +155,31 @@ boolean areSerializedFieldsEqual(Filter o) {
     return Bytes.equals(this.getPrefix(), other.getPrefix());
   }
 
+  @Override
+  public Cell getNextCellHint(Cell cell) {
+    byte[] hintBytes;
+    if (reversed) {
+      // On reversed scan hint should be the prefix with last byte incremented
+      hintBytes = increaseLastNonMaxByte(this.prefix);

Review Comment:
   Thanks. To be completely honest I am wondering on this a bit. :thinking: 
   
   If I understand it correctly, when the filter returns the hint, then we will 
be "navigated" to a row which is just before the first real match. Then, on 
advancing to the next row, the first matching row will be found.
   
   So as I understand, there will be no cells between the hint and the first 
real match. If this is true, does it make sense to pre-compute this hint?



-- 
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