Rounding does not work on arithmetic operator

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:



You could try the Expression post-agg which appears to be undocumented right now:

@JsonSubTypes.Type(name = "expression", value = ExpressionPostAggregator.class),

public ExpressionPostAggregator(
    @JsonProperty("name") String name,
    @JsonProperty("expression") String expression,
    @JsonProperty("ordering") String ordering

The expressions language does have a round function:

  • Jon

Great! Thanks for the information Jon.