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
15 
16 from thrift.transport import TTransport
17 all_structs = []
18 
19 
20 class TResultSetLayout(object):
21  GroupByPerfectHash = 0
22  GroupByBaselineHash = 1
23  Projection = 2
24  NonGroupedAggregate = 3
25 
26  _VALUES_TO_NAMES = {
27  0: "GroupByPerfectHash",
28  1: "GroupByBaselineHash",
29  2: "Projection",
30  3: "NonGroupedAggregate",
31  }
32 
33  _NAMES_TO_VALUES = {
34  "GroupByPerfectHash": 0,
35  "GroupByBaselineHash": 1,
36  "Projection": 2,
37  "NonGroupedAggregate": 3,
38  }
39 
40 
41 class TCountDistinctImplType(object):
42  Invalid = 0
43  Bitmap = 1
44  StdSet = 2
45 
46  _VALUES_TO_NAMES = {
47  0: "Invalid",
48  1: "Bitmap",
49  2: "StdSet",
50  }
51 
52  _NAMES_TO_VALUES = {
53  "Invalid": 0,
54  "Bitmap": 1,
55  "StdSet": 2,
56  }
57 
58 
59 class TAggKind(object):
60  AVG = 0
61  MIN = 1
62  MAX = 2
63  SUM = 3
64  COUNT = 4
65  APPROX_COUNT_DISTINCT = 5
66  SAMPLE = 6
67 
68  _VALUES_TO_NAMES = {
69  0: "AVG",
70  1: "MIN",
71  2: "MAX",
72  3: "SUM",
73  4: "COUNT",
74  5: "APPROX_COUNT_DISTINCT",
75  6: "SAMPLE",
76  }
77 
78  _NAMES_TO_VALUES = {
79  "AVG": 0,
80  "MIN": 1,
81  "MAX": 2,
82  "SUM": 3,
83  "COUNT": 4,
84  "APPROX_COUNT_DISTINCT": 5,
85  "SAMPLE": 6,
86  }
87 
88 
89 class TSlotSize(object):
90  """
91  Attributes:
92  - padded
93  - logical
94 
95  """
96 
97 
98  def __init__(self, padded=None, logical=None,):
99  self.padded = padded
100  self.logical = logical
101 
102  def read(self, iprot):
103  if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
104  iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
105  return
106  iprot.readStructBegin()
107  while True:
108  (fname, ftype, fid) = iprot.readFieldBegin()
109  if ftype == TType.STOP:
110  break
111  if fid == 1:
112  if ftype == TType.I16:
113  self.padded = iprot.readI16()
114  else:
115  iprot.skip(ftype)
116  elif fid == 2:
117  if ftype == TType.I16:
118  self.logical = iprot.readI16()
119  else:
120  iprot.skip(ftype)
121  else:
122  iprot.skip(ftype)
123  iprot.readFieldEnd()
124  iprot.readStructEnd()
125 
126  def write(self, oprot):
127  if oprot._fast_encode is not None and self.thrift_spec is not None:
128  oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
129  return
130  oprot.writeStructBegin('TSlotSize')
131  if self.padded is not None:
132  oprot.writeFieldBegin('padded', TType.I16, 1)
133  oprot.writeI16(self.padded)
134  oprot.writeFieldEnd()
135  if self.logical is not None:
136  oprot.writeFieldBegin('logical', TType.I16, 2)
137  oprot.writeI16(self.logical)
138  oprot.writeFieldEnd()
139  oprot.writeFieldStop()
140  oprot.writeStructEnd()
141 
142  def validate(self):
143  return
144 
145  def __repr__(self):
146  L = ['%s=%r' % (key, value)
147  for key, value in self.__dict__.items()]
148  return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
149 
150  def __eq__(self, other):
151  return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
152 
153  def __ne__(self, other):
154  return not (self == other)
155 
156 
157 class TColSlotContext(object):
158  """
159  Attributes:
160  - slot_sizes
161  - col_to_slot_map
162 
163  """
164 
165 
166  def __init__(self, slot_sizes=None, col_to_slot_map=None,):
167  self.slot_sizes = slot_sizes
168  self.col_to_slot_map = col_to_slot_map
169 
170  def read(self, iprot):
171  if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
172  iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
173  return
174  iprot.readStructBegin()
175  while True:
176  (fname, ftype, fid) = iprot.readFieldBegin()
177  if ftype == TType.STOP:
178  break
179  if fid == 1:
180  if ftype == TType.LIST:
181  self.slot_sizes = []
182  (_etype3, _size0) = iprot.readListBegin()
183  for _i4 in range(_size0):
184  _elem5 = TSlotSize()
185  _elem5.read(iprot)
186  self.slot_sizes.append(_elem5)
187  iprot.readListEnd()
188  else:
189  iprot.skip(ftype)
190  elif fid == 2:
191  if ftype == TType.LIST:
192  self.col_to_slot_map = []
193  (_etype9, _size6) = iprot.readListBegin()
194  for _i10 in range(_size6):
195  _elem11 = []
196  (_etype15, _size12) = iprot.readListBegin()
197  for _i16 in range(_size12):
198  _elem17 = iprot.readI32()
199  _elem11.append(_elem17)
200  iprot.readListEnd()
201  self.col_to_slot_map.append(_elem11)
202  iprot.readListEnd()
203  else:
204  iprot.skip(ftype)
205  else:
206  iprot.skip(ftype)
207  iprot.readFieldEnd()
208  iprot.readStructEnd()
209 
210  def write(self, oprot):
211  if oprot._fast_encode is not None and self.thrift_spec is not None:
212  oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
213  return
214  oprot.writeStructBegin('TColSlotContext')
215  if self.slot_sizes is not None:
216  oprot.writeFieldBegin('slot_sizes', TType.LIST, 1)
217  oprot.writeListBegin(TType.STRUCT, len(self.slot_sizes))
218  for iter18 in self.slot_sizes:
219  iter18.write(oprot)
220  oprot.writeListEnd()
221  oprot.writeFieldEnd()
222  if self.col_to_slot_map is not None:
223  oprot.writeFieldBegin('col_to_slot_map', TType.LIST, 2)
224  oprot.writeListBegin(TType.LIST, len(self.col_to_slot_map))
225  for iter19 in self.col_to_slot_map:
226  oprot.writeListBegin(TType.I32, len(iter19))
227  for iter20 in iter19:
228  oprot.writeI32(iter20)
229  oprot.writeListEnd()
230  oprot.writeListEnd()
231  oprot.writeFieldEnd()
232  oprot.writeFieldStop()
233  oprot.writeStructEnd()
234 
235  def validate(self):
236  return
237 
238  def __repr__(self):
239  L = ['%s=%r' % (key, value)
240  for key, value in self.__dict__.items()]
241  return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
242 
243  def __eq__(self, other):
244  return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
245 
246  def __ne__(self, other):
247  return not (self == other)
248 
249 
251  """
252  Attributes:
253  - impl_type
254  - min_val
255  - bitmap_sz_bits
256  - approximate
257  - device_type
258  - sub_bitmap_count
259 
260  """
261 
262 
263  def __init__(self, impl_type=None, min_val=None, bitmap_sz_bits=None, approximate=None, device_type=None, sub_bitmap_count=None,):
264  self.impl_type = impl_type
265  self.min_val = min_val
266  self.bitmap_sz_bits = bitmap_sz_bits
267  self.approximate = approximate
268  self.device_type = device_type
269  self.sub_bitmap_count = sub_bitmap_count
270 
271  def read(self, iprot):
272  if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
273  iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
274  return
275  iprot.readStructBegin()
276  while True:
277  (fname, ftype, fid) = iprot.readFieldBegin()
278  if ftype == TType.STOP:
279  break
280  if fid == 1:
281  if ftype == TType.I32:
282  self.impl_type = iprot.readI32()
283  else:
284  iprot.skip(ftype)
285  elif fid == 2:
286  if ftype == TType.I64:
287  self.min_val = iprot.readI64()
288  else:
289  iprot.skip(ftype)
290  elif fid == 3:
291  if ftype == TType.I64:
292  self.bitmap_sz_bits = iprot.readI64()
293  else:
294  iprot.skip(ftype)
295  elif fid == 4:
296  if ftype == TType.BOOL:
297  self.approximate = iprot.readBool()
298  else:
299  iprot.skip(ftype)
300  elif fid == 5:
301  if ftype == TType.I32:
302  self.device_type = iprot.readI32()
303  else:
304  iprot.skip(ftype)
305  elif fid == 6:
306  if ftype == TType.I64:
307  self.sub_bitmap_count = iprot.readI64()
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('TCountDistinctDescriptor')
320  if self.impl_type is not None:
321  oprot.writeFieldBegin('impl_type', TType.I32, 1)
322  oprot.writeI32(self.impl_type)
323  oprot.writeFieldEnd()
324  if self.min_val is not None:
325  oprot.writeFieldBegin('min_val', TType.I64, 2)
326  oprot.writeI64(self.min_val)
327  oprot.writeFieldEnd()
328  if self.bitmap_sz_bits is not None:
329  oprot.writeFieldBegin('bitmap_sz_bits', TType.I64, 3)
330  oprot.writeI64(self.bitmap_sz_bits)
331  oprot.writeFieldEnd()
332  if self.approximate is not None:
333  oprot.writeFieldBegin('approximate', TType.BOOL, 4)
334  oprot.writeBool(self.approximate)
335  oprot.writeFieldEnd()
336  if self.device_type is not None:
337  oprot.writeFieldBegin('device_type', TType.I32, 5)
338  oprot.writeI32(self.device_type)
339  oprot.writeFieldEnd()
340  if self.sub_bitmap_count is not None:
341  oprot.writeFieldBegin('sub_bitmap_count', TType.I64, 6)
342  oprot.writeI64(self.sub_bitmap_count)
343  oprot.writeFieldEnd()
344  oprot.writeFieldStop()
345  oprot.writeStructEnd()
346 
347  def validate(self):
348  return
349 
350  def __repr__(self):
351  L = ['%s=%r' % (key, value)
352  for key, value in self.__dict__.items()]
353  return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
354 
355  def __eq__(self, other):
356  return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
357 
358  def __ne__(self, other):
359  return not (self == other)
360 
361 
363  """
364  Attributes:
365  - layout
366  - keyless
367  - entry_count
368  - idx_target_as_key
369  - min_val
370  - max_val
371  - bucket
372  - group_col_widths
373  - key_bytewidth
374  - col_slot_context
375  - target_groupby_indices
376  - count_distinct_descriptors
377  - force_4byte_float
378 
379  """
380 
381 
382  def __init__(self, layout=None, keyless=None, entry_count=None, idx_target_as_key=None, min_val=None, max_val=None, bucket=None, group_col_widths=None, key_bytewidth=None, col_slot_context=None, target_groupby_indices=None, count_distinct_descriptors=None, force_4byte_float=None,):
383  self.layout = layout
384  self.keyless = keyless
385  self.entry_count = entry_count
386  self.idx_target_as_key = idx_target_as_key
387  self.min_val = min_val
388  self.max_val = max_val
389  self.bucket = bucket
390  self.group_col_widths = group_col_widths
391  self.key_bytewidth = key_bytewidth
392  self.col_slot_context = col_slot_context
393  self.target_groupby_indices = target_groupby_indices
394  self.count_distinct_descriptors = count_distinct_descriptors
395  self.force_4byte_float = force_4byte_float
396 
397  def read(self, iprot):
398  if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
399  iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
400  return
401  iprot.readStructBegin()
402  while True:
403  (fname, ftype, fid) = iprot.readFieldBegin()
404  if ftype == TType.STOP:
405  break
406  if fid == 1:
407  if ftype == TType.I32:
408  self.layout = iprot.readI32()
409  else:
410  iprot.skip(ftype)
411  elif fid == 2:
412  if ftype == TType.BOOL:
413  self.keyless = iprot.readBool()
414  else:
415  iprot.skip(ftype)
416  elif fid == 3:
417  if ftype == TType.I32:
418  self.entry_count = iprot.readI32()
419  else:
420  iprot.skip(ftype)
421  elif fid == 4:
422  if ftype == TType.I32:
423  self.idx_target_as_key = iprot.readI32()
424  else:
425  iprot.skip(ftype)
426  elif fid == 5:
427  if ftype == TType.I64:
428  self.min_val = iprot.readI64()
429  else:
430  iprot.skip(ftype)
431  elif fid == 6:
432  if ftype == TType.I64:
433  self.max_val = iprot.readI64()
434  else:
435  iprot.skip(ftype)
436  elif fid == 7:
437  if ftype == TType.I64:
438  self.bucket = iprot.readI64()
439  else:
440  iprot.skip(ftype)
441  elif fid == 8:
442  if ftype == TType.LIST:
443  self.group_col_widths = []
444  (_etype24, _size21) = iprot.readListBegin()
445  for _i25 in range(_size21):
446  _elem26 = iprot.readI16()
447  self.group_col_widths.append(_elem26)
448  iprot.readListEnd()
449  else:
450  iprot.skip(ftype)
451  elif fid == 9:
452  if ftype == TType.I16:
453  self.key_bytewidth = iprot.readI16()
454  else:
455  iprot.skip(ftype)
456  elif fid == 10:
457  if ftype == TType.STRUCT:
459  self.col_slot_context.read(iprot)
460  else:
461  iprot.skip(ftype)
462  elif fid == 11:
463  if ftype == TType.LIST:
464  self.target_groupby_indices = []
465  (_etype30, _size27) = iprot.readListBegin()
466  for _i31 in range(_size27):
467  _elem32 = iprot.readI32()
468  self.target_groupby_indices.append(_elem32)
469  iprot.readListEnd()
470  else:
471  iprot.skip(ftype)
472  elif fid == 12:
473  if ftype == TType.LIST:
475  (_etype36, _size33) = iprot.readListBegin()
476  for _i37 in range(_size33):
477  _elem38 = TCountDistinctDescriptor()
478  _elem38.read(iprot)
479  self.count_distinct_descriptors.append(_elem38)
480  iprot.readListEnd()
481  else:
482  iprot.skip(ftype)
483  elif fid == 13:
484  if ftype == TType.BOOL:
485  self.force_4byte_float = iprot.readBool()
486  else:
487  iprot.skip(ftype)
488  else:
489  iprot.skip(ftype)
490  iprot.readFieldEnd()
491  iprot.readStructEnd()
492 
493  def write(self, oprot):
494  if oprot._fast_encode is not None and self.thrift_spec is not None:
495  oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
496  return
497  oprot.writeStructBegin('TResultSetBufferDescriptor')
498  if self.layout is not None:
499  oprot.writeFieldBegin('layout', TType.I32, 1)
500  oprot.writeI32(self.layout)
501  oprot.writeFieldEnd()
502  if self.keyless is not None:
503  oprot.writeFieldBegin('keyless', TType.BOOL, 2)
504  oprot.writeBool(self.keyless)
505  oprot.writeFieldEnd()
506  if self.entry_count is not None:
507  oprot.writeFieldBegin('entry_count', TType.I32, 3)
508  oprot.writeI32(self.entry_count)
509  oprot.writeFieldEnd()
510  if self.idx_target_as_key is not None:
511  oprot.writeFieldBegin('idx_target_as_key', TType.I32, 4)
512  oprot.writeI32(self.idx_target_as_key)
513  oprot.writeFieldEnd()
514  if self.min_val is not None:
515  oprot.writeFieldBegin('min_val', TType.I64, 5)
516  oprot.writeI64(self.min_val)
517  oprot.writeFieldEnd()
518  if self.max_val is not None:
519  oprot.writeFieldBegin('max_val', TType.I64, 6)
520  oprot.writeI64(self.max_val)
521  oprot.writeFieldEnd()
522  if self.bucket is not None:
523  oprot.writeFieldBegin('bucket', TType.I64, 7)
524  oprot.writeI64(self.bucket)
525  oprot.writeFieldEnd()
526  if self.group_col_widths is not None:
527  oprot.writeFieldBegin('group_col_widths', TType.LIST, 8)
528  oprot.writeListBegin(TType.I16, len(self.group_col_widths))
529  for iter39 in self.group_col_widths:
530  oprot.writeI16(iter39)
531  oprot.writeListEnd()
532  oprot.writeFieldEnd()
533  if self.key_bytewidth is not None:
534  oprot.writeFieldBegin('key_bytewidth', TType.I16, 9)
535  oprot.writeI16(self.key_bytewidth)
536  oprot.writeFieldEnd()
537  if self.col_slot_context is not None:
538  oprot.writeFieldBegin('col_slot_context', TType.STRUCT, 10)
539  self.col_slot_context.write(oprot)
540  oprot.writeFieldEnd()
541  if self.target_groupby_indices is not None:
542  oprot.writeFieldBegin('target_groupby_indices', TType.LIST, 11)
543  oprot.writeListBegin(TType.I32, len(self.target_groupby_indices))
544  for iter40 in self.target_groupby_indices:
545  oprot.writeI32(iter40)
546  oprot.writeListEnd()
547  oprot.writeFieldEnd()
548  if self.count_distinct_descriptors is not None:
549  oprot.writeFieldBegin('count_distinct_descriptors', TType.LIST, 12)
550  oprot.writeListBegin(TType.STRUCT, len(self.count_distinct_descriptors))
551  for iter41 in self.count_distinct_descriptors:
552  iter41.write(oprot)
553  oprot.writeListEnd()
554  oprot.writeFieldEnd()
555  if self.force_4byte_float is not None:
556  oprot.writeFieldBegin('force_4byte_float', TType.BOOL, 13)
557  oprot.writeBool(self.force_4byte_float)
558  oprot.writeFieldEnd()
559  oprot.writeFieldStop()
560  oprot.writeStructEnd()
561 
562  def validate(self):
563  return
564 
565  def __repr__(self):
566  L = ['%s=%r' % (key, value)
567  for key, value in self.__dict__.items()]
568  return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
569 
570  def __eq__(self, other):
571  return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
572 
573  def __ne__(self, other):
574  return not (self == other)
575 
576 
577 class TTargetInfo(object):
578  """
579  Attributes:
580  - is_agg
581  - kind
582  - type
583  - arg_type
584  - skip_nulls
585  - is_distinct
586 
587  """
588 
589 
590  def __init__(self, is_agg=None, kind=None, type=None, arg_type=None, skip_nulls=None, is_distinct=None,):
591  self.is_agg = is_agg
592  self.kind = kind
593  self.type = type
594  self.arg_type = arg_type
595  self.skip_nulls = skip_nulls
596  self.is_distinct = is_distinct
597 
598  def read(self, iprot):
599  if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
600  iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
601  return
602  iprot.readStructBegin()
603  while True:
604  (fname, ftype, fid) = iprot.readFieldBegin()
605  if ftype == TType.STOP:
606  break
607  if fid == 1:
608  if ftype == TType.BOOL:
609  self.is_agg = iprot.readBool()
610  else:
611  iprot.skip(ftype)
612  elif fid == 2:
613  if ftype == TType.I32:
614  self.kind = iprot.readI32()
615  else:
616  iprot.skip(ftype)
617  elif fid == 3:
618  if ftype == TType.STRUCT:
620  self.type.read(iprot)
621  else:
622  iprot.skip(ftype)
623  elif fid == 4:
624  if ftype == TType.STRUCT:
626  self.arg_type.read(iprot)
627  else:
628  iprot.skip(ftype)
629  elif fid == 5:
630  if ftype == TType.BOOL:
631  self.skip_nulls = iprot.readBool()
632  else:
633  iprot.skip(ftype)
634  elif fid == 6:
635  if ftype == TType.BOOL:
636  self.is_distinct = iprot.readBool()
637  else:
638  iprot.skip(ftype)
639  else:
640  iprot.skip(ftype)
641  iprot.readFieldEnd()
642  iprot.readStructEnd()
643 
644  def write(self, oprot):
645  if oprot._fast_encode is not None and self.thrift_spec is not None:
646  oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
647  return
648  oprot.writeStructBegin('TTargetInfo')
649  if self.is_agg is not None:
650  oprot.writeFieldBegin('is_agg', TType.BOOL, 1)
651  oprot.writeBool(self.is_agg)
652  oprot.writeFieldEnd()
653  if self.kind is not None:
654  oprot.writeFieldBegin('kind', TType.I32, 2)
655  oprot.writeI32(self.kind)
656  oprot.writeFieldEnd()
657  if self.type is not None:
658  oprot.writeFieldBegin('type', TType.STRUCT, 3)
659  self.type.write(oprot)
660  oprot.writeFieldEnd()
661  if self.arg_type is not None:
662  oprot.writeFieldBegin('arg_type', TType.STRUCT, 4)
663  self.arg_type.write(oprot)
664  oprot.writeFieldEnd()
665  if self.skip_nulls is not None:
666  oprot.writeFieldBegin('skip_nulls', TType.BOOL, 5)
667  oprot.writeBool(self.skip_nulls)
668  oprot.writeFieldEnd()
669  if self.is_distinct is not None:
670  oprot.writeFieldBegin('is_distinct', TType.BOOL, 6)
671  oprot.writeBool(self.is_distinct)
672  oprot.writeFieldEnd()
673  oprot.writeFieldStop()
674  oprot.writeStructEnd()
675 
676  def validate(self):
677  return
678 
679  def __repr__(self):
680  L = ['%s=%r' % (key, value)
681  for key, value in self.__dict__.items()]
682  return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
683 
684  def __eq__(self, other):
685  return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
686 
687  def __ne__(self, other):
688  return not (self == other)
689 
690 
692  """
693  Attributes:
694  - bitmap
695  - sparse_set
696 
697  """
698 
699 
700  def __init__(self, bitmap=None, sparse_set=None,):
701  self.bitmap = bitmap
702  self.sparse_set = sparse_set
703 
704  def read(self, iprot):
705  if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
706  iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
707  return
708  iprot.readStructBegin()
709  while True:
710  (fname, ftype, fid) = iprot.readFieldBegin()
711  if ftype == TType.STOP:
712  break
713  if fid == 1:
714  if ftype == TType.STRING:
715  self.bitmap = iprot.readBinary()
716  else:
717  iprot.skip(ftype)
718  elif fid == 2:
719  if ftype == TType.SET:
720  self.sparse_set = set()
721  (_etype45, _size42) = iprot.readSetBegin()
722  for _i46 in range(_size42):
723  _elem47 = iprot.readI64()
724  self.sparse_set.add(_elem47)
725  iprot.readSetEnd()
726  else:
727  iprot.skip(ftype)
728  else:
729  iprot.skip(ftype)
730  iprot.readFieldEnd()
731  iprot.readStructEnd()
732 
733  def write(self, oprot):
734  if oprot._fast_encode is not None and self.thrift_spec is not None:
735  oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
736  return
737  oprot.writeStructBegin('TCountDistinctSetStorage')
738  if self.bitmap is not None:
739  oprot.writeFieldBegin('bitmap', TType.STRING, 1)
740  oprot.writeBinary(self.bitmap)
741  oprot.writeFieldEnd()
742  if self.sparse_set is not None:
743  oprot.writeFieldBegin('sparse_set', TType.SET, 2)
744  oprot.writeSetBegin(TType.I64, len(self.sparse_set))
745  for iter48 in self.sparse_set:
746  oprot.writeI64(iter48)
747  oprot.writeSetEnd()
748  oprot.writeFieldEnd()
749  oprot.writeFieldStop()
750  oprot.writeStructEnd()
751 
752  def validate(self):
753  return
754 
755  def __repr__(self):
756  L = ['%s=%r' % (key, value)
757  for key, value in self.__dict__.items()]
758  return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
759 
760  def __eq__(self, other):
761  return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
762 
763  def __ne__(self, other):
764  return not (self == other)
765 
766 
767 class TCountDistinctSet(object):
768  """
769  Attributes:
770  - type
771  - storage
772  - remote_ptr
773 
774  """
775 
776 
777  def __init__(self, type=None, storage=None, remote_ptr=None,):
778  self.type = type
779  self.storage = storage
780  self.remote_ptr = remote_ptr
781 
782  def read(self, iprot):
783  if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
784  iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
785  return
786  iprot.readStructBegin()
787  while True:
788  (fname, ftype, fid) = iprot.readFieldBegin()
789  if ftype == TType.STOP:
790  break
791  if fid == 1:
792  if ftype == TType.I32:
793  self.type = iprot.readI32()
794  else:
795  iprot.skip(ftype)
796  elif fid == 2:
797  if ftype == TType.STRUCT:
799  self.storage.read(iprot)
800  else:
801  iprot.skip(ftype)
802  elif fid == 3:
803  if ftype == TType.I64:
804  self.remote_ptr = iprot.readI64()
805  else:
806  iprot.skip(ftype)
807  else:
808  iprot.skip(ftype)
809  iprot.readFieldEnd()
810  iprot.readStructEnd()
811 
812  def write(self, oprot):
813  if oprot._fast_encode is not None and self.thrift_spec is not None:
814  oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
815  return
816  oprot.writeStructBegin('TCountDistinctSet')
817  if self.type is not None:
818  oprot.writeFieldBegin('type', TType.I32, 1)
819  oprot.writeI32(self.type)
820  oprot.writeFieldEnd()
821  if self.storage is not None:
822  oprot.writeFieldBegin('storage', TType.STRUCT, 2)
823  self.storage.write(oprot)
824  oprot.writeFieldEnd()
825  if self.remote_ptr is not None:
826  oprot.writeFieldBegin('remote_ptr', TType.I64, 3)
827  oprot.writeI64(self.remote_ptr)
828  oprot.writeFieldEnd()
829  oprot.writeFieldStop()
830  oprot.writeStructEnd()
831 
832  def validate(self):
833  return
834 
835  def __repr__(self):
836  L = ['%s=%r' % (key, value)
837  for key, value in self.__dict__.items()]
838  return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
839 
840  def __eq__(self, other):
841  return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
842 
843  def __ne__(self, other):
844  return not (self == other)
845 
846 
847 class TSerializedRows(object):
848  """
849  Attributes:
850  - buffers
851  - buffer_lengths
852  - buffers_total_size
853  - total_compression_time_ms
854  - descriptor
855  - targets
856  - target_init_vals
857  - varlen_buffer
858  - count_distinct_sets
859  - explanation
860 
861  """
862 
863 
864  def __init__(self, buffers=None, buffer_lengths=None, buffers_total_size=None, total_compression_time_ms=None, descriptor=None, targets=None, target_init_vals=None, varlen_buffer=None, count_distinct_sets=None, explanation=None,):
865  self.buffers = buffers
866  self.buffer_lengths = buffer_lengths
867  self.buffers_total_size = buffers_total_size
868  self.total_compression_time_ms = total_compression_time_ms
869  self.descriptor = descriptor
870  self.targets = targets
871  self.target_init_vals = target_init_vals
872  self.varlen_buffer = varlen_buffer
873  self.count_distinct_sets = count_distinct_sets
874  self.explanation = explanation
875 
876  def read(self, iprot):
877  if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
878  iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
879  return
880  iprot.readStructBegin()
881  while True:
882  (fname, ftype, fid) = iprot.readFieldBegin()
883  if ftype == TType.STOP:
884  break
885  if fid == 1:
886  if ftype == TType.LIST:
887  self.buffers = []
888  (_etype52, _size49) = iprot.readListBegin()
889  for _i53 in range(_size49):
890  _elem54 = iprot.readBinary()
891  self.buffers.append(_elem54)
892  iprot.readListEnd()
893  else:
894  iprot.skip(ftype)
895  elif fid == 2:
896  if ftype == TType.LIST:
897  self.buffer_lengths = []
898  (_etype58, _size55) = iprot.readListBegin()
899  for _i59 in range(_size55):
900  _elem60 = iprot.readI64()
901  self.buffer_lengths.append(_elem60)
902  iprot.readListEnd()
903  else:
904  iprot.skip(ftype)
905  elif fid == 3:
906  if ftype == TType.I64:
907  self.buffers_total_size = iprot.readI64()
908  else:
909  iprot.skip(ftype)
910  elif fid == 4:
911  if ftype == TType.I32:
912  self.total_compression_time_ms = iprot.readI32()
913  else:
914  iprot.skip(ftype)
915  elif fid == 5:
916  if ftype == TType.STRUCT:
918  self.descriptor.read(iprot)
919  else:
920  iprot.skip(ftype)
921  elif fid == 6:
922  if ftype == TType.LIST:
923  self.targets = []
924  (_etype64, _size61) = iprot.readListBegin()
925  for _i65 in range(_size61):
926  _elem66 = TTargetInfo()
927  _elem66.read(iprot)
928  self.targets.append(_elem66)
929  iprot.readListEnd()
930  else:
931  iprot.skip(ftype)
932  elif fid == 7:
933  if ftype == TType.LIST:
934  self.target_init_vals = []
935  (_etype70, _size67) = iprot.readListBegin()
936  for _i71 in range(_size67):
937  _elem72 = iprot.readI64()
938  self.target_init_vals.append(_elem72)
939  iprot.readListEnd()
940  else:
941  iprot.skip(ftype)
942  elif fid == 8:
943  if ftype == TType.LIST:
944  self.varlen_buffer = []
945  (_etype76, _size73) = iprot.readListBegin()
946  for _i77 in range(_size73):
947  _elem78 = iprot.readBinary()
948  self.varlen_buffer.append(_elem78)
949  iprot.readListEnd()
950  else:
951  iprot.skip(ftype)
952  elif fid == 9:
953  if ftype == TType.LIST:
954  self.count_distinct_sets = []
955  (_etype82, _size79) = iprot.readListBegin()
956  for _i83 in range(_size79):
957  _elem84 = TCountDistinctSet()
958  _elem84.read(iprot)
959  self.count_distinct_sets.append(_elem84)
960  iprot.readListEnd()
961  else:
962  iprot.skip(ftype)
963  elif fid == 10:
964  if ftype == TType.STRING:
965  self.explanation = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
966  else:
967  iprot.skip(ftype)
968  else:
969  iprot.skip(ftype)
970  iprot.readFieldEnd()
971  iprot.readStructEnd()
972 
973  def write(self, oprot):
974  if oprot._fast_encode is not None and self.thrift_spec is not None:
975  oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
976  return
977  oprot.writeStructBegin('TSerializedRows')
978  if self.buffers is not None:
979  oprot.writeFieldBegin('buffers', TType.LIST, 1)
980  oprot.writeListBegin(TType.STRING, len(self.buffers))
981  for iter85 in self.buffers:
982  oprot.writeBinary(iter85)
983  oprot.writeListEnd()
984  oprot.writeFieldEnd()
985  if self.buffer_lengths is not None:
986  oprot.writeFieldBegin('buffer_lengths', TType.LIST, 2)
987  oprot.writeListBegin(TType.I64, len(self.buffer_lengths))
988  for iter86 in self.buffer_lengths:
989  oprot.writeI64(iter86)
990  oprot.writeListEnd()
991  oprot.writeFieldEnd()
992  if self.buffers_total_size is not None:
993  oprot.writeFieldBegin('buffers_total_size', TType.I64, 3)
994  oprot.writeI64(self.buffers_total_size)
995  oprot.writeFieldEnd()
996  if self.total_compression_time_ms is not None:
997  oprot.writeFieldBegin('total_compression_time_ms', TType.I32, 4)
998  oprot.writeI32(self.total_compression_time_ms)
999  oprot.writeFieldEnd()
1000  if self.descriptor is not None:
1001  oprot.writeFieldBegin('descriptor', TType.STRUCT, 5)
1002  self.descriptor.write(oprot)
1003  oprot.writeFieldEnd()
1004  if self.targets is not None:
1005  oprot.writeFieldBegin('targets', TType.LIST, 6)
1006  oprot.writeListBegin(TType.STRUCT, len(self.targets))
1007  for iter87 in self.targets:
1008  iter87.write(oprot)
1009  oprot.writeListEnd()
1010  oprot.writeFieldEnd()
1011  if self.target_init_vals is not None:
1012  oprot.writeFieldBegin('target_init_vals', TType.LIST, 7)
1013  oprot.writeListBegin(TType.I64, len(self.target_init_vals))
1014  for iter88 in self.target_init_vals:
1015  oprot.writeI64(iter88)
1016  oprot.writeListEnd()
1017  oprot.writeFieldEnd()
1018  if self.varlen_buffer is not None:
1019  oprot.writeFieldBegin('varlen_buffer', TType.LIST, 8)
1020  oprot.writeListBegin(TType.STRING, len(self.varlen_buffer))
1021  for iter89 in self.varlen_buffer:
1022  oprot.writeBinary(iter89)
1023  oprot.writeListEnd()
1024  oprot.writeFieldEnd()
1025  if self.count_distinct_sets is not None:
1026  oprot.writeFieldBegin('count_distinct_sets', TType.LIST, 9)
1027  oprot.writeListBegin(TType.STRUCT, len(self.count_distinct_sets))
1028  for iter90 in self.count_distinct_sets:
1029  iter90.write(oprot)
1030  oprot.writeListEnd()
1031  oprot.writeFieldEnd()
1032  if self.explanation is not None:
1033  oprot.writeFieldBegin('explanation', TType.STRING, 10)
1034  oprot.writeString(self.explanation.encode('utf-8') if sys.version_info[0] == 2 else self.explanation)
1035  oprot.writeFieldEnd()
1036  oprot.writeFieldStop()
1037  oprot.writeStructEnd()
1038 
1039  def validate(self):
1040  return
1041 
1042  def __repr__(self):
1043  L = ['%s=%r' % (key, value)
1044  for key, value in self.__dict__.items()]
1045  return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1046 
1047  def __eq__(self, other):
1048  return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1049 
1050  def __ne__(self, other):
1051  return not (self == other)
1052 all_structs.append(TSlotSize)
1053 TSlotSize.thrift_spec = (
1054  None, # 0
1055  (1, TType.I16, 'padded', None, None, ), # 1
1056  (2, TType.I16, 'logical', None, None, ), # 2
1057 )
1058 all_structs.append(TColSlotContext)
1059 TColSlotContext.thrift_spec = (
1060  None, # 0
1061  (1, TType.LIST, 'slot_sizes', (TType.STRUCT, [TSlotSize, None], False), None, ), # 1
1062  (2, TType.LIST, 'col_to_slot_map', (TType.LIST, (TType.I32, None, False), False), None, ), # 2
1063 )
1064 all_structs.append(TCountDistinctDescriptor)
1065 TCountDistinctDescriptor.thrift_spec = (
1066  None, # 0
1067  (1, TType.I32, 'impl_type', None, None, ), # 1
1068  (2, TType.I64, 'min_val', None, None, ), # 2
1069  (3, TType.I64, 'bitmap_sz_bits', None, None, ), # 3
1070  (4, TType.BOOL, 'approximate', None, None, ), # 4
1071  (5, TType.I32, 'device_type', None, None, ), # 5
1072  (6, TType.I64, 'sub_bitmap_count', None, None, ), # 6
1073 )
1074 all_structs.append(TResultSetBufferDescriptor)
1075 TResultSetBufferDescriptor.thrift_spec = (
1076  None, # 0
1077  (1, TType.I32, 'layout', None, None, ), # 1
1078  (2, TType.BOOL, 'keyless', None, None, ), # 2
1079  (3, TType.I32, 'entry_count', None, None, ), # 3
1080  (4, TType.I32, 'idx_target_as_key', None, None, ), # 4
1081  (5, TType.I64, 'min_val', None, None, ), # 5
1082  (6, TType.I64, 'max_val', None, None, ), # 6
1083  (7, TType.I64, 'bucket', None, None, ), # 7
1084  (8, TType.LIST, 'group_col_widths', (TType.I16, None, False), None, ), # 8
1085  (9, TType.I16, 'key_bytewidth', None, None, ), # 9
1086  (10, TType.STRUCT, 'col_slot_context', [TColSlotContext, None], None, ), # 10
1087  (11, TType.LIST, 'target_groupby_indices', (TType.I32, None, False), None, ), # 11
1088  (12, TType.LIST, 'count_distinct_descriptors', (TType.STRUCT, [TCountDistinctDescriptor, None], False), None, ), # 12
1089  (13, TType.BOOL, 'force_4byte_float', None, None, ), # 13
1090 )
1091 all_structs.append(TTargetInfo)
1092 TTargetInfo.thrift_spec = (
1093  None, # 0
1094  (1, TType.BOOL, 'is_agg', None, None, ), # 1
1095  (2, TType.I32, 'kind', None, None, ), # 2
1096  (3, TType.STRUCT, 'type', [omnisci.common.ttypes.TTypeInfo, None], None, ), # 3
1097  (4, TType.STRUCT, 'arg_type', [omnisci.common.ttypes.TTypeInfo, None], None, ), # 4
1098  (5, TType.BOOL, 'skip_nulls', None, None, ), # 5
1099  (6, TType.BOOL, 'is_distinct', None, None, ), # 6
1100 )
1101 all_structs.append(TCountDistinctSetStorage)
1102 TCountDistinctSetStorage.thrift_spec = (
1103  None, # 0
1104  (1, TType.STRING, 'bitmap', 'BINARY', None, ), # 1
1105  (2, TType.SET, 'sparse_set', (TType.I64, None, False), None, ), # 2
1106 )
1107 all_structs.append(TCountDistinctSet)
1108 TCountDistinctSet.thrift_spec = (
1109  None, # 0
1110  (1, TType.I32, 'type', None, None, ), # 1
1111  (2, TType.STRUCT, 'storage', [TCountDistinctSetStorage, None], None, ), # 2
1112  (3, TType.I64, 'remote_ptr', None, None, ), # 3
1113 )
1114 all_structs.append(TSerializedRows)
1115 TSerializedRows.thrift_spec = (
1116  None, # 0
1117  (1, TType.LIST, 'buffers', (TType.STRING, 'BINARY', False), None, ), # 1
1118  (2, TType.LIST, 'buffer_lengths', (TType.I64, None, False), None, ), # 2
1119  (3, TType.I64, 'buffers_total_size', None, None, ), # 3
1120  (4, TType.I32, 'total_compression_time_ms', None, None, ), # 4
1121  (5, TType.STRUCT, 'descriptor', [TResultSetBufferDescriptor, None], None, ), # 5
1122  (6, TType.LIST, 'targets', (TType.STRUCT, [TTargetInfo, None], False), None, ), # 6
1123  (7, TType.LIST, 'target_init_vals', (TType.I64, None, False), None, ), # 7
1124  (8, TType.LIST, 'varlen_buffer', (TType.STRING, 'BINARY', False), None, ), # 8
1125  (9, TType.LIST, 'count_distinct_sets', (TType.STRUCT, [TCountDistinctSet, None], False), None, ), # 9
1126  (10, TType.STRING, 'explanation', 'UTF8', None, ), # 10
1127 )
1128 fix_spec(all_structs)
1129 del all_structs
std::string join(T const &container, std::string const &delim)