fx19880617 commented on a change in pull request #6109: URL: https://github.com/apache/incubator-pinot/pull/6109#discussion_r501269268
########## File path: pinot-core/src/main/java/org/apache/pinot/core/startree/operator/StarTreeFilterOperator.java ########## @@ -121,81 +117,23 @@ // Star-tree private final StarTreeV2 _starTreeV2; - // Set of group-by columns - private final Set<String> _groupByColumns; // Map from column to predicate evaluators private final Map<String, List<PredicateEvaluator>> _predicateEvaluatorsMap; - // Map from column to matching dictionary ids - private final Map<String, IntSet> _matchingDictIdsMap; + // Set of group-by columns + private final Set<String> _groupByColumns; private final Map<String, String> _debugOptions; boolean _resultEmpty = false; - public StarTreeFilterOperator(StarTreeV2 starTreeV2, @Nullable FilterContext filter, - @Nullable Set<String> groupByColumns, @Nullable Map<String, String> debugOptions) { + public StarTreeFilterOperator(StarTreeV2 starTreeV2, Map<String, List<PredicateEvaluator>> predicateEvaluatorsMap, + Set<String> groupByColumns, @Nullable Map<String, String> debugOptions) { _starTreeV2 = starTreeV2; - _groupByColumns = groupByColumns != null ? new HashSet<>(groupByColumns) : Collections.emptySet(); + _predicateEvaluatorsMap = predicateEvaluatorsMap; + _groupByColumns = groupByColumns; Review comment: do we need to make a copy of groupByColumns? ########## File path: pinot-core/src/main/java/org/apache/pinot/core/startree/operator/StarTreeFilterOperator.java ########## @@ -267,19 +206,19 @@ private StarTreeResult traverseStarTree() { // Use BFS to traverse the star tree Queue<SearchEntry> queue = new LinkedList<>(); queue.add(new SearchEntry(starTreeRootNode, _predicateEvaluatorsMap.keySet(), _groupByColumns)); - while (!queue.isEmpty()) { - SearchEntry searchEntry = queue.remove(); + SearchEntry searchEntry; + while ((searchEntry = queue.poll()) != null) { Review comment: while (searchEntry = queue.poll() != null) { ---------------------------------------------------------------- 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. 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