himanshug edited a comment on issue #8071: add aggregators for computing 
mean/average
URL: 
https://github.com/apache/incubator-druid/issues/8071#issuecomment-513954218
 
 
   yeah that algorithm is to avoid overflowing `sum` . You are right that 
instructions for divisions are slower in theory (but hardware has come a long 
way...), but I will benchmark the division based algo presented here and post 
the findings. 
   That said, for some users it might be important to not have overflow problem 
even if division in this algorithm can potentially make things slower and Using 
sum, count aggs with a post agg for division would still be available.
   
   That said, I think main reason, for me right now, introducing a mean 
aggregator is for convenience of its usage in druid native query spec which is 
what currently being used in my project. (Actually real story is 
    slightly more complicated :P ) .

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to