[
https://issues.apache.org/jira/browse/PHOENIX-5290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16885602#comment-16885602
]
James Taylor commented on PHOENIX-5290:
---------------------------------------
The problem is that 0 is not a valid value for a byte in a string. The
PVarchar.getSampleValue() method should be changed like this to prevent invalid
values of 0 (and 255 as well). Something like this:
{code:java}
@Override
public Object getSampleValue(Integer maxLength, Integer arrayLength) {
Preconditions.checkArgument(maxLength == null || maxLength >= 0);
int length = maxLength != null ? maxLength : 1;
if (length != sampleChars.length) {
sampleChars = new char[length];
}
for (int i = 0; i < length; i++) {
sampleChars[i] = (char) RANDOM.get().nextInt(Byte.MAX_VALUE - 2) +
1;
}
return new String(sampleChars);
}
{code}
> HashJoinMoreIT is flapping
> --------------------------
>
> Key: PHOENIX-5290
> URL: https://issues.apache.org/jira/browse/PHOENIX-5290
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.15.0, 4.14.1, 5.1.0
> Reporter: Lars Hofhansl
> Priority: Major
> Fix For: 4.15.0, 5.1.0
>
> Attachments: 5290-failure.txt, 5290-v2.txt, 5290-v3.txt, 5290.txt
>
>
> {code}
> [INFO] Running org.apache.phoenix.end2end.join.HashJoinMoreIT
> [ERROR] Tests run: 8, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:
> 91.509 s <<< FAILURE! - in org.apache.phoenix.end2end.join.HashJoinMoreIT
> [ERROR] testBug2961(org.apache.phoenix.end2end.join.HashJoinMoreIT) Time
> elapsed: 2.42 s <<< ERROR!
> java.lang.IllegalArgumentException: 6 > 5
> at
> org.apache.phoenix.end2end.join.HashJoinMoreIT.testBug2961(HashJoinMoreIT.java:898)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)