Commits


François Saint-Jacques authored and Wes McKinney committed 9a10baed558
ARROW-4124: [C++] Draft Aggregate and Sum kernels This is a draft of the aggregate kernel interface. The goal of publishing this PR is to gather feedback on the design and architecture. - `AggregateUnaryKernel/AggregateState` decomposition kernel implementation and parallel execution. The implementor of an `AggregateState` does not need to be concerned about details of parallel execution (minus the thread-safety of the `Consume` method). It also allows user to implement custom aggregates. - `Monoid` a class representing a mathematical monoid. - `MonoidAggregateState` a specific implementation of `AggregateState` that is generic enough to support various monoids. Note that it is limited to monoid known at compile time, usually monoids on primitives. Currently only the "Sum" kernel is implemented. Further kernels will be implemented in follow up patches. The current draft does not take into account filtering and groups. I do have an idea of how this would be done, e.g. add `AggregateState::Consume(..., const Mask &filter)`. I delayed incorporating this interface until we implement the filtering kernel. This is going to be done in a different ticket. Author: François Saint-Jacques <fsaintjacques@gmail.com> Author: Wes McKinney <wesm+git@apache.org> Closes #3407 from fsaintjacques/ARROW-4124-aggregation-kernel and squashes the following commits: 568ba09e6 <Wes McKinney> Add braces c272059d8 <Wes McKinney> Some code review comments 985e9ce4c <Wes McKinney> Rename arrow-compute-sum-benchmark/test 27d32b538 <Wes McKinney> Use multiplication method with sentinel benchmarks 9bd1f2512 <François Saint-Jacques> Warnings f062737f6 <François Saint-Jacques> Use bigger width type for accumulator. cadc7099a <François Saint-Jacques> Remove mutex header 0ff3bae9d <François Saint-Jacques> lint and format d5ea4c826 <François Saint-Jacques> Refactor 440ed3d99 <François Saint-Jacques> Doxygen error c4b5b214c <François Saint-Jacques> Fix lint issues. f1044bea8 <François Saint-Jacques> Fix warnings 92a4e0388 <François Saint-Jacques> Fix 3e9451eda <François Saint-Jacques> ARROW-4124: Implement Aggregate and Sum kernels