stoty commented on code in PR #1663:
URL: https://github.com/apache/phoenix/pull/1663#discussion_r1311675829
##########
phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java:
##########
@@ -1691,8 +1691,10 @@ public KeySlots visitLeave(LikeExpression node,
List<KeySlots> childParts) {
KeySlots childSlots = childParts.get(0);
KeySlot childSlot = childSlots.getSlots().get(0);
final String startsWith = node.getLiteralPrefix();
- SortOrder sortOrder = node.getChildren().get(0).getSortOrder();
- byte[] key = PVarchar.INSTANCE.toBytes(startsWith, sortOrder);
+ // TODO: is there a case where we'd need to go through the
childPart to calculate the key range?
+ PColumn column = childSlot.getKeyPart().getColumn();
+ PDataType type = column.getDataType();
+ byte[] key = PVarchar.INSTANCE.toBytes(startsWith,
column.getSortOrder());
Review Comment:
This is where we get an inverted range
--
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]