Jackie-Jiang commented on code in PR #13199: URL: https://github.com/apache/pinot/pull/13199#discussion_r1609264849
########## pinot-core/src/main/java/org/apache/pinot/core/operator/filter/AndFilterOperator.java: ########## @@ -59,13 +60,14 @@ protected BlockDocIdSet getTrues() { protected BlockDocIdSet getFalses() { List<BlockDocIdSet> blockDocIdSets = new ArrayList<>(_filterOperators.size()); for (BaseFilterOperator filterOperator : _filterOperators) { - if (filterOperator.isResultEmpty()) { - blockDocIdSets.add(new MatchAllDocIdSet(_numDocs)); + if (_nullHandlingEnabled) { + blockDocIdSets.add( + new OrDocIdSet(Arrays.asList(filterOperator.getTrues(), filterOperator.getNulls()), _numDocs)); Review Comment: After a second thought, will this be even slower than the original one? Here we are essentially creating an `OrDocIdSet` on every predicate. We want to check whether the filter matches all or empty, then optimize the `DocIdSet` accordingly. -- 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