GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gpudb::AggregateStatisticsByRangeRequest Struct Reference

A set of input parameters for const. More...

#include <gpudb/protocol/aggregate_statistics_by_range.h>

Public Member Functions

 AggregateStatisticsByRangeRequest ()
 Constructs an AggregateStatisticsByRangeRequest object with default parameter values. More...
 
 AggregateStatisticsByRangeRequest (const std::string &tableName_, const std::string &selectExpression_, const std::string &columnName_, const std::string &valueColumnName_, const std::string &stats_, const double start_, const double end_, const double interval_, const std::map< std::string, std::string > &options_)
 Constructs an AggregateStatisticsByRangeRequest object with the specified parameters. More...
 

Public Attributes

std::string tableName
 
std::string selectExpression
 
std::string columnName
 
std::string valueColumnName
 
std::string stats
 
double start
 
double end
 
double interval
 
std::map< std::string,
std::string > 
options
 

Detailed Description

A set of input parameters for const.

Divides the given set into bins and calculates statistics of the values of a value-column in each bin. The bins are based on the values of a given binning-column. The statistics that may be requested are mean, stdv (standard deviation), variance, skew, kurtosis, sum, min, max, first, last and weighted average. In addition to the requested statistics the count of total samples in each bin is returned. This counts vector is just the histogram of the column used to divide the set members into bins. The weighted average statistic requires a weight_column to be specified in options. The weighted average is then defined as the sum of the products of the value column times the weight column divided by the sum of the weight column.

There are two methods for binning the set members. In the first, which can be used for numeric valued binning-columns, a min, max and interval are specified. The number of bins, nbins, is the integer upper bound of (max-min)/interval. Values that fall in the range [min+n*interval,min+(n+1)*interval) are placed in the nth bin where n ranges from 0..nbin-2. The final bin is [min+(nbin-1)*interval,max]. In the second method, options bin_values specifies a list of binning column values. Binning-columns whose value matches the nth member of the bin_values list are placed in the nth bin. When a list is provided the binning-column must be of type string or int.

NOTE: The Kinetica instance being accessed must be running a CUDA (GPU-based) build to service this request.

Definition at line 42 of file aggregate_statistics_by_range.h.

Constructor & Destructor Documentation

gpudb::AggregateStatisticsByRangeRequest::AggregateStatisticsByRangeRequest ( )
inline

Constructs an AggregateStatisticsByRangeRequest object with default parameter values.

Definition at line 49 of file aggregate_statistics_by_range.h.

gpudb::AggregateStatisticsByRangeRequest::AggregateStatisticsByRangeRequest ( const std::string &  tableName_,
const std::string &  selectExpression_,
const std::string &  columnName_,
const std::string &  valueColumnName_,
const std::string &  stats_,
const double  start_,
const double  end_,
const double  interval_,
const std::map< std::string, std::string > &  options_ 
)
inline

Constructs an AggregateStatisticsByRangeRequest object with the specified parameters.

Parameters
[in]tableName_Name of the table on which the ranged-statistics operation will be performed.
[in]selectExpression_For a non-empty expression statistics are calculated for those records for which the expression is true.
[in]columnName_Name of the binning-column used to divide the set samples into bins.
[in]valueColumnName_Name of the value-column for which statistics are to be computed.
[in]stats_A string of comma separated list of the statistics to calculate, e.g. 'sum,mean'. Available statistics: mean, stdv (standard deviation), variance, skew, kurtosis, sum.
[in]start_The lower bound of the binning-column.
[in]end_The upper bound of the binning-column.
[in]interval_The interval of a bin. Set members fall into bin i if the binning-column falls in the range [start+interval*i, start+interval*(i+1)).
[in]options_Map of optional parameters:

Definition at line 108 of file aggregate_statistics_by_range.h.

Member Data Documentation

std::string gpudb::AggregateStatisticsByRangeRequest::columnName

Definition at line 123 of file aggregate_statistics_by_range.h.

double gpudb::AggregateStatisticsByRangeRequest::end

Definition at line 127 of file aggregate_statistics_by_range.h.

double gpudb::AggregateStatisticsByRangeRequest::interval

Definition at line 128 of file aggregate_statistics_by_range.h.

std::map<std::string, std::string> gpudb::AggregateStatisticsByRangeRequest::options

Definition at line 129 of file aggregate_statistics_by_range.h.

std::string gpudb::AggregateStatisticsByRangeRequest::selectExpression

Definition at line 122 of file aggregate_statistics_by_range.h.

double gpudb::AggregateStatisticsByRangeRequest::start

Definition at line 126 of file aggregate_statistics_by_range.h.

std::string gpudb::AggregateStatisticsByRangeRequest::stats

Definition at line 125 of file aggregate_statistics_by_range.h.

std::string gpudb::AggregateStatisticsByRangeRequest::tableName

Definition at line 121 of file aggregate_statistics_by_range.h.

std::string gpudb::AggregateStatisticsByRangeRequest::valueColumnName

Definition at line 124 of file aggregate_statistics_by_range.h.


The documentation for this struct was generated from the following file: