stoty commented on code in PR #1663:
URL: https://github.com/apache/phoenix/pull/1663#discussion_r1311659334


##########
phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java:
##########
@@ -1722,7 +1725,10 @@ public KeySlots visitLeave(LikeExpression node, 
List<KeySlots> childParts) {
                 lowerRange = Arrays.copyOf(lowerRange, lowerRange.length+1);
                 lowerRange[lowerRange.length-1] = 
QueryConstants.SEPARATOR_BYTE;
             }
-            KeyRange range = type.getKeyRange(lowerRange, true, upperRange, 
false, SortOrder.ASC);
+            boolean lowerInclusive = column.getSortOrder() == SortOrder.ASC;
+            boolean upperInclusive = column.getSortOrder() == SortOrder.DESC;
+            KeyRange range = type.getKeyRange(lowerRange, lowerInclusive, 
upperRange,
+                    upperInclusive, SortOrder.ASC);

Review Comment:
   I'm talking the whole method, not the specific line 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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to