You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2019/04/17 13:22:30 UTC

[GitHub] [phoenix] BinShi-SecularBird commented on a change in pull request #485: Add common utility function ScanUtil.splityKeyRangesByBoundaries()

BinShi-SecularBird commented on a change in pull request #485: Add common utility function ScanUtil.splityKeyRangesByBoundaries()
URL: https://github.com/apache/phoenix/pull/485#discussion_r276237291
 
 

 ##########
 File path: phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java
 ##########
 @@ -953,4 +953,80 @@ public static int getClientVersion(Scan scan) {
     public static void setClientVersion(Scan scan, int version) {
         scan.setAttribute(BaseScannerRegionObserver.CLIENT_VERSION, Bytes.toBytes(version));
     }
+
+    /**
+     * Split the key ranges into multiple groups along the given boundaries
+     *
+     * @param boundaries
+     *     The boundaries is a byte[] list like "b0, b1, ..., bn" which forms
+     *     space (UNBOUND, b0), [b0, b1), ..., [bn, UNBOUND)
+     * @param keyRanges
+     *     The key ranges to split along the given boundaries. Coalesced.
+     * @return
+     *     key ranges in two dimensions.
+     */
+    public static List<List<KeyRange>> splitKeyRangesByBoundaries(List<byte[]> boundaries, List<KeyRange> keyRanges) {
 
 Review comment:
   boundaries' length can be 0.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services