ChinmaySKulkarni commented on a change in pull request #708: PHOENIX-5698
Phoenix Query with RVC IN list expression generates wron…
URL: https://github.com/apache/phoenix/pull/708#discussion_r385355734
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
##########
@@ -590,11 +591,35 @@ private KeySlots newKeyParts(KeySlot slot,
List<Expression> extractNodes, List<K
return new SingleKeySlot(new BaseKeyPart(table,
slot.getKeyPart().getColumn(), extractNodes), slot.getPKPosition(),
slot.getPKSpan(), keyRanges, slot.getOrderPreserving());
}
- private KeySlots
newRowValueConstructorKeyParts(RowValueConstructorExpression rvc,
List<KeySlots> childSlots) {
+ public KeySlots
newRowValueConstructorKeyParts(RowValueConstructorExpression rvc,
List<KeySlots> childSlots) {
if (childSlots.isEmpty() || rvc.isStateless()) {
return null;
}
-
+ if (!this.orderMatter) {
+ Collections.sort(childSlots, new Comparator<KeySlots>() {
+ @Override
+ public int compare(KeySlots o1, KeySlots o2) {
+ return o1.getSlots().get(0).getPKPosition() -
Review comment:
@yanxinyi can you add the comment referenced in this conversation about what
exactly is happening here?
----------------------------------------------------------------
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