Skip to content

Commit

Permalink
improve range based size
Browse files Browse the repository at this point in the history
  • Loading branch information
wg1026688210 committed Jan 29, 2024
1 parent dceed11 commit ed5de85
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ static <T> T[] allocateRangeBaseSize(List<Tuple2<T, Integer>> sampledData, int r
for (int i = 0; i < boundarySize; i++) {
while (currentWeight < stepRange && index < sampeNum) {
boundaries[i] = sampledData.get(Math.min(index, sampeNum - 1)).f0;
Integer sampleWeight = sampledData.get(index++).f1;
int sampleWeight = sampledData.get(index++).f1;
currentWeight += sampleWeight;
restSize -= sampleWeight;
}
Expand Down

0 comments on commit ed5de85

Please sign in to comment.