You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2018/10/24 00:28:59 UTC
[GitHub] jihoonson commented on a change in pull request #6505: Add default
comparison to HavingSpecMetricComparator for custom Aggregator types
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org