bbeaudreault commented on code in PR #4536:
URL: https://github.com/apache/hbase/pull/4536#discussion_r1118797923


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/ScanQueryMatcher.java:
##########
@@ -263,9 +263,13 @@ public void clearCurrentRow() {
    * Set the row when there is change in row
    */
   public void setToNewRow(Cell currentRow) {
-    this.currentRow = currentRow;
-    columns.reset();
-    reset();
+    if (
+      this.currentRow == null || this.rowComparator.compareRows(currentRow, 
this.currentRow) != 0

Review Comment:
   Can you use CellUtil.matchingRows here like we were using in StoreScanner? 
That has an optimization where it checks the last byte of the array/buffer 
early. Comparing rows requires walking each array/buffer start to finish. The 
matchingRows is better because we are always comparing adjacent rows, where the 
earlier bits are more likely to be equal.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to