Abstract base class for specifying the desired aggregation in an aggregation_request.
More...
#include <aggregation.hpp>
Public Types | |
| enum | Kind : int32_t { SUM = 0 , SUM_OVERFLOW , SUM_WITH_OVERFLOW = SUM_OVERFLOW , PRODUCT , MIN , MAX , COUNT_VALID , COUNT_ALL , ANY , ALL , SUM_OF_SQUARES , MEAN , M2 , VARIANCE , STD , MEDIAN , QUANTILE , ARGMAX , ARGMIN , NUNIQUE , NTH_ELEMENT , ROW_NUMBER , EWMA , RANK , COLLECT_LIST , COLLECT_SET , LEAD , LAG , PTX , CUDA , HOST_UDF , MERGE_LISTS , MERGE_SETS , MERGE_M2 , COVARIANCE , CORRELATION , TDIGEST , MERGE_TDIGEST , HISTOGRAM , MERGE_HISTOGRAM , BITWISE_AGG , TOP_K , INVALID } |
| Possible aggregation operations. More... | |
Public Member Functions | |
| aggregation () | |
| Default constructor. More... | |
| aggregation (Kind kind_) | |
| Construct a new aggregation object from a given aggregation kind. More... | |
| bool | is_valid () const |
| Checks if the aggregation is valid, i.e. it was constructed with a valid value for the aggregation kind. More... | |
| virtual bool | is_equal (aggregation const &other) const |
| Compares two aggregation objects for equality. More... | |
| virtual size_t | do_hash () const |
| Computes the hash value of the aggregation. More... | |
| virtual std::unique_ptr< aggregation > | clone () const =0 |
| Clones the aggregation object. More... | |
Public Attributes | |
| Kind | kind |
| The aggregation to perform. | |
Abstract base class for specifying the desired aggregation in an aggregation_request.
All aggregations must derive from this class to implement the pure virtual functions and potentially encapsulate additional information needed to compute the aggregation.
Definition at line 74 of file aggregation.hpp.
| enum cudf::aggregation::Kind : int32_t |
Possible aggregation operations.
| Enumerator | |
|---|---|
| SUM | sum reduction |
| SUM_OVERFLOW | sum reduction with overflow detection |
| SUM_WITH_OVERFLOW |
|
| PRODUCT | product reduction |
| MIN | min reduction |
| MAX | max reduction |
| COUNT_VALID | count number of valid elements |
| COUNT_ALL | count number of elements |
| ANY | any reduction |
| ALL | all reduction |
| SUM_OF_SQUARES | sum of squares reduction |
| MEAN | arithmetic mean reduction |
| M2 | sum of squares of differences from the mean |
| VARIANCE | variance |
| STD | standard deviation |
| MEDIAN | median reduction |
| QUANTILE | compute specified quantile(s) |
| ARGMAX | Index of max element. |
| ARGMIN | Index of min element. |
| NUNIQUE | count number of unique elements |
| NTH_ELEMENT | get the nth element |
| ROW_NUMBER | get row-number of current index (relative to rolling window) |
| EWMA | get exponential weighted moving average at current index |
| RANK | get rank of current index |
| COLLECT_LIST | collect values into a list |
| COLLECT_SET | collect values into a list without duplicate entries |
| LEAD | window function, accesses row at specified offset following current row |
| LAG | window function, accesses row at specified offset preceding current row |
| PTX | PTX based UDF aggregation. |
| CUDA | CUDA based UDF aggregation. |
| HOST_UDF | host based UDF aggregation |
| MERGE_LISTS | merge multiple lists values into one list |
| MERGE_SETS | merge multiple lists values into one list then drop duplicate entries |
| MERGE_M2 | merge partial values of M2 aggregation, |
| COVARIANCE | covariance between two sets of elements |
| CORRELATION | correlation between two sets of elements |
| TDIGEST | create a tdigest from a set of input values |
| MERGE_TDIGEST | create a tdigest by merging multiple tdigests together |
| HISTOGRAM | compute frequency of each element |
| MERGE_HISTOGRAM | merge partial values of HISTOGRAM aggregation |
| BITWISE_AGG | bitwise aggregation on numeric columns |
| TOP_K | top k elements in a group |
| INVALID | invalid aggregation, used as a placeholder when default-constructed |
Definition at line 79 of file aggregation.hpp.
|
inline |
Default constructor.
This constructor should not be called at all. It only exists to satisfy the compiler requirements.
Definition at line 132 of file aggregation.hpp.
|
inline |
Construct a new aggregation object from a given aggregation kind.
| kind_ | aggregation::Kind enum value |
Definition at line 142 of file aggregation.hpp.
|
pure virtual |
Clones the aggregation object.
|
inlinevirtual |
Computes the hash value of the aggregation.
Definition at line 167 of file aggregation.hpp.
|
inlinevirtual |
Compares two aggregation objects for equality.
| other | The other aggregation to compare with |
Definition at line 160 of file aggregation.hpp.
|
inline |
Checks if the aggregation is valid, i.e. it was constructed with a valid value for the aggregation kind.
Definition at line 152 of file aggregation.hpp.