siddharthteotia commented on code in PR #8993:
URL: https://github.com/apache/pinot/pull/8993#discussion_r910670825


##########
pinot-core/src/main/java/org/apache/pinot/core/operator/dociditerators/MVScanDocIdIterator.java:
##########
@@ -85,9 +90,12 @@ public MutableRoaringBitmap applyAnd(ImmutableRoaringBitmap 
docIds) {
       int limit = docIdIterator.nextBatch(buffer);
       for (int i = 0; i < limit; i++) {
         int nextDocId = buffer[i];
-        int length = _reader.getDictIdMV(nextDocId, _dictIdBuffer, 
_readerContext);
-        _numEntriesScanned += length;
-        if (_predicateEvaluator.applyMV(_dictIdBuffer, length)) {
+        int[] length = new int[]{0};

Review Comment:
   This seems like it can be avoided. Unnecessary object construction for every 
iteration in the loop ? Can we avoid passing this to doesValueMatch for pass by 
reference ? If this is needed to increment , then we can increment the counter 
in the matcher itself ?



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

Reply via email to