virajjasani commented on code in PR #1736:
URL: https://github.com/apache/phoenix/pull/1736#discussion_r1480851470


##########
phoenix-core-client/src/main/java/org/apache/phoenix/iterate/OrderedResultIterator.java:
##########
@@ -172,6 +188,28 @@ public OrderedResultIterator(ResultIterator delegate,
         this(delegate, orderByExpressions, spoolingEnabled, thresholdBytes, 
limit, offset, estimatedRowSize, Long.MAX_VALUE);
     }
 
+    public OrderedResultIterator(ResultIterator delegate,
+                                 List<OrderByExpression> orderByExpressions,
+                                 boolean spoolingEnabled,
+                                 long thresholdBytes, Integer limit, Integer 
offset,
+                                 int estimatedRowSize, long pageSizeMs, Scan 
scan,
+                                 RegionInfo regionInfo) {
+        this(delegate, orderByExpressions, spoolingEnabled, thresholdBytes, 
limit, offset,
+                estimatedRowSize, pageSizeMs);
+        this.scan = scan;
+        // If scan start rowkey is empty, use region boundaries. Reverse 
region boundaries
+        // for reverse scan.
+        this.scanStartRowKey = scan.getStartRow().length > 0 ? 
scan.getStartRow() :

Review Comment:
   Can do this but now that we have server and client modules, we won't be able 
to use one util by all coprocs. Except for `OrderedResultIterator`, every other 
coproc can use it. This happens if we move util function to server util class.
   
   On the other hand, we can't move util function to core client module because 
client module does not have access to hbase server classes e.g. `Region`.



-- 
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...@phoenix.apache.org

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

Reply via email to