OmniSciDB  fe05a0c208
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ttypes.py
Go to the documentation of this file.
1 #
2 # Autogenerated by Thrift Compiler (0.13.0)
3 #
4 # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5 #
6 # options string: py
7 #
8 
9 from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
10 from thrift.protocol.TProtocol import TProtocolException
11 from thrift.TRecursive import fix_spec
12 
13 import sys
14 
15 from thrift.transport import TTransport
16 all_structs = []
17 
18 
19 class TExtArgumentType(object):
20  Int8 = 0
21  Int16 = 1
22  Int32 = 2
23  Int64 = 3
24  Float = 4
25  Double = 5
26  Void = 6
27  PInt8 = 7
28  PInt16 = 8
29  PInt32 = 9
30  PInt64 = 10
31  PFloat = 11
32  PDouble = 12
33  PBool = 13
34  Bool = 14
35  ArrayInt8 = 15
36  ArrayInt16 = 16
37  ArrayInt32 = 17
38  ArrayInt64 = 18
39  ArrayFloat = 19
40  ArrayDouble = 20
41  ArrayBool = 21
42  GeoPoint = 22
43  GeoLineString = 23
44  Cursor = 24
45  GeoPolygon = 25
46  GeoMultiPolygon = 26
47  ColumnInt8 = 27
48  ColumnInt16 = 28
49  ColumnInt32 = 29
50  ColumnInt64 = 30
51  ColumnFloat = 31
52  ColumnDouble = 32
53  ColumnBool = 33
54  TextEncodingNone = 34
55  TextEncodingDict8 = 35
56  TextEncodingDict16 = 36
57  TextEncodingDict32 = 37
58 
59  _VALUES_TO_NAMES = {
60  0: "Int8",
61  1: "Int16",
62  2: "Int32",
63  3: "Int64",
64  4: "Float",
65  5: "Double",
66  6: "Void",
67  7: "PInt8",
68  8: "PInt16",
69  9: "PInt32",
70  10: "PInt64",
71  11: "PFloat",
72  12: "PDouble",
73  13: "PBool",
74  14: "Bool",
75  15: "ArrayInt8",
76  16: "ArrayInt16",
77  17: "ArrayInt32",
78  18: "ArrayInt64",
79  19: "ArrayFloat",
80  20: "ArrayDouble",
81  21: "ArrayBool",
82  22: "GeoPoint",
83  23: "GeoLineString",
84  24: "Cursor",
85  25: "GeoPolygon",
86  26: "GeoMultiPolygon",
87  27: "ColumnInt8",
88  28: "ColumnInt16",
89  29: "ColumnInt32",
90  30: "ColumnInt64",
91  31: "ColumnFloat",
92  32: "ColumnDouble",
93  33: "ColumnBool",
94  34: "TextEncodingNone",
95  35: "TextEncodingDict8",
96  36: "TextEncodingDict16",
97  37: "TextEncodingDict32",
98  }
99 
100  _NAMES_TO_VALUES = {
101  "Int8": 0,
102  "Int16": 1,
103  "Int32": 2,
104  "Int64": 3,
105  "Float": 4,
106  "Double": 5,
107  "Void": 6,
108  "PInt8": 7,
109  "PInt16": 8,
110  "PInt32": 9,
111  "PInt64": 10,
112  "PFloat": 11,
113  "PDouble": 12,
114  "PBool": 13,
115  "Bool": 14,
116  "ArrayInt8": 15,
117  "ArrayInt16": 16,
118  "ArrayInt32": 17,
119  "ArrayInt64": 18,
120  "ArrayFloat": 19,
121  "ArrayDouble": 20,
122  "ArrayBool": 21,
123  "GeoPoint": 22,
124  "GeoLineString": 23,
125  "Cursor": 24,
126  "GeoPolygon": 25,
127  "GeoMultiPolygon": 26,
128  "ColumnInt8": 27,
129  "ColumnInt16": 28,
130  "ColumnInt32": 29,
131  "ColumnInt64": 30,
132  "ColumnFloat": 31,
133  "ColumnDouble": 32,
134  "ColumnBool": 33,
135  "TextEncodingNone": 34,
136  "TextEncodingDict8": 35,
137  "TextEncodingDict16": 36,
138  "TextEncodingDict32": 37,
139  }
140 
141 
142 class TOutputBufferSizeType(object):
143  kConstant = 0
144  kUserSpecifiedConstantParameter = 1
145  kUserSpecifiedRowMultiplier = 2
146 
147  _VALUES_TO_NAMES = {
148  0: "kConstant",
149  1: "kUserSpecifiedConstantParameter",
150  2: "kUserSpecifiedRowMultiplier",
151  }
152 
153  _NAMES_TO_VALUES = {
154  "kConstant": 0,
155  "kUserSpecifiedConstantParameter": 1,
156  "kUserSpecifiedRowMultiplier": 2,
157  }
158 
159 
160 class TUserDefinedFunction(object):
161  """
162  Attributes:
163  - name
164  - argTypes
165  - retType
166 
167  """
168 
169 
170  def __init__(self, name=None, argTypes=None, retType=None,):
171  self.name = name
172  self.argTypes = argTypes
173  self.retType = retType
174 
175  def read(self, iprot):
176  if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
177  iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
178  return
179  iprot.readStructBegin()
180  while True:
181  (fname, ftype, fid) = iprot.readFieldBegin()
182  if ftype == TType.STOP:
183  break
184  if fid == 1:
185  if ftype == TType.STRING:
186  self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
187  else:
188  iprot.skip(ftype)
189  elif fid == 2:
190  if ftype == TType.LIST:
191  self.argTypes = []
192  (_etype3, _size0) = iprot.readListBegin()
193  for _i4 in range(_size0):
194  _elem5 = iprot.readI32()
195  self.argTypes.append(_elem5)
196  iprot.readListEnd()
197  else:
198  iprot.skip(ftype)
199  elif fid == 3:
200  if ftype == TType.I32:
201  self.retType = iprot.readI32()
202  else:
203  iprot.skip(ftype)
204  else:
205  iprot.skip(ftype)
206  iprot.readFieldEnd()
207  iprot.readStructEnd()
208 
209  def write(self, oprot):
210  if oprot._fast_encode is not None and self.thrift_spec is not None:
211  oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
212  return
213  oprot.writeStructBegin('TUserDefinedFunction')
214  if self.name is not None:
215  oprot.writeFieldBegin('name', TType.STRING, 1)
216  oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
217  oprot.writeFieldEnd()
218  if self.argTypes is not None:
219  oprot.writeFieldBegin('argTypes', TType.LIST, 2)
220  oprot.writeListBegin(TType.I32, len(self.argTypes))
221  for iter6 in self.argTypes:
222  oprot.writeI32(iter6)
223  oprot.writeListEnd()
224  oprot.writeFieldEnd()
225  if self.retType is not None:
226  oprot.writeFieldBegin('retType', TType.I32, 3)
227  oprot.writeI32(self.retType)
228  oprot.writeFieldEnd()
229  oprot.writeFieldStop()
230  oprot.writeStructEnd()
231 
232  def validate(self):
233  return
234 
235  def __repr__(self):
236  L = ['%s=%r' % (key, value)
237  for key, value in self.__dict__.items()]
238  return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
239 
240  def __eq__(self, other):
241  return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
242 
243  def __ne__(self, other):
244  return not (self == other)
245 
246 
248  """
249  Attributes:
250  - name
251  - sizerType
252  - sizerArgPos
253  - inputArgTypes
254  - outputArgTypes
255  - sqlArgTypes
256 
257  """
258 
259 
260  def __init__(self, name=None, sizerType=None, sizerArgPos=None, inputArgTypes=None, outputArgTypes=None, sqlArgTypes=None,):
261  self.name = name
262  self.sizerType = sizerType
263  self.sizerArgPos = sizerArgPos
264  self.inputArgTypes = inputArgTypes
265  self.outputArgTypes = outputArgTypes
266  self.sqlArgTypes = sqlArgTypes
267 
268  def read(self, iprot):
269  if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
270  iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
271  return
272  iprot.readStructBegin()
273  while True:
274  (fname, ftype, fid) = iprot.readFieldBegin()
275  if ftype == TType.STOP:
276  break
277  if fid == 1:
278  if ftype == TType.STRING:
279  self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
280  else:
281  iprot.skip(ftype)
282  elif fid == 2:
283  if ftype == TType.I32:
284  self.sizerType = iprot.readI32()
285  else:
286  iprot.skip(ftype)
287  elif fid == 3:
288  if ftype == TType.I32:
289  self.sizerArgPos = iprot.readI32()
290  else:
291  iprot.skip(ftype)
292  elif fid == 4:
293  if ftype == TType.LIST:
294  self.inputArgTypes = []
295  (_etype10, _size7) = iprot.readListBegin()
296  for _i11 in range(_size7):
297  _elem12 = iprot.readI32()
298  self.inputArgTypes.append(_elem12)
299  iprot.readListEnd()
300  else:
301  iprot.skip(ftype)
302  elif fid == 5:
303  if ftype == TType.LIST:
304  self.outputArgTypes = []
305  (_etype16, _size13) = iprot.readListBegin()
306  for _i17 in range(_size13):
307  _elem18 = iprot.readI32()
308  self.outputArgTypes.append(_elem18)
309  iprot.readListEnd()
310  else:
311  iprot.skip(ftype)
312  elif fid == 6:
313  if ftype == TType.LIST:
314  self.sqlArgTypes = []
315  (_etype22, _size19) = iprot.readListBegin()
316  for _i23 in range(_size19):
317  _elem24 = iprot.readI32()
318  self.sqlArgTypes.append(_elem24)
319  iprot.readListEnd()
320  else:
321  iprot.skip(ftype)
322  else:
323  iprot.skip(ftype)
324  iprot.readFieldEnd()
325  iprot.readStructEnd()
326 
327  def write(self, oprot):
328  if oprot._fast_encode is not None and self.thrift_spec is not None:
329  oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
330  return
331  oprot.writeStructBegin('TUserDefinedTableFunction')
332  if self.name is not None:
333  oprot.writeFieldBegin('name', TType.STRING, 1)
334  oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
335  oprot.writeFieldEnd()
336  if self.sizerType is not None:
337  oprot.writeFieldBegin('sizerType', TType.I32, 2)
338  oprot.writeI32(self.sizerType)
339  oprot.writeFieldEnd()
340  if self.sizerArgPos is not None:
341  oprot.writeFieldBegin('sizerArgPos', TType.I32, 3)
342  oprot.writeI32(self.sizerArgPos)
343  oprot.writeFieldEnd()
344  if self.inputArgTypes is not None:
345  oprot.writeFieldBegin('inputArgTypes', TType.LIST, 4)
346  oprot.writeListBegin(TType.I32, len(self.inputArgTypes))
347  for iter25 in self.inputArgTypes:
348  oprot.writeI32(iter25)
349  oprot.writeListEnd()
350  oprot.writeFieldEnd()
351  if self.outputArgTypes is not None:
352  oprot.writeFieldBegin('outputArgTypes', TType.LIST, 5)
353  oprot.writeListBegin(TType.I32, len(self.outputArgTypes))
354  for iter26 in self.outputArgTypes:
355  oprot.writeI32(iter26)
356  oprot.writeListEnd()
357  oprot.writeFieldEnd()
358  if self.sqlArgTypes is not None:
359  oprot.writeFieldBegin('sqlArgTypes', TType.LIST, 6)
360  oprot.writeListBegin(TType.I32, len(self.sqlArgTypes))
361  for iter27 in self.sqlArgTypes:
362  oprot.writeI32(iter27)
363  oprot.writeListEnd()
364  oprot.writeFieldEnd()
365  oprot.writeFieldStop()
366  oprot.writeStructEnd()
367 
368  def validate(self):
369  return
370 
371  def __repr__(self):
372  L = ['%s=%r' % (key, value)
373  for key, value in self.__dict__.items()]
374  return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
375 
376  def __eq__(self, other):
377  return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
378 
379  def __ne__(self, other):
380  return not (self == other)
381 all_structs.append(TUserDefinedFunction)
382 TUserDefinedFunction.thrift_spec = (
383  None, # 0
384  (1, TType.STRING, 'name', 'UTF8', None, ), # 1
385  (2, TType.LIST, 'argTypes', (TType.I32, None, False), None, ), # 2
386  (3, TType.I32, 'retType', None, None, ), # 3
387 )
388 all_structs.append(TUserDefinedTableFunction)
389 TUserDefinedTableFunction.thrift_spec = (
390  None, # 0
391  (1, TType.STRING, 'name', 'UTF8', None, ), # 1
392  (2, TType.I32, 'sizerType', None, None, ), # 2
393  (3, TType.I32, 'sizerArgPos', None, None, ), # 3
394  (4, TType.LIST, 'inputArgTypes', (TType.I32, None, False), None, ), # 4
395  (5, TType.LIST, 'outputArgTypes', (TType.I32, None, False), None, ), # 5
396  (6, TType.LIST, 'sqlArgTypes', (TType.I32, None, False), None, ), # 6
397 )
398 fix_spec(all_structs)
399 del all_structs
std::string join(T const &container, std::string const &delim)