@Override
      public boolean hasNext() {
        boolean hasNext = false;
        for (int i = 0; i < iterators.length; ++i) {
          if (i == lastReturnedIteratorIndex) {
            hasNext = iterators[i].hasNext();
          } else {
            hasNext = !iterators[i].EOF;
          }
          if (hasNext) {
            break;
          }
        }
        return hasNext;
      }
The n - way merge results returns a sorted results on the cumulative sorted results for
partitioned region based query
geode-core/src/main/java/org/apache/geode/cache/query/internal/NWayMergeResults.java