Druid post aggregations arithmetic division precision

Hi,

I am using druid post aggregation to do a division, for example, 10/3, and would like to get 3.333, instead of 3.3333333333333333333333333333333.

Is it possible?

I ALSO tried to use javascript but get an error:

“Unknown exception” “Instantiation of [simple type, class io.druid.query.aggregation.post.JavaScriptPostAggregator] value failed: JavaScript is disabled. (through reference chain: java.util.ArrayList[0]->java.util.ArrayList[0])” “com.fasterxml.jackson.databind.JsonMappingException” null

Does this mean that I have an error in my javascript code or I need to enable javascript some where?

Thanks

Hi,
you need to set “druid.javascript.disabled” to false in your runtime.properties to enable javascript.