The document discusses aggregators, which encapsulate general query logic independently of execution framework. Aggregators compose by allowing their outputs to be inputs of other aggregators. This allows building complex aggregations from simple reusable parts. Algebird is a library that implements many advanced and tested aggregators, like TopK, HyperLogLog, and statistical functions. It works with Scala collections, Scalding, and Spark via composition of prepared, reduced, and presented phases of an aggregator.