nizarhejazi commented on code in PR #9086: URL: https://github.com/apache/pinot/pull/9086#discussion_r929328945
########## pinot-core/src/main/java/org/apache/pinot/core/plan/AggregationPlanNode.java: ########## @@ -179,20 +181,29 @@ public Operator<IntermediateResultsBlock> buildNonFilteredAggOperator() { BaseFilterOperator filterOperator = filterPlanNode.run(); if (canOptimizeFilteredCount(filterOperator, aggregationFunctions)) { - return new FastFilteredCountOperator(aggregationFunctions, filterOperator, _indexSegment.getSegmentMetadata()); + return new FastFilteredCountOperator(aggregationFunctions, filterOperator, _indexSegment.getSegmentMetadata(), + _queryContext.isNullHandlingEnabled()); } - if (filterOperator.isResultMatchingAll()) { + boolean skipNonScanBasedAggregation = false; + if (filterOperator.isResultMatchingAll() && !_queryContext.isNullHandlingEnabled()) { if (isFitForNonScanBasedPlan(aggregationFunctions, _indexSegment)) { DataSource[] dataSources = new DataSource[aggregationFunctions.length]; for (int i = 0; i < aggregationFunctions.length; i++) { List<?> inputExpressions = aggregationFunctions[i].getInputExpressions(); if (!inputExpressions.isEmpty()) { String column = ((ExpressionContext) inputExpressions.get(0)).getIdentifier(); dataSources[i] = _indexSegment.getDataSource(column); + NullValueVectorReader nullValueReader = dataSources[i].getNullValueVector(); Review Comment: I have it here (similar to `DistinctPlanNode`) because some some code (e.g. IS NULL, IS NOT NULL operators) handles nulls even when `nullHandlingEnabled` is set to False. Should we still remove this check? -- 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