You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/05/04 21:44:01 UTC

[GitHub] [incubator-pinot] mcvsubbu commented on a change in pull request #5328: Fix the bug introduced in #5132 where ScanBasedDocIdIterator.isMatch() is still required

mcvsubbu commented on a change in pull request #5328:
URL: https://github.com/apache/incubator-pinot/pull/5328#discussion_r419747204



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/operator/dociditerators/AndDocIdIterator.java
##########
@@ -102,6 +102,17 @@ public int next() {
           i = -1;
         }
       }
+      if (hasScanBasedIterators && i == docIdIterators.length - 1) {
+        // this means we found the docId common to all nonScanBased iterators, now we need to ensure
+        // that its also found in scanBasedIterator, if not matched, we restart the intersection
+        for (ScanBasedDocIdIterator iterator : scanBasedDocIdIterators) {
+          if (!iterator.isMatch(currentMax)) {
+            i = -1;

Review comment:
       Can you restructure the (outer) loop so that it is a while with some condition rather than a `for(i = ..)` in which we change the loop counter? I understand it was already that way.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org