Jackie-Jiang commented on a change in pull request #4585: Presence vector
URL: https://github.com/apache/incubator-pinot/pull/4585#discussion_r338325341
 
 

 ##########
 File path: 
pinot-core/src/main/java/org/apache/pinot/core/operator/docidsets/BitmapDocIdSet.java
 ##########
 @@ -33,7 +36,8 @@
   public BitmapDocIdSet(ImmutableRoaringBitmap[] bitmaps, int startDocId, int 
endDocId, boolean exclusive) {
     int numBitmaps = bitmaps.length;
     if (numBitmaps > 1) {
-      MutableRoaringBitmap orBitmap = MutableRoaringBitmap.or(bitmaps);
+      Iterator iterator = Arrays.asList(bitmaps).iterator();
+      MutableRoaringBitmap orBitmap = MutableRoaringBitmap.or(iterator, 
startDocId, endDocId + 1);
 
 Review comment:
   This could backfire because there is an extra step of selecting range for 
each bitmap. I checked the code and seems this step is always redundant because 
we always use 0 as startDocId and numDocs-1 as endDocId. Also this is not 
related to this PR. @kishoreg Do you see actual performance gain for this 
change?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to