Github user ramkrish86 commented on a diff in the pull request:
https://github.com/apache/incubator-phoenix/pull/8#discussion_r10115037
--- Diff:
phoenix-core/src/test/java/org/apache/phoenix/end2end/ArrayTest.java ---
@@ -393,6 +393,73 @@ public void testSelectWithArrayWithColumnRef() throws
Exception {
}
--- End diff --
What do you think of this example
@Test
public void
testVarCharArrayComparisonWithGreaterThan255NullsinMiddle() {
String strArr[] = new String[240];
strArr[0] = "abc";
strArr[1] = "bcd";
strArr[2] = null;
strArr[3] = null;
strArr[4] = "bcd";
for(int i = 5; i < strArr.length - 2; i++) {
strArr[i] = null;
}
strArr[strArr.length - 1] = "abc";
PhoenixArray arr = PArrayDataType.instantiatePhoenixArray(
PDataType.VARCHAR, strArr);
byte[] bytes1 = PDataType.VARCHAR_ARRAY.toBytes(arr);
strArr = new String[16];
strArr[0] = "abc";
strArr[1] = "bcd";
strArr[2] = null;
strArr[3] = null;
strArr[4] = "bcd";
strArr[strArr.length - 1] = "abc";
arr = PArrayDataType.instantiatePhoenixArray(
PDataType.VARCHAR, strArr);
byte[] bytes2 = PDataType.VARCHAR_ARRAY.toBytes(arr);
assertTrue(Bytes.compareTo(bytes1, bytes2) < 0);
}
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---