GPUdb C++ API
Version 5.2.0.0
|
A set of input parameters for aggregateStatistics(const AggregateStatisticsRequest&) const. More...
#include <gpudb/protocol/aggregate_statistics.h>
Public Member Functions | |
AggregateStatisticsRequest () | |
Constructs an AggregateStatisticsRequest object with default parameter values. More... | |
AggregateStatisticsRequest (const std::string &tableName, const std::string &columnName, const std::string &stats, const std::map< std::string, std::string > &options) | |
Constructs an AggregateStatisticsRequest object with the specified parameters. More... | |
Public Attributes | |
std::string | tableName |
std::string | columnName |
std::string | stats |
std::map< std::string, std::string > | options |
A set of input parameters for aggregateStatistics(const AggregateStatisticsRequest&) const.
Calculates the requested statistics of a given column in a given table.
The available statistics are count (number of total objects), mean, stdv (standard deviation), variance, skew, kurtosis, sum, min, max, weighted_average, cardinality (unique count), estimated cardinality, percentile and percentile_rank.
Estimated cardinality is calculated by using the hyperloglog approximation technique.
Percentiles and percentile_ranks are approximate and are calculated using the t-digest algorithm. They must include the desired percentile/percentile_rank. To compute multiple percentiles each value must be specified separately (i.e. 'percentile(75.0),percentile(99.0),percentile_rank(1234.56),percentile_rank(-5)').
The weighted average statistic requires a weight_attribute to be specified in options. The weighted average is then defined as the sum of the products of columnName times the weight attribute divided by the sum of the weight attribute.
The response includes a list of the statistics requested along with the count of the number of items in the given set.
Definition at line 40 of file aggregate_statistics.h.
|
inline |
Constructs an AggregateStatisticsRequest object with default parameter values.
Definition at line 47 of file aggregate_statistics.h.
|
inline |
Constructs an AggregateStatisticsRequest object with the specified parameters.
[in] | tableName | Name of the table on which the statistics operation will be performed. |
[in] | columnName | Name of the column for which the statistics are to be calculated. |
[in] | stats | Comma separated list of the statistics to calculate, e.g. "sum,mean". Values: 'count', 'mean', 'stdv', 'variance', 'skew', 'kurtosis', 'sum', 'min', 'max', 'weighted_average', 'cardinality', 'estimated_cardinality', 'percentile', 'percentile_rank'. |
[in] | options | Optional parameters.
|
Definition at line 82 of file aggregate_statistics.h.
std::string gpudb::AggregateStatisticsRequest::columnName |
Definition at line 91 of file aggregate_statistics.h.
std::map<std::string, std::string> gpudb::AggregateStatisticsRequest::options |
Definition at line 93 of file aggregate_statistics.h.
std::string gpudb::AggregateStatisticsRequest::stats |
Definition at line 92 of file aggregate_statistics.h.
std::string gpudb::AggregateStatisticsRequest::tableName |
Definition at line 90 of file aggregate_statistics.h.