6 #ifndef __AGGREGATE_HISTOGRAM_H__ 7 #define __AGGREGATE_HISTOGRAM_H__ 45 options(std::map<std::string, std::string>())
81 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_):
137 template<>
struct codec_traits<
gpudb::AggregateHistogramRequest>
143 ::avro::encode(e, v.
start);
144 ::avro::encode(e, v.
end);
151 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
153 const std::vector<size_t> fo = rd->fieldOrder();
155 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
168 ::avro::decode(d, v.
start);
172 ::avro::decode(d, v.
end);
192 ::avro::decode(d, v.
start);
193 ::avro::decode(d, v.
end);
215 counts(std::vector<double>()),
218 info(std::map<std::string, std::string>())
241 std::map<std::string, std::string>
info;
247 template<>
struct codec_traits<
gpudb::AggregateHistogramResponse>
251 ::avro::encode(e, v.
counts);
252 ::avro::encode(e, v.
start);
253 ::avro::encode(e, v.
end);
254 ::avro::encode(e, v.
info);
259 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
261 const std::vector<size_t> fo = rd->fieldOrder();
263 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
268 ::avro::decode(d, v.
counts);
272 ::avro::decode(d, v.
start);
276 ::avro::decode(d, v.
end);
280 ::avro::decode(d, v.
info);
290 ::avro::decode(d, v.
counts);
291 ::avro::decode(d, v.
start);
292 ::avro::decode(d, v.
end);
293 ::avro::decode(d, v.
info);
299 #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.