jihoonson commented on a change in pull request #6505: Add default comparison to HavingSpecMetricComparator for custom Aggregator types URL: https://github.com/apache/incubator-druid/pull/6505#discussion_r227609416
########## File path: processing/src/main/java/org/apache/druid/query/groupby/having/HavingSpecMetricComparator.java ########## @@ -73,6 +73,9 @@ static int compare(String aggregationName, Number value, Map<String, AggregatorF double d = Double.parseDouble(metricValueStr); return Double.compare(d, value.doubleValue()); } + } else if (metricValueObj instanceof Number) { + BigDecimal d = new BigDecimal(metricValueObj.toString()); + return d.compareTo((BigDecimal) value); Review comment: Maybe we need to create another BigDecimal from value as well rather than casting? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org