This is an automated email from the ASF dual-hosted git repository.
boaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git
The following commit(s) were added to refs/heads/master by this push:
new 7a4ca00 DRILL-6626: Fixed an IndexOutOfBoundException during
aggregator rehash
7a4ca00 is described below
commit 7a4ca00e86030fc9f866c3f31e1207e96c534b78
Author: Salim Achouche <[email protected]>
AuthorDate: Mon Jul 23 13:17:08 2018 -0700
DRILL-6626: Fixed an IndexOutOfBoundException during aggregator rehash
---
.../apache/drill/exec/physical/impl/common/HashTableTemplate.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git
a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/HashTableTemplate.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/HashTableTemplate.java
index 756b3f3..83b72d7 100644
---
a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/HashTableTemplate.java
+++
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/HashTableTemplate.java
@@ -798,12 +798,10 @@ public abstract class HashTableTemplate implements
HashTable {
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 @@ public abstract class HashTableTemplate implements
HashTable {
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;