cypherean commented on code in PR #16583:
URL: https://github.com/apache/pinot/pull/16583#discussion_r2284967503


##########
pinot-core/src/main/java/org/apache/pinot/core/operator/docidsets/AndDocIdSet.java:
##########
@@ -104,6 +112,9 @@ public BlockDocIdIterator iterator() {
     _docIdSets = null;
     _numEntriesScannedInFilter = numEntriesScannedForNonScanBasedDocIdSets;
     _scanBasedDocIdSets.set(scanBasedDocIdSets);
+    if (_isAlwaysFalse) {

Review Comment:
   We compute numEntriesScanned based on the above. We can instead create a new 
wrapper EmptyDocIdSetWithScanCount, that stores numEntriesScanned but resorts 
to an EmptyDocIdSet otherwise.



##########
pinot-core/src/main/java/org/apache/pinot/core/operator/docidsets/BitmapDocIdSet.java:
##########
@@ -43,4 +46,12 @@ public BitmapDocIdIterator iterator() {
   public long getNumEntriesScannedInFilter() {
     return 0L;
   }
+
+  @Override
+  public BlockDocIdSet getOptimizedDocIdSet() {
+    if (_bitmap != null && _bitmap.isEmpty()) {

Review Comment:
   synced offline: _bitmap can be null while still containing valid records



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

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to