walterddr commented on a change in pull request #8408: URL: https://github.com/apache/pinot/pull/8408#discussion_r837716857
########## File path: pinot-core/src/main/java/org/apache/pinot/core/operator/query/NonScanBasedAggregationOperator.java ########## @@ -122,8 +131,26 @@ protected IntermediateResultsBlock getNextBlock() { return new IntermediateResultsBlock(_aggregationFunctions, aggregationResults, false); } - private double toDouble(Comparable value) { - if (value instanceof Number) { + private static Double getMinValue(DataSource dataSource) { + Dictionary dictionary = dataSource.getDictionary(); + if (dictionary != null) { + return toDouble(dictionary.getMinVal()); + } + return toDouble(dataSource.getDataSourceMetadata().getMinValue()); Review comment: oh i meant can we create an `ImmutableList<Dictionary> dataSourceDictionaries` in constructor without extracting it on each block / agg function since the list of dataSource is final. But yeah agree it is not per row so perf difference should be minimal. -- 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