mirror of
https://github.com/apache/druid.git
synced 2025-02-11 20:45:01 +00:00
The sql standard is not very restrictive regarding this: If AVG is specified and DT is exact numeric, then the declared type of the result is an implemen- tation-defined exact numeric type with precision not less than the precision of DT and scale not less than the scale of DT. so; using the same type is also ok (without patch); however the avg of 0 and 1 is 0 right now because of the retention of the integer typ Postgres,MySql and Oracle and Drill seem to increase precision ; mssql returns 0 http://sqlfiddle.com/#!9/6f7248/1 I think we should also increase precision as its already calculated more precisely
This module provides Druid aggregators based on https://datasketches.apache.org/.
Credits: This module is a result of feedback and work done by following people.
https://github.com/cheddar https://github.com/himanshug https://github.com/leerho https://github.com/will-lauer