Rounding does not seem to work for me in the arithmetic operator under post aggregations.
I am providing “round”: true flag which is being ignored by Druid. My post aggregation arithmetic expression looks like a + b * c / d
Has anyone faced similar issue?
Rounding is not supported on the arithmetic post-agg, it’s only for Cardinality and HyperUniques: https://github.com/apache/incubator-druid/pull/4720
You could try the Expression post-agg which appears to be undocumented right now:
@JsonSubTypes.Type(name = "expression", value = ExpressionPostAggregator.class),
@JsonProperty("name") String name,
@JsonProperty("expression") String expression,
@JsonProperty("ordering") String ordering
The expressions language does have a round function: http://druid.io/docs/latest/misc/math-expr.html
Great! Thanks for the information Jon.