gianm 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_r228362553
##########
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());
Review comment:
This is going to convert metricValueObj to a string and then parse it as a
big decimal in every row, which seems pretty wasteful.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]