dbwong commented on a change in pull request #736: PHOENIX-5698 Phoenix Query
with RVC IN list expression generates wron…
URL: https://github.com/apache/phoenix/pull/736#discussion_r396238695
##########
File path:
phoenix-core/src/test/java/org/apache/phoenix/expression/InListExpressionTest.java
##########
@@ -62,4 +70,68 @@ public void testHashCode() throws Exception {
+ hashCode, firstHashCode, hashCode);
}
}
+
+ @Test
+ public void testGetSortedRowValueConstructorExpressionListNotPkOrder() {
+ testGetSortedRowValueConstructorExpressionList(false);
+ }
+
+ @Test
+ public void testGetSortedRowValueConstructorExpressionListPkOrder() {
+ testGetSortedRowValueConstructorExpressionList(true);
+ }
+
+ private void testGetSortedRowValueConstructorExpressionList(boolean
isPkOrder) {
Review comment:
Why don't we break this up more? One we aren't testing the code in
InListColumnKeyValuePair. Two everything is being tested as part of the
constructor. I'd test it in 2 parts, 1 a InListRVCRewritte class/method that
takes a array of indexes and a RVC and returns a new RVC with the new order. 2
a method that constructs an order array given a RVC of PKs. Then its easy to
test some of the scenarios like if we have less/more values than the array.
----------------------------------------------------------------
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