Skip to content

Commit

Permalink
Properly handle empty pages in MultiPageResultSet
Browse files Browse the repository at this point in the history
If there are multiple empty pages consecutively, the old
logic did not handle the situation correctly. Use a while
loop to move past many possible empty pages.

(cherry picked from commit 40da47a)
  • Loading branch information
avelanarius authored and Bouncheck committed Dec 5, 2023
1 parent 10dd58f commit c9f3eb6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected Row computeNext() {
}

private void maybeMoveToNextPage() {
if (!currentRows.hasNext() && currentPage.hasMorePages()) {
while (!currentRows.hasNext() && currentPage.hasMorePages()) {
BlockingOperation.checkNotDriverThread();
AsyncResultSet nextPage =
CompletableFutures.getUninterruptibly(currentPage.fetchNextPage());
Expand Down

0 comments on commit c9f3eb6

Please sign in to comment.