Jackie-Jiang commented on pull request #8411: URL: https://github.com/apache/pinot/pull/8411#issuecomment-1079449227
This is great optimization. For count queries, we should avoid iterating the bitmaps to construct the `DocIdSetBlock`. The current implementation can only optimize the `BitmapBasedFilterOperator`, but ideally we want to optimize all count queries (e.g. count on sorted index can be significantly optimized to `endDocId - startDocId`). I'd suggest adding a new method `int getNumMatchingDocs()` to `BaseFilterOperator` to force all filter operators to support it, then this optimization can be applied to all queries with `count(*)` without group-by -- 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