GPUdb C++ API  Version 7.2.2.4
aggregate_statistics_by_range.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __AGGREGATE_STATISTICS_BY_RANGE_H__
7 #define __AGGREGATE_STATISTICS_BY_RANGE_H__
8 
9 namespace gpudb
10 {
47  {
53  tableName(std::string()),
54  selectExpression(std::string()),
55  columnName(std::string()),
56  valueColumnName(std::string()),
57  stats(std::string()),
58  start(double()),
59  end(double()),
60  interval(double()),
61  options(std::map<std::string, std::string>())
62  {
63  }
64 
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_):
123  tableName( tableName_ ),
124  selectExpression( selectExpression_ ),
125  columnName( columnName_ ),
126  valueColumnName( valueColumnName_ ),
127  stats( stats_ ),
128  start( start_ ),
129  end( end_ ),
130  interval( interval_ ),
131  options( options_ )
132  {
133  }
134 
141  std::string tableName;
142 
147  std::string selectExpression;
148 
152  std::string columnName;
153 
157  std::string valueColumnName;
158 
164  std::string stats;
165 
169  double start;
170 
174  double end;
175 
181  double interval;
182 
206  std::map<std::string, std::string> options;
207  };
208 } // end namespace gpudb
209 
210 namespace avro
211 {
212  template<> struct codec_traits<gpudb::AggregateStatisticsByRangeRequest>
213  {
214  static void encode(Encoder& e, const gpudb::AggregateStatisticsByRangeRequest& v)
215  {
216  ::avro::encode(e, v.tableName);
217  ::avro::encode(e, v.selectExpression);
218  ::avro::encode(e, v.columnName);
219  ::avro::encode(e, v.valueColumnName);
220  ::avro::encode(e, v.stats);
221  ::avro::encode(e, v.start);
222  ::avro::encode(e, v.end);
223  ::avro::encode(e, v.interval);
224  ::avro::encode(e, v.options);
225  }
226 
227  static void decode(Decoder& d, gpudb::AggregateStatisticsByRangeRequest& v)
228  {
229  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
230  {
231  const std::vector<size_t> fo = rd->fieldOrder();
232 
233  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
234  {
235  switch (*it)
236  {
237  case 0:
238  ::avro::decode(d, v.tableName);
239  break;
240 
241  case 1:
242  ::avro::decode(d, v.selectExpression);
243  break;
244 
245  case 2:
246  ::avro::decode(d, v.columnName);
247  break;
248 
249  case 3:
250  ::avro::decode(d, v.valueColumnName);
251  break;
252 
253  case 4:
254  ::avro::decode(d, v.stats);
255  break;
256 
257  case 5:
258  ::avro::decode(d, v.start);
259  break;
260 
261  case 6:
262  ::avro::decode(d, v.end);
263  break;
264 
265  case 7:
266  ::avro::decode(d, v.interval);
267  break;
268 
269  case 8:
270  ::avro::decode(d, v.options);
271  break;
272 
273  default:
274  break;
275  }
276  }
277  }
278  else
279  {
280  ::avro::decode(d, v.tableName);
281  ::avro::decode(d, v.selectExpression);
282  ::avro::decode(d, v.columnName);
283  ::avro::decode(d, v.valueColumnName);
284  ::avro::decode(d, v.stats);
285  ::avro::decode(d, v.start);
286  ::avro::decode(d, v.end);
287  ::avro::decode(d, v.interval);
288  ::avro::decode(d, v.options);
289  }
290  }
291  };
292 } // end namespace avro
293 
294 namespace gpudb
295 {
302  {
308  stats(std::map<std::string, std::vector<double> >()),
309  info(std::map<std::string, std::string>())
310  {
311  }
312 
319  std::map<std::string, std::vector<double> > stats;
320 
324  std::map<std::string, std::string> info;
325  };
326 } // end namespace gpudb
327 
328 namespace avro
329 {
330  template<> struct codec_traits<gpudb::AggregateStatisticsByRangeResponse>
331  {
332  static void encode(Encoder& e, const gpudb::AggregateStatisticsByRangeResponse& v)
333  {
334  ::avro::encode(e, v.stats);
335  ::avro::encode(e, v.info);
336  }
337 
338  static void decode(Decoder& d, gpudb::AggregateStatisticsByRangeResponse& v)
339  {
340  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
341  {
342  const std::vector<size_t> fo = rd->fieldOrder();
343 
344  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
345  {
346  switch (*it)
347  {
348  case 0:
349  ::avro::decode(d, v.stats);
350  break;
351 
352  case 1:
353  ::avro::decode(d, v.info);
354  break;
355 
356  default:
357  break;
358  }
359  }
360  }
361  else
362  {
363  ::avro::decode(d, v.stats);
364  ::avro::decode(d, v.info);
365  }
366  }
367  };
368 } // end namespace avro
369 
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.
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.