GPUdb C++ API  Version 6.2.0.3
aggregate_statistics.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the GPUdb schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __AGGREGATE_STATISTICS_H__
7 #define __AGGREGATE_STATISTICS_H__
8 
9 namespace gpudb
10 {
11 
55  {
56 
62  tableName(std::string()),
63  columnName(std::string()),
64  stats(std::string()),
65  options(std::map<std::string, std::string>())
66  {
67  }
68 
146  AggregateStatisticsRequest(const std::string& tableName_, const std::string& columnName_, const std::string& stats_, const std::map<std::string, std::string>& options_):
147  tableName( tableName_ ),
148  columnName( columnName_ ),
149  stats( stats_ ),
150  options( options_ )
151  {
152  }
153 
154  std::string tableName;
155  std::string columnName;
156  std::string stats;
157  std::map<std::string, std::string> options;
158  };
159 }
160 
161 namespace avro
162 {
163  template<> struct codec_traits<gpudb::AggregateStatisticsRequest>
164  {
165  static void encode(Encoder& e, const gpudb::AggregateStatisticsRequest& v)
166  {
167  ::avro::encode(e, v.tableName);
168  ::avro::encode(e, v.columnName);
169  ::avro::encode(e, v.stats);
170  ::avro::encode(e, v.options);
171  }
172 
173  static void decode(Decoder& d, gpudb::AggregateStatisticsRequest& v)
174  {
175  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
176  {
177  const std::vector<size_t> fo = rd->fieldOrder();
178 
179  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
180  {
181  switch (*it)
182  {
183  case 0:
184  ::avro::decode(d, v.tableName);
185  break;
186 
187  case 1:
188  ::avro::decode(d, v.columnName);
189  break;
190 
191  case 2:
192  ::avro::decode(d, v.stats);
193  break;
194 
195  case 3:
196  ::avro::decode(d, v.options);
197  break;
198 
199  default:
200  break;
201  }
202  }
203  }
204  else
205  {
206  ::avro::decode(d, v.tableName);
207  ::avro::decode(d, v.columnName);
208  ::avro::decode(d, v.stats);
209  ::avro::decode(d, v.options);
210  }
211  }
212  };
213 }
214 
215 namespace gpudb
216 {
217 
261  {
262 
268  stats(std::map<std::string, double>())
269  {
270  }
271 
272  std::map<std::string, double> stats;
273  };
274 }
275 
276 namespace avro
277 {
278  template<> struct codec_traits<gpudb::AggregateStatisticsResponse>
279  {
280  static void encode(Encoder& e, const gpudb::AggregateStatisticsResponse& v)
281  {
282  ::avro::encode(e, v.stats);
283  }
284 
285  static void decode(Decoder& d, gpudb::AggregateStatisticsResponse& v)
286  {
287  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
288  {
289  const std::vector<size_t> fo = rd->fieldOrder();
290 
291  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
292  {
293  switch (*it)
294  {
295  case 0:
296  ::avro::decode(d, v.stats);
297  break;
298 
299  default:
300  break;
301  }
302  }
303  }
304  else
305  {
306  ::avro::decode(d, v.stats);
307  }
308  }
309  };
310 }
311 
312 #endif
AggregateStatisticsRequest()
Constructs an AggregateStatisticsRequest object with default parameter values.
A set of input parameters for aggregateStatistics(const AggregateStatisticsRequest&) const...
A set of output parameters for aggregateStatistics(const AggregateStatisticsRequest&) const...
std::map< std::string, double > stats
AggregateStatisticsResponse()
Constructs an AggregateStatisticsResponse object with default parameter values.
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