Jackie-Jiang commented on code in PR #12227: URL: https://github.com/apache/pinot/pull/12227#discussion_r1508308471
########## pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/ModeAggregationFunction.java: ########## @@ -263,11 +264,14 @@ public void aggregate(int length, AggregationResultHolder aggregationResultHolde // For dictionary-encoded expression, store dictionary ids into the dictId map Dictionary dictionary = blockValSet.getDictionary(); if (dictionary != null) { - int[] dictIds = blockValSet.getDictionaryIdsSV(); + Int2IntOpenHashMap dictIdValueMap = getDictIdCountMap(aggregationResultHolder, dictionary); - for (int i = 0; i < length; i++) { - dictIdValueMap.merge(dictIds[i], 1, Integer::sum); - } + int[] dicts = blockValSet.getDictionaryIdsSV(); Review Comment: lol, you really hate the name `dictIds` -- 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