phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [phoenix] karanmehta93 commented on a change in pull request #463: Phoenix stats Initial Commit
Date Thu, 04 Apr 2019 22:32:48 GMT
karanmehta93 commented on a change in pull request #463: Phoenix stats Initial Commit
URL: https://github.com/apache/phoenix/pull/463#discussion_r272392243
 
 

 ##########
 File path: phoenix-core/src/main/java/org/apache/phoenix/compile/ScanRanges.java
 ##########
 @@ -694,4 +694,136 @@ public TimeRange getRowTimestampRange() {
         return rowTimestampRange;
     }
 
+    /**
+     * Produces the list of KeyRanges representing the fully qualified row key by calling
into ScanUtil.setKey
+     * repeatedly for every combination of KeyRanges in the ranges field. The bounds will
be set according to the
+     * properties of the setKey method.
+     * 
+     * @return list of KeyRanges representing the fully qualified rowkey, coalesced
+     */
+    public List<KeyRange> getRowKeyRanges() {
+        // If its scanRanges are everything or nothing, then we short circuit and leave
+        // as schema is not filled in
+        if (isEverything()) { return Lists.newArrayList(KeyRange.EVERYTHING_RANGE); }
+        if (isDegenerate()) { return Lists.newArrayList(KeyRange.EMPTY_RANGE); }
+
+        List<KeyRange> queryRowKeyRanges = Lists.newArrayListWithExpectedSize(this.ranges.size());
+
+        // Point lookups are stored in the first range as a whole and already a rowkey
+        // see ScanRanges.getPointLookupKeyIterator
+        if (this.isPointLookup()) {
+            queryRowKeyRanges.addAll(this.getRanges().get(0));
+        } else {
+            // If scanRanges.ranges has no information then should be in the scanRanges.scanRange
 
 Review comment:
   Can you elaborate a bit here? What is the difference between `ScanRanges` and `KeyRanges`?

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

Mime
View raw message