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
Piotr Grabowski committed Jan 15, 2024
1 parent a04fadf commit 3191a58
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 3191a58

Please sign in to comment.