richardstartin commented on code in PR #8764: URL: https://github.com/apache/pinot/pull/8764#discussion_r880647573
########## pinot-core/src/main/java/org/apache/pinot/core/operator/dociditerators/SVScanDocIdIterator.java: ########## @@ -55,6 +58,33 @@ public SVScanDocIdIterator(PredicateEvaluator predicateEvaluator, ForwardIndexRe @Override public int next() { + if (_cursor >= _batchSize) { + int limit; + int batchSize = 0; + do { + limit = Math.min(_numDocs - _nextDocId, OPTIMAL_ITERATOR_BATCH_SIZE); + if (limit > 0) { + for (int i = 0; i < limit; i++) { + _batch[i] = _nextDocId + i; + } + batchSize = _valueMatcher.matchValues(limit, _batch); + _nextDocId += limit; + _numEntriesScanned += limit; + } + } while (limit > 0 & batchSize == 0); Review Comment: No -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org