praveenc7 commented on code in PR #14001: URL: https://github.com/apache/pinot/pull/14001#discussion_r1772579144
########## pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/groupby/DefaultGroupByExecutor.java: ########## @@ -183,4 +194,26 @@ public GroupKeyGenerator getGroupKeyGenerator() { public GroupByResultHolder[] getGroupByResultHolders() { return _groupByResultHolders; } + + private Integer getGroupByResultHolderCapacityBasedOnFilterPredicate(QueryContext queryContext) { + if (queryContext.getFilter() == null || queryContext.getGroupByExpressions() == null) { Review Comment: Refactor the logic to handle both single and multi groupby ########## pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/groupby/DefaultGroupByExecutor.java: ########## @@ -183,4 +194,26 @@ public GroupKeyGenerator getGroupKeyGenerator() { public GroupByResultHolder[] getGroupByResultHolders() { return _groupByResultHolders; } + + private Integer getGroupByResultHolderCapacityBasedOnFilterPredicate(QueryContext queryContext) { + if (queryContext.getFilter() == null || queryContext.getGroupByExpressions() == null) { + return null; + } + + List<FilterContext> filterContexts = queryContext.getFilter().getChildren() != null + ? queryContext.getFilter().getChildren() + : List.of(queryContext.getFilter()); + + Map<ExpressionContext, InPredicate> predicateMap = filterContexts.stream() + .map(FilterContext::getPredicate) + .filter(predicate -> predicate.getType() == Predicate.Type.IN) Review Comment: Added it -- 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