You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/02/14 03:19:49 UTC

[GitHub] yurmix commented on issue #6320: Moving Average query type

yurmix commented on issue #6320: Moving Average query type
URL: https://github.com/apache/incubator-druid/issues/6320#issuecomment-463471858
 
 
   @jihoonson The similarity between `PostAggregator` and `Averager` is that they both run post the query aggregation. They run in the Broker on the aggregated resultset. But while `PostAggregator` works on a single `Row` in the post-aggregation result set, `Averager` aggregated data over multiple Rows.
   
   How? Averagers collects previous records into a buffer (called `BaseAverager.buckets`) and uses that to compute a moving-average result for each Row. In the code, there is a collaberation between `Averager` and `MovingAverageIterable` to iterate over GroupBy's result-set while keeping a buffer and while returning the averager's result per each record.
   
   You can take a look at MovingAverageIterable and how `MovingAverageIterable#computeMovingAverage()` is calling `Averager#getResult()` -> `BaseAverager#computeResults()`.
   https://github.com/apache/incubator-druid/pull/6430/files#diff-0cbedd32f92fe9f41d7c47a628a2974fR270

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org