GPUdb C++ API  Version 7.2.2.4
aggregate_statistics.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_H__
7 #define __AGGREGATE_STATISTICS_H__
8 
9 namespace gpudb
10 {
77  {
83  tableName(std::string()),
84  columnName(std::string()),
85  stats(std::string()),
86  options(std::map<std::string, std::string>())
87  {
88  }
89 
195  AggregateStatisticsRequest(const std::string& tableName_, const std::string& columnName_, const std::string& stats_, const std::map<std::string, std::string>& options_):
196  tableName( tableName_ ),
197  columnName( columnName_ ),
198  stats( stats_ ),
199  options( options_ )
200  {
201  }
202 
209  std::string tableName;
210 
215  std::string columnName;
216 
273  std::string stats;
274 
292  std::map<std::string, std::string> options;
293  };
294 } // end namespace gpudb
295 
296 namespace avro
297 {
298  template<> struct codec_traits<gpudb::AggregateStatisticsRequest>
299  {
300  static void encode(Encoder& e, const gpudb::AggregateStatisticsRequest& v)
301  {
302  ::avro::encode(e, v.tableName);
303  ::avro::encode(e, v.columnName);
304  ::avro::encode(e, v.stats);
305  ::avro::encode(e, v.options);
306  }
307 
308  static void decode(Decoder& d, gpudb::AggregateStatisticsRequest& v)
309  {
310  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
311  {
312  const std::vector<size_t> fo = rd->fieldOrder();
313 
314  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
315  {
316  switch (*it)
317  {
318  case 0:
319  ::avro::decode(d, v.tableName);
320  break;
321 
322  case 1:
323  ::avro::decode(d, v.columnName);
324  break;
325 
326  case 2:
327  ::avro::decode(d, v.stats);
328  break;
329 
330  case 3:
331  ::avro::decode(d, v.options);
332  break;
333 
334  default:
335  break;
336  }
337  }
338  }
339  else
340  {
341  ::avro::decode(d, v.tableName);
342  ::avro::decode(d, v.columnName);
343  ::avro::decode(d, v.stats);
344  ::avro::decode(d, v.options);
345  }
346  }
347  };
348 } // end namespace avro
349 
350 namespace gpudb
351 {
358  {
364  stats(std::map<std::string, double>()),
365  info(std::map<std::string, std::string>())
366  {
367  }
368 
373  std::map<std::string, double> stats;
374 
378  std::map<std::string, std::string> info;
379  };
380 } // end namespace gpudb
381 
382 namespace avro
383 {
384  template<> struct codec_traits<gpudb::AggregateStatisticsResponse>
385  {
386  static void encode(Encoder& e, const gpudb::AggregateStatisticsResponse& v)
387  {
388  ::avro::encode(e, v.stats);
389  ::avro::encode(e, v.info);
390  }
391 
392  static void decode(Decoder& d, gpudb::AggregateStatisticsResponse& v)
393  {
394  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
395  {
396  const std::vector<size_t> fo = rd->fieldOrder();
397 
398  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
399  {
400  switch (*it)
401  {
402  case 0:
403  ::avro::decode(d, v.stats);
404  break;
405 
406  case 1:
407  ::avro::decode(d, v.info);
408  break;
409 
410  default:
411  break;
412  }
413  }
414  }
415  else
416  {
417  ::avro::decode(d, v.stats);
418  ::avro::decode(d, v.info);
419  }
420  }
421  };
422 } // end namespace avro
423 
424 #endif // __AGGREGATE_STATISTICS_H__
AggregateStatisticsRequest()
Constructs an AggregateStatisticsRequest object with default parameters.
A set of parameters for GPUdb::aggregateStatistics.
A set of results returned by GPUdb::aggregateStatistics.
std::map< std::string, double > stats
(statistic name, double value) pairs of the requested statistics, including the total count by defaul...
AggregateStatisticsResponse()
Constructs an AggregateStatisticsResponse object with default parameters.
std::string tableName
Name of the table on which the statistics operation will be performed, in [ schema_name....
std::map< std::string, std::string > info
Additional information.
std::string columnName
Name of the primary column for which the statistics are to be calculated.
std::string stats
Comma separated list of the statistics to calculate, e.g.
AggregateStatisticsRequest(const std::string &tableName_, const std::string &columnName_, const std::string &stats_, const std::map< std::string, std::string > &options_)
Constructs an AggregateStatisticsRequest object with the specified parameters.
std::map< std::string, std::string > options
Optional parameters.