GPUdb C++ API  Version 7.2.3.0
aggregate_min_max.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_MIN_MAX_H__
7 #define __AGGREGATE_MIN_MAX_H__
8 
9 namespace gpudb
10 {
20  {
25  tableName(std::string()),
26  columnName(std::string()),
27  options(std::map<std::string, std::string>())
28  {
29  }
30 
47  AggregateMinMaxRequest(const std::string& tableName_, const std::string& columnName_, const std::map<std::string, std::string>& options_):
48  tableName( tableName_ ),
49  columnName( columnName_ ),
50  options( options_ )
51  {
52  }
53 
60  std::string tableName;
61 
66  std::string columnName;
67 
71  std::map<std::string, std::string> options;
72  };
73 } // end namespace gpudb
74 
75 namespace avro
76 {
77  template<> struct codec_traits<gpudb::AggregateMinMaxRequest>
78  {
79  static void encode(Encoder& e, const gpudb::AggregateMinMaxRequest& v)
80  {
81  ::avro::encode(e, v.tableName);
82  ::avro::encode(e, v.columnName);
83  ::avro::encode(e, v.options);
84  }
85 
86  static void decode(Decoder& d, gpudb::AggregateMinMaxRequest& v)
87  {
88  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
89  {
90  const std::vector<size_t> fo = rd->fieldOrder();
91 
92  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
93  {
94  switch (*it)
95  {
96  case 0:
97  ::avro::decode(d, v.tableName);
98  break;
99 
100  case 1:
101  ::avro::decode(d, v.columnName);
102  break;
103 
104  case 2:
105  ::avro::decode(d, v.options);
106  break;
107 
108  default:
109  break;
110  }
111  }
112  }
113  else
114  {
115  ::avro::decode(d, v.tableName);
116  ::avro::decode(d, v.columnName);
117  ::avro::decode(d, v.options);
118  }
119  }
120  };
121 } // end namespace avro
122 
123 namespace gpudb
124 {
131  {
137  min(double()),
138  max(double()),
139  info(std::map<std::string, std::string>())
140  {
141  }
142 
147  double min;
148 
153  double max;
154 
169  std::map<std::string, std::string> info;
170  };
171 } // end namespace gpudb
172 
173 namespace avro
174 {
175  template<> struct codec_traits<gpudb::AggregateMinMaxResponse>
176  {
177  static void encode(Encoder& e, const gpudb::AggregateMinMaxResponse& v)
178  {
179  ::avro::encode(e, v.min);
180  ::avro::encode(e, v.max);
181  ::avro::encode(e, v.info);
182  }
183 
184  static void decode(Decoder& d, gpudb::AggregateMinMaxResponse& v)
185  {
186  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
187  {
188  const std::vector<size_t> fo = rd->fieldOrder();
189 
190  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
191  {
192  switch (*it)
193  {
194  case 0:
195  ::avro::decode(d, v.min);
196  break;
197 
198  case 1:
199  ::avro::decode(d, v.max);
200  break;
201 
202  case 2:
203  ::avro::decode(d, v.info);
204  break;
205 
206  default:
207  break;
208  }
209  }
210  }
211  else
212  {
213  ::avro::decode(d, v.min);
214  ::avro::decode(d, v.max);
215  ::avro::decode(d, v.info);
216  }
217  }
218  };
219 } // end namespace avro
220 
221 #endif // __AGGREGATE_MIN_MAX_H__
std::string tableName
Name of the table on which the operation will be performed.
double min
Minimum value of the columnName.
std::map< std::string, std::string > options
Optional parameters.
std::map< std::string, std::string > info
Additional information.
AggregateMinMaxResponse()
Constructs an AggregateMinMaxResponse object with default parameters.
AggregateMinMaxRequest(const std::string &tableName_, const std::string &columnName_, const std::map< std::string, std::string > &options_)
Constructs an AggregateMinMaxRequest object with the specified parameters.
AggregateMinMaxRequest()
Constructs an AggregateMinMaxRequest object with default parameters.
A set of parameters for GPUdb::aggregateMinMax.
A set of results returned by GPUdb::aggregateMinMax.
double max
Maximum value of the columnName.
std::string columnName
Name of a column or an expression of one or more column on which the min-max will be calculated.