nizhikov commented on code in PR #11613: URL: https://github.com/apache/ignite/pull/11613#discussion_r1816116839
########## modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/AbstractReducer.java: ########## @@ -319,20 +320,23 @@ protected final ReduceResultPage createDummyLastPage(ReduceResultPage lastPage) * @param iter Current iterator. * @return The same or new iterator. */ - protected final Iterator<Value[]> pollNextIterator(Pollable<ReduceResultPage> queue, Iterator<Value[]> iter) { - if (!iter.hasNext()) { + protected final IgniteIntObjectTuple<Iterator<Value[]>> pollNextIterator( + Pollable<ReduceResultPage> queue, + IgniteIntObjectTuple<Iterator<Value[]>> iter + ) { + if (!iter.get2().hasNext()) { try (TraceSurroundings ignored = MTC.support(ctx.tracing().create(SQL_PAGE_FETCH, MTC.span()))) { ReduceResultPage page = takeNextPage(queue); if (!page.isLast()) page.fetchNextPage(); // Failed will throw an exception here. - iter = page.rows(); + iter = F.intt(page.columnCount(), page.rows()); Review Comment: In the case of distributed query - empty page can be received from some node (columnCount == 0) and the other page with requested column count will be recieved afterwards -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org