ankitsultana commented on code in PR #16583:
URL: https://github.com/apache/pinot/pull/16583#discussion_r2337087021
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/filter/AndFilterOperator.java:
##########
@@ -52,8 +53,21 @@ public AndFilterOperator(List<BaseFilterOperator>
filterOperators, @Nullable Map
protected BlockDocIdSet getTrues() {
Tracing.activeRecording().setNumChildren(_filterOperators.size());
List<BlockDocIdSet> blockDocIdSets = new
ArrayList<>(_filterOperators.size());
+ long totalEntriesScanned = 0L;
for (BaseFilterOperator filterOperator : _filterOperators) {
- blockDocIdSets.add(filterOperator.getTrues());
+ BlockDocIdSet blockDocIdSet = filterOperator.getTrues();
+ BlockDocIdSet optimizedDocIdSet = blockDocIdSet.getOptimizedDocIdSet();
Review Comment:
Entries scanned can be reported incorrectly here. If `blockDocIdSet` is a
`ShortCircuitingDocIdSet`, the getOptimizedDocIdSet call will return an empty
doc id set, and you will miss out on adding the entries scanned of the nested
doc id set.
I think it's better to add entries scanned in filter to the existing
EmptyDocIdSet. The default instance of EmptyDocIdSet could still be set to zero
entriesScannedInFilter.
--
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]