GPUdb C++ API  Version 7.2.2.4
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 
158  std::map<std::string, std::string> info;
159  };
160 } // end namespace gpudb
161 
162 namespace avro
163 {
164  template<> struct codec_traits<gpudb::AggregateMinMaxResponse>
165  {
166  static void encode(Encoder& e, const gpudb::AggregateMinMaxResponse& v)
167  {
168  ::avro::encode(e, v.min);
169  ::avro::encode(e, v.max);
170  ::avro::encode(e, v.info);
171  }
172 
173  static void decode(Decoder& d, gpudb::AggregateMinMaxResponse& 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.min);
185  break;
186 
187  case 1:
188  ::avro::decode(d, v.max);
189  break;
190 
191  case 2:
192  ::avro::decode(d, v.info);
193  break;
194 
195  default:
196  break;
197  }
198  }
199  }
200  else
201  {
202  ::avro::decode(d, v.min);
203  ::avro::decode(d, v.max);
204  ::avro::decode(d, v.info);
205  }
206  }
207  };
208 } // end namespace avro
209 
210 #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.