[
https://issues.apache.org/jira/browse/TAJO-1004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14096644#comment-14096644
]
Mai Hai Thanh commented on TAJO-1004:
-------------------------------------
Hi Hyunsik,
Your patch looks nice.
Besides, I think that the following lines of code has a bug:
{code}
for (TupleRange r : ranges) {
if (prev == null) {
prev = r;
} else {
assertTrue(prev.compareTo(r) < 0);
}
}
{code}
Because {{prev}} is assigned only once in the loop, if the partition number is
greater than 2, many subsequent comparisons between {{prev}} and {{r}} are not
what you expect.
So, I'd suggest to rewrite those lines of code as follows:
{code}
for (TupleRange r : ranges) {
if (prev != null) {
assertTrue(prev.compareTo(r) < 0);
}
prev = r;
}
{code}
This code appears about 6 or 7 times in TestUniformRangePartition.java.
> UniformRangePartition cannot deal with unicode ranges
> -----------------------------------------------------
>
> Key: TAJO-1004
> URL: https://issues.apache.org/jira/browse/TAJO-1004
> Project: Tajo
> Issue Type: Bug
> Reporter: Hyunsik Choi
> Assignee: Hyunsik Choi
> Fix For: 0.9.0
>
>
> UniformRangePartition plays a role to divide a given range into multiple sub
> ranges. It is used for range shuffle.
> When UniformRangePartition divides a range of text fields, it Internally
> transforms arrays of bytes into unsigned integer. But, a byte represent -127
> to 127, and unicode is out of range in byte representation. So, the current
> approach can cause errors in this case.
--
This message was sent by Atlassian JIRA
(v6.2#6252)