Skip to content

Commit b3310ba

Browse files
chenjian2664wendigo
authored andcommitted
Fix batch size condition in AsyncResultIterator
Previously, rows were not handled in batch
1 parent 68664d1 commit b3310ba

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)