anuragrai16 commented on code in PR #18475:
URL: https://github.com/apache/pinot/pull/18475#discussion_r3414932169
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/query/FilteredGroupByOperator.java:
##########
@@ -160,6 +161,12 @@ protected GroupByResultsBlock getNextBlock() {
}
_numDocsScanned += numDocsScanned;
+ QueryScanCostContext scanCost = getScanCostContext();
+ if (scanCost != null) {
+ scanCost.addDocsScanned(numDocsScanned);
+ scanCost.addEntriesScannedPostFilter(
+ (long) numDocsScanned * projectOperator.getNumColumnsProjected());
Review Comment:
`entriesScannedInFilter` is already pushed by DocIdSetOperator, which is a
child in the operator tree. FilteredGroupByOperator doesn't need to push it.
1. DocIdSetOperator is the only place where filter scan entries are counted,
it's where the filter tree executes and
`_blockDocIdSet.getNumEntriesScannedInFilter()` is available.
2. By the time FilteredGroupByOperator processes a value block, the filter
scan already happened and was already pushed to QueryScanCostContext by
DocIdSetOperator.
same pattern applies to every other query operator (AggregationOperator,
GroupByOperator, etc.), none of them push entriesScannedInFilter either.
--
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]