Skip to content

Commit

Permalink
[CARBONDATA-2902][DataMap] Fix showing negative pruning result for ex…
Browse files Browse the repository at this point in the history
…plain command

#2676 used method ByteBuffer.getShort(int index) to get number of blocklets in block, but it used wrong parameter. The index is index of byte instead of index of short. So it needs to multiply bytes of short type

This closes #2697
  • Loading branch information
kevinjmh authored and jackylk committed Sep 6, 2018
1 parent 50248f5 commit f04850f
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -551,7 +551,8 @@ protected short getBlockletNumOfEntry(int index) {
// dummy value
return 0;
} else {
return ByteBuffer.wrap(getBlockletRowCountForEachBlock()).getShort(index);
return ByteBuffer.wrap(getBlockletRowCountForEachBlock()).getShort(
index * CarbonCommonConstants.SHORT_SIZE_IN_BYTE);
}
}

Expand Down

0 comments on commit f04850f

Please sign in to comment.