richardstartin commented on a change in pull request #8411:
URL: https://github.com/apache/pinot/pull/8411#discussion_r837847120



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/operator/filter/AndFilterOperator.java
##########
@@ -45,6 +47,39 @@ protected FilterBlock getNextBlock() {
     return new FilterBlock(new AndDocIdSet(filterBlockDocIdSets));
   }
 
+  @Override
+  public boolean canOptimizeCount() {
+    boolean allChildrenCanProduceBitmaps = true;
+    for (BaseFilterOperator child : _filterOperators) {
+      allChildrenCanProduceBitmaps &= (child.isResultMatchingAll() | 
child.canProduceBitmaps());

Review comment:
       I haven't terminated early for a couple of reasons
   1. this list having 10 elements would be a monster query
   2. it looks ugly
   3. it's better for people who use debuggers if there's only one exit point




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