awx-zipline-ai 0.0.32__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. __init__.py +0 -0
  2. agent/__init__.py +1 -0
  3. agent/constants.py +15 -0
  4. agent/ttypes.py +1684 -0
  5. ai/__init__.py +0 -0
  6. ai/chronon/__init__.py +0 -0
  7. ai/chronon/airflow_helpers.py +248 -0
  8. ai/chronon/cli/__init__.py +0 -0
  9. ai/chronon/cli/compile/__init__.py +0 -0
  10. ai/chronon/cli/compile/column_hashing.py +336 -0
  11. ai/chronon/cli/compile/compile_context.py +173 -0
  12. ai/chronon/cli/compile/compiler.py +183 -0
  13. ai/chronon/cli/compile/conf_validator.py +742 -0
  14. ai/chronon/cli/compile/display/__init__.py +0 -0
  15. ai/chronon/cli/compile/display/class_tracker.py +102 -0
  16. ai/chronon/cli/compile/display/compile_status.py +95 -0
  17. ai/chronon/cli/compile/display/compiled_obj.py +12 -0
  18. ai/chronon/cli/compile/display/console.py +3 -0
  19. ai/chronon/cli/compile/display/diff_result.py +111 -0
  20. ai/chronon/cli/compile/fill_templates.py +35 -0
  21. ai/chronon/cli/compile/parse_configs.py +134 -0
  22. ai/chronon/cli/compile/parse_teams.py +242 -0
  23. ai/chronon/cli/compile/serializer.py +109 -0
  24. ai/chronon/cli/compile/version_utils.py +42 -0
  25. ai/chronon/cli/git_utils.py +145 -0
  26. ai/chronon/cli/logger.py +59 -0
  27. ai/chronon/constants.py +3 -0
  28. ai/chronon/group_by.py +692 -0
  29. ai/chronon/join.py +580 -0
  30. ai/chronon/logger.py +23 -0
  31. ai/chronon/model.py +40 -0
  32. ai/chronon/query.py +126 -0
  33. ai/chronon/repo/__init__.py +39 -0
  34. ai/chronon/repo/aws.py +284 -0
  35. ai/chronon/repo/cluster.py +136 -0
  36. ai/chronon/repo/compile.py +62 -0
  37. ai/chronon/repo/constants.py +164 -0
  38. ai/chronon/repo/default_runner.py +269 -0
  39. ai/chronon/repo/explore.py +418 -0
  40. ai/chronon/repo/extract_objects.py +134 -0
  41. ai/chronon/repo/gcp.py +586 -0
  42. ai/chronon/repo/gitpython_utils.py +15 -0
  43. ai/chronon/repo/hub_runner.py +261 -0
  44. ai/chronon/repo/hub_uploader.py +109 -0
  45. ai/chronon/repo/init.py +60 -0
  46. ai/chronon/repo/join_backfill.py +119 -0
  47. ai/chronon/repo/run.py +296 -0
  48. ai/chronon/repo/serializer.py +133 -0
  49. ai/chronon/repo/team_json_utils.py +46 -0
  50. ai/chronon/repo/utils.py +481 -0
  51. ai/chronon/repo/zipline.py +35 -0
  52. ai/chronon/repo/zipline_hub.py +277 -0
  53. ai/chronon/resources/__init__.py +0 -0
  54. ai/chronon/resources/gcp/__init__.py +0 -0
  55. ai/chronon/resources/gcp/group_bys/__init__.py +0 -0
  56. ai/chronon/resources/gcp/group_bys/test/__init__.py +0 -0
  57. ai/chronon/resources/gcp/group_bys/test/data.py +30 -0
  58. ai/chronon/resources/gcp/joins/__init__.py +0 -0
  59. ai/chronon/resources/gcp/joins/test/__init__.py +0 -0
  60. ai/chronon/resources/gcp/joins/test/data.py +26 -0
  61. ai/chronon/resources/gcp/sources/__init__.py +0 -0
  62. ai/chronon/resources/gcp/sources/test/__init__.py +0 -0
  63. ai/chronon/resources/gcp/sources/test/data.py +26 -0
  64. ai/chronon/resources/gcp/teams.py +58 -0
  65. ai/chronon/source.py +86 -0
  66. ai/chronon/staging_query.py +226 -0
  67. ai/chronon/types.py +58 -0
  68. ai/chronon/utils.py +510 -0
  69. ai/chronon/windows.py +48 -0
  70. awx_zipline_ai-0.0.32.dist-info/METADATA +197 -0
  71. awx_zipline_ai-0.0.32.dist-info/RECORD +96 -0
  72. awx_zipline_ai-0.0.32.dist-info/WHEEL +5 -0
  73. awx_zipline_ai-0.0.32.dist-info/entry_points.txt +2 -0
  74. awx_zipline_ai-0.0.32.dist-info/top_level.txt +4 -0
  75. gen_thrift/__init__.py +0 -0
  76. gen_thrift/api/__init__.py +1 -0
  77. gen_thrift/api/constants.py +15 -0
  78. gen_thrift/api/ttypes.py +3754 -0
  79. gen_thrift/common/__init__.py +1 -0
  80. gen_thrift/common/constants.py +15 -0
  81. gen_thrift/common/ttypes.py +1814 -0
  82. gen_thrift/eval/__init__.py +1 -0
  83. gen_thrift/eval/constants.py +15 -0
  84. gen_thrift/eval/ttypes.py +660 -0
  85. gen_thrift/fetcher/__init__.py +1 -0
  86. gen_thrift/fetcher/constants.py +15 -0
  87. gen_thrift/fetcher/ttypes.py +127 -0
  88. gen_thrift/hub/__init__.py +1 -0
  89. gen_thrift/hub/constants.py +15 -0
  90. gen_thrift/hub/ttypes.py +1109 -0
  91. gen_thrift/observability/__init__.py +1 -0
  92. gen_thrift/observability/constants.py +15 -0
  93. gen_thrift/observability/ttypes.py +2355 -0
  94. gen_thrift/planner/__init__.py +1 -0
  95. gen_thrift/planner/constants.py +15 -0
  96. gen_thrift/planner/ttypes.py +1967 -0
@@ -0,0 +1 @@
1
+ __all__ = ['ttypes', 'constants']
@@ -0,0 +1,15 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.22.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
+ from uuid import UUID
13
+
14
+ import sys
15
+ from .ttypes import *
@@ -0,0 +1,660 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.22.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
+ from uuid import UUID
13
+
14
+ import sys
15
+
16
+ from thrift.transport import TTransport
17
+ all_structs = []
18
+
19
+
20
+ class CheckResult(object):
21
+ SUCCESS = 0
22
+ FAILURE = 1
23
+ SKIPPED = 2
24
+
25
+ _VALUES_TO_NAMES = {
26
+ 0: "SUCCESS",
27
+ 1: "FAILURE",
28
+ 2: "SKIPPED",
29
+ }
30
+
31
+ _NAMES_TO_VALUES = {
32
+ "SUCCESS": 0,
33
+ "FAILURE": 1,
34
+ "SKIPPED": 2,
35
+ }
36
+
37
+
38
+ class BaseEvalResult(object):
39
+ """
40
+ Attributes:
41
+ - checkResult
42
+ - message
43
+
44
+ """
45
+ thrift_spec = None
46
+
47
+
48
+ def __init__(self, checkResult = None, message = None,):
49
+ self.checkResult = checkResult
50
+ self.message = message
51
+
52
+ def read(self, iprot):
53
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
54
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
55
+ return
56
+ iprot.readStructBegin()
57
+ while True:
58
+ (fname, ftype, fid) = iprot.readFieldBegin()
59
+ if ftype == TType.STOP:
60
+ break
61
+ if fid == 1:
62
+ if ftype == TType.I32:
63
+ self.checkResult = iprot.readI32()
64
+ else:
65
+ iprot.skip(ftype)
66
+ elif fid == 2:
67
+ if ftype == TType.STRING:
68
+ self.message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
69
+ else:
70
+ iprot.skip(ftype)
71
+ else:
72
+ iprot.skip(ftype)
73
+ iprot.readFieldEnd()
74
+ iprot.readStructEnd()
75
+
76
+ def write(self, oprot):
77
+ self.validate()
78
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
79
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
80
+ return
81
+ oprot.writeStructBegin('BaseEvalResult')
82
+ if self.checkResult is not None:
83
+ oprot.writeFieldBegin('checkResult', TType.I32, 1)
84
+ oprot.writeI32(self.checkResult)
85
+ oprot.writeFieldEnd()
86
+ if self.message is not None:
87
+ oprot.writeFieldBegin('message', TType.STRING, 2)
88
+ oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
89
+ oprot.writeFieldEnd()
90
+ oprot.writeFieldStop()
91
+ oprot.writeStructEnd()
92
+
93
+ def validate(self):
94
+ return
95
+
96
+ def __repr__(self):
97
+ L = ['%s=%r' % (key, value)
98
+ for key, value in self.__dict__.items()]
99
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
100
+
101
+ def __eq__(self, other):
102
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
103
+
104
+ def __ne__(self, other):
105
+ return not (self == other)
106
+
107
+
108
+ class JoinPartEvalResult(object):
109
+ """
110
+ Attributes:
111
+ - partName
112
+ - gbEvalResult
113
+ - keySchemaCheck
114
+
115
+ """
116
+ thrift_spec = None
117
+
118
+
119
+ def __init__(self, partName = None, gbEvalResult = None, keySchemaCheck = None,):
120
+ self.partName = partName
121
+ self.gbEvalResult = gbEvalResult
122
+ self.keySchemaCheck = keySchemaCheck
123
+
124
+ def read(self, iprot):
125
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
126
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
127
+ return
128
+ iprot.readStructBegin()
129
+ while True:
130
+ (fname, ftype, fid) = iprot.readFieldBegin()
131
+ if ftype == TType.STOP:
132
+ break
133
+ if fid == 1:
134
+ if ftype == TType.STRING:
135
+ self.partName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
136
+ else:
137
+ iprot.skip(ftype)
138
+ elif fid == 2:
139
+ if ftype == TType.STRUCT:
140
+ self.gbEvalResult = GroupByEvalResult()
141
+ self.gbEvalResult.read(iprot)
142
+ else:
143
+ iprot.skip(ftype)
144
+ elif fid == 3:
145
+ if ftype == TType.STRUCT:
146
+ self.keySchemaCheck = BaseEvalResult()
147
+ self.keySchemaCheck.read(iprot)
148
+ else:
149
+ iprot.skip(ftype)
150
+ else:
151
+ iprot.skip(ftype)
152
+ iprot.readFieldEnd()
153
+ iprot.readStructEnd()
154
+
155
+ def write(self, oprot):
156
+ self.validate()
157
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
158
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
159
+ return
160
+ oprot.writeStructBegin('JoinPartEvalResult')
161
+ if self.partName is not None:
162
+ oprot.writeFieldBegin('partName', TType.STRING, 1)
163
+ oprot.writeString(self.partName.encode('utf-8') if sys.version_info[0] == 2 else self.partName)
164
+ oprot.writeFieldEnd()
165
+ if self.gbEvalResult is not None:
166
+ oprot.writeFieldBegin('gbEvalResult', TType.STRUCT, 2)
167
+ self.gbEvalResult.write(oprot)
168
+ oprot.writeFieldEnd()
169
+ if self.keySchemaCheck is not None:
170
+ oprot.writeFieldBegin('keySchemaCheck', TType.STRUCT, 3)
171
+ self.keySchemaCheck.write(oprot)
172
+ oprot.writeFieldEnd()
173
+ oprot.writeFieldStop()
174
+ oprot.writeStructEnd()
175
+
176
+ def validate(self):
177
+ return
178
+
179
+ def __repr__(self):
180
+ L = ['%s=%r' % (key, value)
181
+ for key, value in self.__dict__.items()]
182
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
183
+
184
+ def __eq__(self, other):
185
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
186
+
187
+ def __ne__(self, other):
188
+ return not (self == other)
189
+
190
+
191
+ class JoinEvalResult(object):
192
+ """
193
+ Attributes:
194
+ - leftExpressionCheck
195
+ - leftTimestampCheck
196
+ - joinPartChecks
197
+ - derivationValidityCheck
198
+ - leftQuerySchema
199
+ - rightPartsSchema
200
+ - derivationsSchema
201
+ - externalPartsSchema
202
+
203
+ """
204
+ thrift_spec = None
205
+
206
+
207
+ def __init__(self, leftExpressionCheck = None, leftTimestampCheck = None, joinPartChecks = None, derivationValidityCheck = None, leftQuerySchema = None, rightPartsSchema = None, derivationsSchema = None, externalPartsSchema = None,):
208
+ self.leftExpressionCheck = leftExpressionCheck
209
+ self.leftTimestampCheck = leftTimestampCheck
210
+ self.joinPartChecks = joinPartChecks
211
+ self.derivationValidityCheck = derivationValidityCheck
212
+ self.leftQuerySchema = leftQuerySchema
213
+ self.rightPartsSchema = rightPartsSchema
214
+ self.derivationsSchema = derivationsSchema
215
+ self.externalPartsSchema = externalPartsSchema
216
+
217
+ def read(self, iprot):
218
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
219
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
220
+ return
221
+ iprot.readStructBegin()
222
+ while True:
223
+ (fname, ftype, fid) = iprot.readFieldBegin()
224
+ if ftype == TType.STOP:
225
+ break
226
+ if fid == 1:
227
+ if ftype == TType.STRUCT:
228
+ self.leftExpressionCheck = BaseEvalResult()
229
+ self.leftExpressionCheck.read(iprot)
230
+ else:
231
+ iprot.skip(ftype)
232
+ elif fid == 2:
233
+ if ftype == TType.STRUCT:
234
+ self.leftTimestampCheck = BaseEvalResult()
235
+ self.leftTimestampCheck.read(iprot)
236
+ else:
237
+ iprot.skip(ftype)
238
+ elif fid == 3:
239
+ if ftype == TType.LIST:
240
+ self.joinPartChecks = []
241
+ (_etype3, _size0) = iprot.readListBegin()
242
+ for _i4 in range(_size0):
243
+ _elem5 = JoinPartEvalResult()
244
+ _elem5.read(iprot)
245
+ self.joinPartChecks.append(_elem5)
246
+ iprot.readListEnd()
247
+ else:
248
+ iprot.skip(ftype)
249
+ elif fid == 4:
250
+ if ftype == TType.STRUCT:
251
+ self.derivationValidityCheck = BaseEvalResult()
252
+ self.derivationValidityCheck.read(iprot)
253
+ else:
254
+ iprot.skip(ftype)
255
+ elif fid == 5:
256
+ if ftype == TType.MAP:
257
+ self.leftQuerySchema = {}
258
+ (_ktype7, _vtype8, _size6) = iprot.readMapBegin()
259
+ for _i10 in range(_size6):
260
+ _key11 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
261
+ _val12 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
262
+ self.leftQuerySchema[_key11] = _val12
263
+ iprot.readMapEnd()
264
+ else:
265
+ iprot.skip(ftype)
266
+ elif fid == 6:
267
+ if ftype == TType.MAP:
268
+ self.rightPartsSchema = {}
269
+ (_ktype14, _vtype15, _size13) = iprot.readMapBegin()
270
+ for _i17 in range(_size13):
271
+ _key18 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
272
+ _val19 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
273
+ self.rightPartsSchema[_key18] = _val19
274
+ iprot.readMapEnd()
275
+ else:
276
+ iprot.skip(ftype)
277
+ elif fid == 7:
278
+ if ftype == TType.MAP:
279
+ self.derivationsSchema = {}
280
+ (_ktype21, _vtype22, _size20) = iprot.readMapBegin()
281
+ for _i24 in range(_size20):
282
+ _key25 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
283
+ _val26 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
284
+ self.derivationsSchema[_key25] = _val26
285
+ iprot.readMapEnd()
286
+ else:
287
+ iprot.skip(ftype)
288
+ elif fid == 8:
289
+ if ftype == TType.MAP:
290
+ self.externalPartsSchema = {}
291
+ (_ktype28, _vtype29, _size27) = iprot.readMapBegin()
292
+ for _i31 in range(_size27):
293
+ _key32 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
294
+ _val33 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
295
+ self.externalPartsSchema[_key32] = _val33
296
+ iprot.readMapEnd()
297
+ else:
298
+ iprot.skip(ftype)
299
+ else:
300
+ iprot.skip(ftype)
301
+ iprot.readFieldEnd()
302
+ iprot.readStructEnd()
303
+
304
+ def write(self, oprot):
305
+ self.validate()
306
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
307
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
308
+ return
309
+ oprot.writeStructBegin('JoinEvalResult')
310
+ if self.leftExpressionCheck is not None:
311
+ oprot.writeFieldBegin('leftExpressionCheck', TType.STRUCT, 1)
312
+ self.leftExpressionCheck.write(oprot)
313
+ oprot.writeFieldEnd()
314
+ if self.leftTimestampCheck is not None:
315
+ oprot.writeFieldBegin('leftTimestampCheck', TType.STRUCT, 2)
316
+ self.leftTimestampCheck.write(oprot)
317
+ oprot.writeFieldEnd()
318
+ if self.joinPartChecks is not None:
319
+ oprot.writeFieldBegin('joinPartChecks', TType.LIST, 3)
320
+ oprot.writeListBegin(TType.STRUCT, len(self.joinPartChecks))
321
+ for iter34 in self.joinPartChecks:
322
+ iter34.write(oprot)
323
+ oprot.writeListEnd()
324
+ oprot.writeFieldEnd()
325
+ if self.derivationValidityCheck is not None:
326
+ oprot.writeFieldBegin('derivationValidityCheck', TType.STRUCT, 4)
327
+ self.derivationValidityCheck.write(oprot)
328
+ oprot.writeFieldEnd()
329
+ if self.leftQuerySchema is not None:
330
+ oprot.writeFieldBegin('leftQuerySchema', TType.MAP, 5)
331
+ oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.leftQuerySchema))
332
+ for kiter35, viter36 in self.leftQuerySchema.items():
333
+ oprot.writeString(kiter35.encode('utf-8') if sys.version_info[0] == 2 else kiter35)
334
+ oprot.writeString(viter36.encode('utf-8') if sys.version_info[0] == 2 else viter36)
335
+ oprot.writeMapEnd()
336
+ oprot.writeFieldEnd()
337
+ if self.rightPartsSchema is not None:
338
+ oprot.writeFieldBegin('rightPartsSchema', TType.MAP, 6)
339
+ oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.rightPartsSchema))
340
+ for kiter37, viter38 in self.rightPartsSchema.items():
341
+ oprot.writeString(kiter37.encode('utf-8') if sys.version_info[0] == 2 else kiter37)
342
+ oprot.writeString(viter38.encode('utf-8') if sys.version_info[0] == 2 else viter38)
343
+ oprot.writeMapEnd()
344
+ oprot.writeFieldEnd()
345
+ if self.derivationsSchema is not None:
346
+ oprot.writeFieldBegin('derivationsSchema', TType.MAP, 7)
347
+ oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.derivationsSchema))
348
+ for kiter39, viter40 in self.derivationsSchema.items():
349
+ oprot.writeString(kiter39.encode('utf-8') if sys.version_info[0] == 2 else kiter39)
350
+ oprot.writeString(viter40.encode('utf-8') if sys.version_info[0] == 2 else viter40)
351
+ oprot.writeMapEnd()
352
+ oprot.writeFieldEnd()
353
+ if self.externalPartsSchema is not None:
354
+ oprot.writeFieldBegin('externalPartsSchema', TType.MAP, 8)
355
+ oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.externalPartsSchema))
356
+ for kiter41, viter42 in self.externalPartsSchema.items():
357
+ oprot.writeString(kiter41.encode('utf-8') if sys.version_info[0] == 2 else kiter41)
358
+ oprot.writeString(viter42.encode('utf-8') if sys.version_info[0] == 2 else viter42)
359
+ oprot.writeMapEnd()
360
+ oprot.writeFieldEnd()
361
+ oprot.writeFieldStop()
362
+ oprot.writeStructEnd()
363
+
364
+ def validate(self):
365
+ return
366
+
367
+ def __repr__(self):
368
+ L = ['%s=%r' % (key, value)
369
+ for key, value in self.__dict__.items()]
370
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
371
+
372
+ def __eq__(self, other):
373
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
374
+
375
+ def __ne__(self, other):
376
+ return not (self == other)
377
+
378
+
379
+ class GroupByEvalResult(object):
380
+ """
381
+ Attributes:
382
+ - sourceExpressionCheck
383
+ - sourceTimestampCheck
384
+ - aggExpressionCheck
385
+ - derivationsExpressionCheck
386
+ - keySchema
387
+ - aggSchema
388
+ - derivationsSchema
389
+
390
+ """
391
+ thrift_spec = None
392
+
393
+
394
+ def __init__(self, sourceExpressionCheck = None, sourceTimestampCheck = None, aggExpressionCheck = None, derivationsExpressionCheck = None, keySchema = None, aggSchema = None, derivationsSchema = None,):
395
+ self.sourceExpressionCheck = sourceExpressionCheck
396
+ self.sourceTimestampCheck = sourceTimestampCheck
397
+ self.aggExpressionCheck = aggExpressionCheck
398
+ self.derivationsExpressionCheck = derivationsExpressionCheck
399
+ self.keySchema = keySchema
400
+ self.aggSchema = aggSchema
401
+ self.derivationsSchema = derivationsSchema
402
+
403
+ def read(self, iprot):
404
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
405
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
406
+ return
407
+ iprot.readStructBegin()
408
+ while True:
409
+ (fname, ftype, fid) = iprot.readFieldBegin()
410
+ if ftype == TType.STOP:
411
+ break
412
+ if fid == 1:
413
+ if ftype == TType.STRUCT:
414
+ self.sourceExpressionCheck = BaseEvalResult()
415
+ self.sourceExpressionCheck.read(iprot)
416
+ else:
417
+ iprot.skip(ftype)
418
+ elif fid == 2:
419
+ if ftype == TType.STRUCT:
420
+ self.sourceTimestampCheck = BaseEvalResult()
421
+ self.sourceTimestampCheck.read(iprot)
422
+ else:
423
+ iprot.skip(ftype)
424
+ elif fid == 3:
425
+ if ftype == TType.STRUCT:
426
+ self.aggExpressionCheck = BaseEvalResult()
427
+ self.aggExpressionCheck.read(iprot)
428
+ else:
429
+ iprot.skip(ftype)
430
+ elif fid == 4:
431
+ if ftype == TType.STRUCT:
432
+ self.derivationsExpressionCheck = BaseEvalResult()
433
+ self.derivationsExpressionCheck.read(iprot)
434
+ else:
435
+ iprot.skip(ftype)
436
+ elif fid == 5:
437
+ if ftype == TType.MAP:
438
+ self.keySchema = {}
439
+ (_ktype44, _vtype45, _size43) = iprot.readMapBegin()
440
+ for _i47 in range(_size43):
441
+ _key48 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
442
+ _val49 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
443
+ self.keySchema[_key48] = _val49
444
+ iprot.readMapEnd()
445
+ else:
446
+ iprot.skip(ftype)
447
+ elif fid == 6:
448
+ if ftype == TType.MAP:
449
+ self.aggSchema = {}
450
+ (_ktype51, _vtype52, _size50) = iprot.readMapBegin()
451
+ for _i54 in range(_size50):
452
+ _key55 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
453
+ _val56 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
454
+ self.aggSchema[_key55] = _val56
455
+ iprot.readMapEnd()
456
+ else:
457
+ iprot.skip(ftype)
458
+ elif fid == 7:
459
+ if ftype == TType.MAP:
460
+ self.derivationsSchema = {}
461
+ (_ktype58, _vtype59, _size57) = iprot.readMapBegin()
462
+ for _i61 in range(_size57):
463
+ _key62 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
464
+ _val63 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
465
+ self.derivationsSchema[_key62] = _val63
466
+ iprot.readMapEnd()
467
+ else:
468
+ iprot.skip(ftype)
469
+ else:
470
+ iprot.skip(ftype)
471
+ iprot.readFieldEnd()
472
+ iprot.readStructEnd()
473
+
474
+ def write(self, oprot):
475
+ self.validate()
476
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
477
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
478
+ return
479
+ oprot.writeStructBegin('GroupByEvalResult')
480
+ if self.sourceExpressionCheck is not None:
481
+ oprot.writeFieldBegin('sourceExpressionCheck', TType.STRUCT, 1)
482
+ self.sourceExpressionCheck.write(oprot)
483
+ oprot.writeFieldEnd()
484
+ if self.sourceTimestampCheck is not None:
485
+ oprot.writeFieldBegin('sourceTimestampCheck', TType.STRUCT, 2)
486
+ self.sourceTimestampCheck.write(oprot)
487
+ oprot.writeFieldEnd()
488
+ if self.aggExpressionCheck is not None:
489
+ oprot.writeFieldBegin('aggExpressionCheck', TType.STRUCT, 3)
490
+ self.aggExpressionCheck.write(oprot)
491
+ oprot.writeFieldEnd()
492
+ if self.derivationsExpressionCheck is not None:
493
+ oprot.writeFieldBegin('derivationsExpressionCheck', TType.STRUCT, 4)
494
+ self.derivationsExpressionCheck.write(oprot)
495
+ oprot.writeFieldEnd()
496
+ if self.keySchema is not None:
497
+ oprot.writeFieldBegin('keySchema', TType.MAP, 5)
498
+ oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.keySchema))
499
+ for kiter64, viter65 in self.keySchema.items():
500
+ oprot.writeString(kiter64.encode('utf-8') if sys.version_info[0] == 2 else kiter64)
501
+ oprot.writeString(viter65.encode('utf-8') if sys.version_info[0] == 2 else viter65)
502
+ oprot.writeMapEnd()
503
+ oprot.writeFieldEnd()
504
+ if self.aggSchema is not None:
505
+ oprot.writeFieldBegin('aggSchema', TType.MAP, 6)
506
+ oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.aggSchema))
507
+ for kiter66, viter67 in self.aggSchema.items():
508
+ oprot.writeString(kiter66.encode('utf-8') if sys.version_info[0] == 2 else kiter66)
509
+ oprot.writeString(viter67.encode('utf-8') if sys.version_info[0] == 2 else viter67)
510
+ oprot.writeMapEnd()
511
+ oprot.writeFieldEnd()
512
+ if self.derivationsSchema is not None:
513
+ oprot.writeFieldBegin('derivationsSchema', TType.MAP, 7)
514
+ oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.derivationsSchema))
515
+ for kiter68, viter69 in self.derivationsSchema.items():
516
+ oprot.writeString(kiter68.encode('utf-8') if sys.version_info[0] == 2 else kiter68)
517
+ oprot.writeString(viter69.encode('utf-8') if sys.version_info[0] == 2 else viter69)
518
+ oprot.writeMapEnd()
519
+ oprot.writeFieldEnd()
520
+ oprot.writeFieldStop()
521
+ oprot.writeStructEnd()
522
+
523
+ def validate(self):
524
+ return
525
+
526
+ def __repr__(self):
527
+ L = ['%s=%r' % (key, value)
528
+ for key, value in self.__dict__.items()]
529
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
530
+
531
+ def __eq__(self, other):
532
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
533
+
534
+ def __ne__(self, other):
535
+ return not (self == other)
536
+
537
+
538
+ class StagingQueryEvalResult(object):
539
+ """
540
+ Attributes:
541
+ - queryCheck
542
+ - outputSchema
543
+
544
+ """
545
+ thrift_spec = None
546
+
547
+
548
+ def __init__(self, queryCheck = None, outputSchema = None,):
549
+ self.queryCheck = queryCheck
550
+ self.outputSchema = outputSchema
551
+
552
+ def read(self, iprot):
553
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
554
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
555
+ return
556
+ iprot.readStructBegin()
557
+ while True:
558
+ (fname, ftype, fid) = iprot.readFieldBegin()
559
+ if ftype == TType.STOP:
560
+ break
561
+ if fid == 1:
562
+ if ftype == TType.STRUCT:
563
+ self.queryCheck = BaseEvalResult()
564
+ self.queryCheck.read(iprot)
565
+ else:
566
+ iprot.skip(ftype)
567
+ elif fid == 2:
568
+ if ftype == TType.MAP:
569
+ self.outputSchema = {}
570
+ (_ktype71, _vtype72, _size70) = iprot.readMapBegin()
571
+ for _i74 in range(_size70):
572
+ _key75 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
573
+ _val76 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
574
+ self.outputSchema[_key75] = _val76
575
+ iprot.readMapEnd()
576
+ else:
577
+ iprot.skip(ftype)
578
+ else:
579
+ iprot.skip(ftype)
580
+ iprot.readFieldEnd()
581
+ iprot.readStructEnd()
582
+
583
+ def write(self, oprot):
584
+ self.validate()
585
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
586
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
587
+ return
588
+ oprot.writeStructBegin('StagingQueryEvalResult')
589
+ if self.queryCheck is not None:
590
+ oprot.writeFieldBegin('queryCheck', TType.STRUCT, 1)
591
+ self.queryCheck.write(oprot)
592
+ oprot.writeFieldEnd()
593
+ if self.outputSchema is not None:
594
+ oprot.writeFieldBegin('outputSchema', TType.MAP, 2)
595
+ oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.outputSchema))
596
+ for kiter77, viter78 in self.outputSchema.items():
597
+ oprot.writeString(kiter77.encode('utf-8') if sys.version_info[0] == 2 else kiter77)
598
+ oprot.writeString(viter78.encode('utf-8') if sys.version_info[0] == 2 else viter78)
599
+ oprot.writeMapEnd()
600
+ oprot.writeFieldEnd()
601
+ oprot.writeFieldStop()
602
+ oprot.writeStructEnd()
603
+
604
+ def validate(self):
605
+ return
606
+
607
+ def __repr__(self):
608
+ L = ['%s=%r' % (key, value)
609
+ for key, value in self.__dict__.items()]
610
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
611
+
612
+ def __eq__(self, other):
613
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
614
+
615
+ def __ne__(self, other):
616
+ return not (self == other)
617
+ all_structs.append(BaseEvalResult)
618
+ BaseEvalResult.thrift_spec = (
619
+ None, # 0
620
+ (1, TType.I32, 'checkResult', None, None, ), # 1
621
+ (2, TType.STRING, 'message', 'UTF8', None, ), # 2
622
+ )
623
+ all_structs.append(JoinPartEvalResult)
624
+ JoinPartEvalResult.thrift_spec = (
625
+ None, # 0
626
+ (1, TType.STRING, 'partName', 'UTF8', None, ), # 1
627
+ (2, TType.STRUCT, 'gbEvalResult', [GroupByEvalResult, None], None, ), # 2
628
+ (3, TType.STRUCT, 'keySchemaCheck', [BaseEvalResult, None], None, ), # 3
629
+ )
630
+ all_structs.append(JoinEvalResult)
631
+ JoinEvalResult.thrift_spec = (
632
+ None, # 0
633
+ (1, TType.STRUCT, 'leftExpressionCheck', [BaseEvalResult, None], None, ), # 1
634
+ (2, TType.STRUCT, 'leftTimestampCheck', [BaseEvalResult, None], None, ), # 2
635
+ (3, TType.LIST, 'joinPartChecks', (TType.STRUCT, [JoinPartEvalResult, None], False), None, ), # 3
636
+ (4, TType.STRUCT, 'derivationValidityCheck', [BaseEvalResult, None], None, ), # 4
637
+ (5, TType.MAP, 'leftQuerySchema', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 5
638
+ (6, TType.MAP, 'rightPartsSchema', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 6
639
+ (7, TType.MAP, 'derivationsSchema', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 7
640
+ (8, TType.MAP, 'externalPartsSchema', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 8
641
+ )
642
+ all_structs.append(GroupByEvalResult)
643
+ GroupByEvalResult.thrift_spec = (
644
+ None, # 0
645
+ (1, TType.STRUCT, 'sourceExpressionCheck', [BaseEvalResult, None], None, ), # 1
646
+ (2, TType.STRUCT, 'sourceTimestampCheck', [BaseEvalResult, None], None, ), # 2
647
+ (3, TType.STRUCT, 'aggExpressionCheck', [BaseEvalResult, None], None, ), # 3
648
+ (4, TType.STRUCT, 'derivationsExpressionCheck', [BaseEvalResult, None], None, ), # 4
649
+ (5, TType.MAP, 'keySchema', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 5
650
+ (6, TType.MAP, 'aggSchema', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 6
651
+ (7, TType.MAP, 'derivationsSchema', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 7
652
+ )
653
+ all_structs.append(StagingQueryEvalResult)
654
+ StagingQueryEvalResult.thrift_spec = (
655
+ None, # 0
656
+ (1, TType.STRUCT, 'queryCheck', [BaseEvalResult, None], None, ), # 1
657
+ (2, TType.MAP, 'outputSchema', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2
658
+ )
659
+ fix_spec(all_structs)
660
+ del all_structs
@@ -0,0 +1 @@
1
+ __all__ = ['ttypes', 'constants']