twdsilva commented on a change in pull request #515: PHOENIX-5318 Slots passed 
to SkipScan filter is incorrect for desc pr…
URL: https://github.com/apache/phoenix/pull/515#discussion_r291697227
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/compile/ScanRanges.java
 ##########
 @@ -615,9 +616,9 @@ private static TimeRange 
getRowTimestampColumnRange(List<List<KeyRange>> ranges,
                 if (ranges != null && ranges.size() > rowTimestampColPos) {
                     List<KeyRange> rowTimestampColRange = 
ranges.get(rowTimestampColPos);
                     List<KeyRange> sortedRange = new 
ArrayList<>(rowTimestampColRange);
-                    Collections.sort(sortedRange, KeyRange.COMPARATOR);
-                    //ranges.set(rowTimestampColPos, sortedRange); //TODO: do 
I really need to do this?
                     Field f = schema.getField(rowTimestampColPos);
+                    Collections.sort(sortedRange, f.getSortOrder() == 
SortOrder.ASC ? KeyRange.COMPARATOR : KeyRange.DESC_COMPARATOR);
+                    //ranges.set(rowTimestampColPos, sortedRange); //TODO: do 
I really need to do this?
 
 Review comment:
   Its not needed will remove it.

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

Reply via email to