Skip to content
Permalink
Browse files
DRILL-6626: Fixed an IndexOutOfBoundException during aggregator rehash
  • Loading branch information
sachouche authored and Ben-Zvi committed Jul 23, 2018
1 parent c58735a commit 7a4ca00e86030fc9f866c3f31e1207e96c534b78
Showing 1 changed file with 2 additions and 4 deletions.
@@ -798,12 +798,10 @@ private void resizeAndRehashIfNeeded() {

IntVector newStartIndices = allocMetadataVector(tableSize, EMPTY_SLOT);

int idx = 0;
for (int i = 0; i < batchHolders.size(); i++) {
BatchHolder bh = batchHolders.get(i);
int batchStartIdx = idx;
int batchStartIdx = i * BATCH_SIZE;
bh.rehash(tableSize, newStartIndices, batchStartIdx);
idx += bh.getTargetBatchRowCount();
}

startIndices.clear();
@@ -816,7 +814,7 @@ private void resizeAndRehashIfNeeded() {
logger.debug("Bucket: {}, startIdx[ {} ] = {}.", i, i, startIndices.getAccessor().get(i));
int startIdx = startIndices.getAccessor().get(i);
BatchHolder bh = batchHolders.get((startIdx >>> 16) & BATCH_MASK);
bh.dump(idx);
bh.dump(startIdx);
}
}
resizingTime += System.currentTimeMillis() - t0;

0 comments on commit 7a4ca00

Please sign in to comment.