6 #ifndef __AGGREGATE_HISTOGRAM_H__ 7 #define __AGGREGATE_HISTOGRAM_H__ 45 options(std::map<std::string, std::string>())
91 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_):
155 template<>
struct codec_traits<
gpudb::AggregateHistogramRequest>
161 ::avro::encode(e, v.
start);
162 ::avro::encode(e, v.
end);
169 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
171 const std::vector<size_t> fo = rd->fieldOrder();
173 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
186 ::avro::decode(d, v.
start);
190 ::avro::decode(d, v.
end);
210 ::avro::decode(d, v.
start);
211 ::avro::decode(d, v.
end);
233 counts(std::vector<double>()),
236 info(std::map<std::string, std::string>())
259 std::map<std::string, std::string>
info;
265 template<>
struct codec_traits<
gpudb::AggregateHistogramResponse>
269 ::avro::encode(e, v.
counts);
270 ::avro::encode(e, v.
start);
271 ::avro::encode(e, v.
end);
272 ::avro::encode(e, v.
info);
277 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
279 const std::vector<size_t> fo = rd->fieldOrder();
281 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
286 ::avro::decode(d, v.
counts);
290 ::avro::decode(d, v.
start);
294 ::avro::decode(d, v.
end);
298 ::avro::decode(d, v.
info);
308 ::avro::decode(d, v.
counts);
309 ::avro::decode(d, v.
start);
310 ::avro::decode(d, v.
end);
311 ::avro::decode(d, v.
info);
317 #endif // __AGGREGATE_HISTOGRAM_H__ std::string columnName
Name of a column or an expression of one or more column names over which the histogram will be calcul...
std::string tableName
Name of the table on which the operation will be performed.
AggregateHistogramRequest()
Constructs an AggregateHistogramRequest object with default parameters.
std::map< std::string, std::string > options
Optional parameters.
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.
AggregateHistogramResponse()
Constructs an AggregateHistogramResponse object with default parameters.
double interval
The size of each bin within the start and end parameters.
double start
Lower end value of the histogram interval, inclusive.
A set of results returned by GPUdb::aggregateHistogram.
double start
Value of start.
A set of parameters for GPUdb::aggregateHistogram.
std::vector< double > counts
The array of calculated values that represents the histogram data points.
std::map< std::string, std::string > info
Additional information.
double end
Upper end value of the histogram interval, inclusive.