GPUdb C++ API  Version 7.2.2.4
gpudb::AggregateHistogramRequest Struct Reference

A set of parameters for GPUdb::aggregateHistogram. More...

#include <gpudb/protocol/aggregate_histogram.h>

Public Member Functions

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

Public Attributes

std::string tableName
 Name of the table on which the operation will be performed. More...
 
std::string columnName
 Name of a column or an expression of one or more column names over which the histogram will be calculated. More...
 
double start
 Lower end value of the histogram interval, inclusive. More...
 
double end
 Upper end value of the histogram interval, inclusive. More...
 
double interval
 The size of each bin within the start and end parameters. More...
 
std::map< std::string, std::string > options
 Optional parameters. More...
 

Detailed Description

A set of parameters for GPUdb::aggregateHistogram.

Performs a histogram calculation given a table, a column, and an interval function. The interval is used to produce bins of that size and the result, computed over the records falling within each bin, is returned. For each bin, the start value is inclusive, but the end value is exclusive–except for the very last bin for which the end value is also inclusive. The value returned for each bin is the number of records in it, except when a column name is provided as a value_column. In this latter case the sum of the values corresponding to the value_column is used as the result instead. The total number of bins requested cannot exceed 10,000.

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

Definition at line 33 of file aggregate_histogram.h.

Constructor & Destructor Documentation

◆ AggregateHistogramRequest() [1/2]

gpudb::AggregateHistogramRequest::AggregateHistogramRequest ( )
inline

Constructs an AggregateHistogramRequest object with default parameters.

Definition at line 39 of file aggregate_histogram.h.

◆ AggregateHistogramRequest() [2/2]

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

Constructs an AggregateHistogramRequest object with the specified parameters.

Parameters
[in]tableName_Name of the table on which the operation will be performed. Must be an existing table, in [schema_name.]table_name format, using standard name resolution rules.
[in]columnName_Name of a column or an expression of one or more column names over which the histogram will be calculated.
[in]start_Lower end value of the histogram interval, inclusive.
[in]end_Upper end value of the histogram interval, inclusive.
[in]interval_The size of each bin within the start and end parameters.
[in]options_Optional parameters.
  • aggregate_histogram_value_column: The name of the column to use when calculating the bin values (values are summed). The column must be a numerical type (int, double, long, float).
The default value is an empty map.

Definition at line 81 of file aggregate_histogram.h.

Member Data Documentation

◆ columnName

std::string gpudb::AggregateHistogramRequest::columnName

Name of a column or an expression of one or more column names over which the histogram will be calculated.

Definition at line 103 of file aggregate_histogram.h.

◆ end

double gpudb::AggregateHistogramRequest::end

Upper end value of the histogram interval, inclusive.

Definition at line 113 of file aggregate_histogram.h.

◆ interval

double gpudb::AggregateHistogramRequest::interval

The size of each bin within the start and end parameters.

Definition at line 118 of file aggregate_histogram.h.

◆ options

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

Optional parameters.

  • aggregate_histogram_value_column: The name of the column to use when calculating the bin values (values are summed). The column must be a numerical type (int, double, long, float).

The default value is an empty map.

Definition at line 131 of file aggregate_histogram.h.

◆ start

double gpudb::AggregateHistogramRequest::start

Lower end value of the histogram interval, inclusive.

Definition at line 108 of file aggregate_histogram.h.

◆ tableName

std::string gpudb::AggregateHistogramRequest::tableName

Name of the table on which the operation will be performed.

Must be an existing table, in [ schema_name. ]table_name format, using standard name resolution rules.

Definition at line 97 of file aggregate_histogram.h.


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