Skip to content

Commit 9a29d59

Browse files
committed
Fix batch size condition in AsyncResultIterator
Previously, rows were not handled in batch
1 parent 99b40f8 commit 9a29d59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/trino-jdbc/src/main/java/io/trino/jdbc/AsyncResultIterator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public class AsyncResultIterator
7575
warningsManager.addWarnings(results.getWarnings());
7676
for (List<Object> row : client.currentRows()) {
7777
rowQueue.put(row);
78-
if (rowsProcessed++ % BATCH_SIZE == 0) {
78+
if (rowsProcessed++ == BATCH_SIZE) {
7979
semaphore.release(rowsProcessed);
8080
rowsProcessed = 0;
8181
}

0 commit comments

Comments
 (0)