Fix breaking while exceeding max intermediate rows.

This commit is contained in:
zhaown 2015-07-19 10:41:53 +08:00
parent 39c55b417e
commit 524b05f073
1 changed files with 2 additions and 2 deletions

View File

@ -366,11 +366,11 @@ public class GroupByQueryEngine
} }
cursor.advance(); cursor.advance();
} }
while (!cursor.isDone()) { while (!cursor.isDone() && rowUpdater.getNumRows() < config.getMaxIntermediateRows()) {
ByteBuffer key = ByteBuffer.allocate(dimensions.size() * Ints.BYTES); ByteBuffer key = ByteBuffer.allocate(dimensions.size() * Ints.BYTES);
unprocessedKeys = rowUpdater.updateValues(key, dimensions); unprocessedKeys = rowUpdater.updateValues(key, dimensions);
if (unprocessedKeys != null || rowUpdater.getNumRows() > config.getMaxIntermediateRows()) { if (unprocessedKeys != null) {
break; break;
} }