6 #ifndef __AGGREGATE_STATISTICS_BY_RANGE_H__ 7 #define __AGGREGATE_STATISTICS_BY_RANGE_H__ 61 options(std::map<std::string, std::string>())
122 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_):
212 template<>
struct codec_traits<
gpudb::AggregateStatisticsByRangeRequest>
220 ::avro::encode(e, v.
stats);
221 ::avro::encode(e, v.
start);
222 ::avro::encode(e, v.
end);
229 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
231 const std::vector<size_t> fo = rd->fieldOrder();
233 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
254 ::avro::decode(d, v.
stats);
258 ::avro::decode(d, v.
start);
262 ::avro::decode(d, v.
end);
284 ::avro::decode(d, v.
stats);
285 ::avro::decode(d, v.
start);
286 ::avro::decode(d, v.
end);
308 stats(std::map<std::string, std::vector<double> >()),
309 info(std::map<std::string, std::string>())
319 std::map<std::string, std::vector<double> >
stats;
324 std::map<std::string, std::string>
info;
330 template<>
struct codec_traits<
gpudb::AggregateStatisticsByRangeResponse>
334 ::avro::encode(e, v.
stats);
335 ::avro::encode(e, v.
info);
340 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
342 const std::vector<size_t> fo = rd->fieldOrder();
344 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
349 ::avro::decode(d, v.
stats);
353 ::avro::decode(d, v.
info);
363 ::avro::decode(d, v.
stats);
364 ::avro::decode(d, v.
info);
370 #endif // __AGGREGATE_STATISTICS_BY_RANGE_H__
AggregateStatisticsByRangeResponse()
Constructs an AggregateStatisticsByRangeResponse object with default parameters.
std::string stats
A string of comma separated list of the statistics to calculate, e.g. 'sum,mean'.
std::string valueColumnName
Name of the value-column for which statistics are to be computed.
double end
The upper bound of the binning-column.
std::string tableName
Name of the table on which the ranged-statistics operation will be performed, in [ schema_name....
std::string selectExpression
For a non-empty expression statistics are calculated for those records for which the expression is tr...
std::map< std::string, std::string > info
Additional information.
std::string columnName
Name of the binning-column used to divide the set samples into bins.
AggregateStatisticsByRangeRequest()
Constructs an AggregateStatisticsByRangeRequest object with default parameters.
A set of parameters for GPUdb::aggregateStatisticsByRange.
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.
double interval
The interval of a bin.
std::map< std::string, std::vector< double > > stats
A map with a key for each statistic in the stats input parameter having a value that is a vector of t...
std::map< std::string, std::string > options
Map of optional parameters:
A set of results returned by GPUdb::aggregateStatisticsByRange.
double start
The lower bound of the binning-column.