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