dbwong commented on a change in pull request #463: Phoenix stats Initial Commit
URL: https://github.com/apache/phoenix/pull/463#discussion_r265834617
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/compile/ScanRanges.java
##########
@@ -694,4 +694,138 @@ public TimeRange getRowTimestampRange() {
return rowTimestampRange;
}
+ public List<KeyRange> getRowKeyRanges(){
+
+ //If its scanRanges are everything or nothing we short circuit and
leave
+ //As schema is not filled in
+ if (this.equals(ScanRanges.EVERYTHING)) {
+ return Lists.newArrayList(KeyRange.EVERYTHING_RANGE);
+ }
+ if (this.equals(ScanRanges.NOTHING)) {
+ 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
+ if (this.getRanges().size() == 0) {
+ queryRowKeyRanges.add(this.getScanRange());
+ } else { //We have a composite key need the row key from the
combination
Review comment:
I don't understand this is standard in this file see lines 105,262 etc. And
standard in the formatter. I believe this is the correct line for this comment
because of the above.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services