e6data-python-connector 1.0.0__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.
- e6data_python_connector-1.0.0.dist-info/LICENSE +202 -0
- e6data_python_connector-1.0.0.dist-info/METADATA +205 -0
- e6data_python_connector-1.0.0.dist-info/RECORD +19 -0
- e6data_python_connector-1.0.0.dist-info/WHEEL +5 -0
- e6data_python_connector-1.0.0.dist-info/entry_points.txt +2 -0
- e6data_python_connector-1.0.0.dist-info/top_level.txt +1 -0
- e6xdb/__init__.py +10 -0
- e6xdb/common.py +269 -0
- e6xdb/constants.py +32 -0
- e6xdb/datainputstream.py +170 -0
- e6xdb/date_time_utils.py +167 -0
- e6xdb/e6x.py +467 -0
- e6xdb/exceptions.py +15 -0
- e6xdb/server/QueryEngineService.py +3776 -0
- e6xdb/server/__init__.py +1 -0
- e6xdb/server/constants.py +14 -0
- e6xdb/server/ttypes.py +342 -0
- e6xdb/sqlalchemy_e6x.py +396 -0
- e6xdb/typeId.py +73 -0
|
@@ -0,0 +1,3776 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Autogenerated by Thrift Compiler (0.17.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
|
+
import logging
|
|
15
|
+
from .ttypes import *
|
|
16
|
+
from thrift.Thrift import TProcessor
|
|
17
|
+
from thrift.transport import TTransport
|
|
18
|
+
all_structs = []
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Iface(object):
|
|
22
|
+
def clear(self, sessionId, queryId):
|
|
23
|
+
"""
|
|
24
|
+
Parameters:
|
|
25
|
+
- sessionId
|
|
26
|
+
- queryId
|
|
27
|
+
|
|
28
|
+
"""
|
|
29
|
+
pass
|
|
30
|
+
|
|
31
|
+
def cancelQuery(self, sessionId, queryId):
|
|
32
|
+
"""
|
|
33
|
+
Parameters:
|
|
34
|
+
- sessionId
|
|
35
|
+
- queryId
|
|
36
|
+
|
|
37
|
+
"""
|
|
38
|
+
pass
|
|
39
|
+
|
|
40
|
+
def explain(self, sessionId, queryId):
|
|
41
|
+
"""
|
|
42
|
+
Parameters:
|
|
43
|
+
- sessionId
|
|
44
|
+
- queryId
|
|
45
|
+
|
|
46
|
+
"""
|
|
47
|
+
pass
|
|
48
|
+
|
|
49
|
+
def dryRun(self, sessionId, sSchema, sQueryString):
|
|
50
|
+
"""
|
|
51
|
+
Parameters:
|
|
52
|
+
- sessionId
|
|
53
|
+
- sSchema
|
|
54
|
+
- sQueryString
|
|
55
|
+
|
|
56
|
+
"""
|
|
57
|
+
pass
|
|
58
|
+
|
|
59
|
+
def explainAnalyze(self, sessionId, queryId):
|
|
60
|
+
"""
|
|
61
|
+
Parameters:
|
|
62
|
+
- sessionId
|
|
63
|
+
- queryId
|
|
64
|
+
|
|
65
|
+
"""
|
|
66
|
+
pass
|
|
67
|
+
|
|
68
|
+
def prepareStatement(self, sessionId, sSchemaName, query):
|
|
69
|
+
"""
|
|
70
|
+
Parameters:
|
|
71
|
+
- sessionId
|
|
72
|
+
- sSchemaName
|
|
73
|
+
- query
|
|
74
|
+
|
|
75
|
+
"""
|
|
76
|
+
pass
|
|
77
|
+
|
|
78
|
+
def executeStatement(self, sessionId, queryId):
|
|
79
|
+
"""
|
|
80
|
+
Parameters:
|
|
81
|
+
- sessionId
|
|
82
|
+
- queryId
|
|
83
|
+
|
|
84
|
+
"""
|
|
85
|
+
pass
|
|
86
|
+
|
|
87
|
+
def getNextResultRow(self, sessionId, queryId):
|
|
88
|
+
"""
|
|
89
|
+
Parameters:
|
|
90
|
+
- sessionId
|
|
91
|
+
- queryId
|
|
92
|
+
|
|
93
|
+
"""
|
|
94
|
+
pass
|
|
95
|
+
|
|
96
|
+
def getNextResultBatch(self, sessionId, queryId):
|
|
97
|
+
"""
|
|
98
|
+
Parameters:
|
|
99
|
+
- sessionId
|
|
100
|
+
- queryId
|
|
101
|
+
|
|
102
|
+
"""
|
|
103
|
+
pass
|
|
104
|
+
|
|
105
|
+
def getResultMetadata(self, sessionId, queryId):
|
|
106
|
+
"""
|
|
107
|
+
Parameters:
|
|
108
|
+
- sessionId
|
|
109
|
+
- queryId
|
|
110
|
+
|
|
111
|
+
"""
|
|
112
|
+
pass
|
|
113
|
+
|
|
114
|
+
def authenticate(self, user, password):
|
|
115
|
+
"""
|
|
116
|
+
Parameters:
|
|
117
|
+
- user
|
|
118
|
+
- password
|
|
119
|
+
|
|
120
|
+
"""
|
|
121
|
+
pass
|
|
122
|
+
|
|
123
|
+
def getTables(self, sessionId, schema):
|
|
124
|
+
"""
|
|
125
|
+
Parameters:
|
|
126
|
+
- sessionId
|
|
127
|
+
- schema
|
|
128
|
+
|
|
129
|
+
"""
|
|
130
|
+
pass
|
|
131
|
+
|
|
132
|
+
def getSchemaNames(self, sessionId):
|
|
133
|
+
"""
|
|
134
|
+
Parameters:
|
|
135
|
+
- sessionId
|
|
136
|
+
|
|
137
|
+
"""
|
|
138
|
+
pass
|
|
139
|
+
|
|
140
|
+
def getColumns(self, sessionId, schema, table):
|
|
141
|
+
"""
|
|
142
|
+
Parameters:
|
|
143
|
+
- sessionId
|
|
144
|
+
- schema
|
|
145
|
+
- table
|
|
146
|
+
|
|
147
|
+
"""
|
|
148
|
+
pass
|
|
149
|
+
|
|
150
|
+
def updateUsers(self, userInfo):
|
|
151
|
+
"""
|
|
152
|
+
Parameters:
|
|
153
|
+
- userInfo
|
|
154
|
+
|
|
155
|
+
"""
|
|
156
|
+
pass
|
|
157
|
+
|
|
158
|
+
def setProps(self, sessionId, propMap):
|
|
159
|
+
"""
|
|
160
|
+
Parameters:
|
|
161
|
+
- sessionId
|
|
162
|
+
- propMap
|
|
163
|
+
|
|
164
|
+
"""
|
|
165
|
+
pass
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
class Client(Iface):
|
|
169
|
+
def __init__(self, iprot, oprot=None):
|
|
170
|
+
self._iprot = self._oprot = iprot
|
|
171
|
+
if oprot is not None:
|
|
172
|
+
self._oprot = oprot
|
|
173
|
+
self._seqid = 0
|
|
174
|
+
|
|
175
|
+
def clear(self, sessionId, queryId):
|
|
176
|
+
"""
|
|
177
|
+
Parameters:
|
|
178
|
+
- sessionId
|
|
179
|
+
- queryId
|
|
180
|
+
|
|
181
|
+
"""
|
|
182
|
+
self.send_clear(sessionId, queryId)
|
|
183
|
+
self.recv_clear()
|
|
184
|
+
|
|
185
|
+
def send_clear(self, sessionId, queryId):
|
|
186
|
+
self._oprot.writeMessageBegin('clear', TMessageType.CALL, self._seqid)
|
|
187
|
+
args = clear_args()
|
|
188
|
+
args.sessionId = sessionId
|
|
189
|
+
args.queryId = queryId
|
|
190
|
+
args.write(self._oprot)
|
|
191
|
+
self._oprot.writeMessageEnd()
|
|
192
|
+
self._oprot.trans.flush()
|
|
193
|
+
|
|
194
|
+
def recv_clear(self):
|
|
195
|
+
iprot = self._iprot
|
|
196
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
197
|
+
if mtype == TMessageType.EXCEPTION:
|
|
198
|
+
x = TApplicationException()
|
|
199
|
+
x.read(iprot)
|
|
200
|
+
iprot.readMessageEnd()
|
|
201
|
+
raise x
|
|
202
|
+
result = clear_result()
|
|
203
|
+
result.read(iprot)
|
|
204
|
+
iprot.readMessageEnd()
|
|
205
|
+
if result.error1 is not None:
|
|
206
|
+
raise result.error1
|
|
207
|
+
if result.error2 is not None:
|
|
208
|
+
raise result.error2
|
|
209
|
+
return
|
|
210
|
+
|
|
211
|
+
def cancelQuery(self, sessionId, queryId):
|
|
212
|
+
"""
|
|
213
|
+
Parameters:
|
|
214
|
+
- sessionId
|
|
215
|
+
- queryId
|
|
216
|
+
|
|
217
|
+
"""
|
|
218
|
+
self.send_cancelQuery(sessionId, queryId)
|
|
219
|
+
self.recv_cancelQuery()
|
|
220
|
+
|
|
221
|
+
def send_cancelQuery(self, sessionId, queryId):
|
|
222
|
+
self._oprot.writeMessageBegin('cancelQuery', TMessageType.CALL, self._seqid)
|
|
223
|
+
args = cancelQuery_args()
|
|
224
|
+
args.sessionId = sessionId
|
|
225
|
+
args.queryId = queryId
|
|
226
|
+
args.write(self._oprot)
|
|
227
|
+
self._oprot.writeMessageEnd()
|
|
228
|
+
self._oprot.trans.flush()
|
|
229
|
+
|
|
230
|
+
def recv_cancelQuery(self):
|
|
231
|
+
iprot = self._iprot
|
|
232
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
233
|
+
if mtype == TMessageType.EXCEPTION:
|
|
234
|
+
x = TApplicationException()
|
|
235
|
+
x.read(iprot)
|
|
236
|
+
iprot.readMessageEnd()
|
|
237
|
+
raise x
|
|
238
|
+
result = cancelQuery_result()
|
|
239
|
+
result.read(iprot)
|
|
240
|
+
iprot.readMessageEnd()
|
|
241
|
+
if result.error1 is not None:
|
|
242
|
+
raise result.error1
|
|
243
|
+
if result.error2 is not None:
|
|
244
|
+
raise result.error2
|
|
245
|
+
return
|
|
246
|
+
|
|
247
|
+
def explain(self, sessionId, queryId):
|
|
248
|
+
"""
|
|
249
|
+
Parameters:
|
|
250
|
+
- sessionId
|
|
251
|
+
- queryId
|
|
252
|
+
|
|
253
|
+
"""
|
|
254
|
+
self.send_explain(sessionId, queryId)
|
|
255
|
+
return self.recv_explain()
|
|
256
|
+
|
|
257
|
+
def send_explain(self, sessionId, queryId):
|
|
258
|
+
self._oprot.writeMessageBegin('explain', TMessageType.CALL, self._seqid)
|
|
259
|
+
args = explain_args()
|
|
260
|
+
args.sessionId = sessionId
|
|
261
|
+
args.queryId = queryId
|
|
262
|
+
args.write(self._oprot)
|
|
263
|
+
self._oprot.writeMessageEnd()
|
|
264
|
+
self._oprot.trans.flush()
|
|
265
|
+
|
|
266
|
+
def recv_explain(self):
|
|
267
|
+
iprot = self._iprot
|
|
268
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
269
|
+
if mtype == TMessageType.EXCEPTION:
|
|
270
|
+
x = TApplicationException()
|
|
271
|
+
x.read(iprot)
|
|
272
|
+
iprot.readMessageEnd()
|
|
273
|
+
raise x
|
|
274
|
+
result = explain_result()
|
|
275
|
+
result.read(iprot)
|
|
276
|
+
iprot.readMessageEnd()
|
|
277
|
+
if result.success is not None:
|
|
278
|
+
return result.success
|
|
279
|
+
if result.error1 is not None:
|
|
280
|
+
raise result.error1
|
|
281
|
+
if result.error2 is not None:
|
|
282
|
+
raise result.error2
|
|
283
|
+
raise TApplicationException(TApplicationException.MISSING_RESULT, "explain failed: unknown result")
|
|
284
|
+
|
|
285
|
+
def dryRun(self, sessionId, sSchema, sQueryString):
|
|
286
|
+
"""
|
|
287
|
+
Parameters:
|
|
288
|
+
- sessionId
|
|
289
|
+
- sSchema
|
|
290
|
+
- sQueryString
|
|
291
|
+
|
|
292
|
+
"""
|
|
293
|
+
self.send_dryRun(sessionId, sSchema, sQueryString)
|
|
294
|
+
return self.recv_dryRun()
|
|
295
|
+
|
|
296
|
+
def send_dryRun(self, sessionId, sSchema, sQueryString):
|
|
297
|
+
self._oprot.writeMessageBegin('dryRun', TMessageType.CALL, self._seqid)
|
|
298
|
+
args = dryRun_args()
|
|
299
|
+
args.sessionId = sessionId
|
|
300
|
+
args.sSchema = sSchema
|
|
301
|
+
args.sQueryString = sQueryString
|
|
302
|
+
args.write(self._oprot)
|
|
303
|
+
self._oprot.writeMessageEnd()
|
|
304
|
+
self._oprot.trans.flush()
|
|
305
|
+
|
|
306
|
+
def recv_dryRun(self):
|
|
307
|
+
iprot = self._iprot
|
|
308
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
309
|
+
if mtype == TMessageType.EXCEPTION:
|
|
310
|
+
x = TApplicationException()
|
|
311
|
+
x.read(iprot)
|
|
312
|
+
iprot.readMessageEnd()
|
|
313
|
+
raise x
|
|
314
|
+
result = dryRun_result()
|
|
315
|
+
result.read(iprot)
|
|
316
|
+
iprot.readMessageEnd()
|
|
317
|
+
if result.success is not None:
|
|
318
|
+
return result.success
|
|
319
|
+
if result.error1 is not None:
|
|
320
|
+
raise result.error1
|
|
321
|
+
if result.error2 is not None:
|
|
322
|
+
raise result.error2
|
|
323
|
+
raise TApplicationException(TApplicationException.MISSING_RESULT, "dryRun failed: unknown result")
|
|
324
|
+
|
|
325
|
+
def explainAnalyze(self, sessionId, queryId):
|
|
326
|
+
"""
|
|
327
|
+
Parameters:
|
|
328
|
+
- sessionId
|
|
329
|
+
- queryId
|
|
330
|
+
|
|
331
|
+
"""
|
|
332
|
+
self.send_explainAnalyze(sessionId, queryId)
|
|
333
|
+
return self.recv_explainAnalyze()
|
|
334
|
+
|
|
335
|
+
def send_explainAnalyze(self, sessionId, queryId):
|
|
336
|
+
self._oprot.writeMessageBegin('explainAnalyze', TMessageType.CALL, self._seqid)
|
|
337
|
+
args = explainAnalyze_args()
|
|
338
|
+
args.sessionId = sessionId
|
|
339
|
+
args.queryId = queryId
|
|
340
|
+
args.write(self._oprot)
|
|
341
|
+
self._oprot.writeMessageEnd()
|
|
342
|
+
self._oprot.trans.flush()
|
|
343
|
+
|
|
344
|
+
def recv_explainAnalyze(self):
|
|
345
|
+
iprot = self._iprot
|
|
346
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
347
|
+
if mtype == TMessageType.EXCEPTION:
|
|
348
|
+
x = TApplicationException()
|
|
349
|
+
x.read(iprot)
|
|
350
|
+
iprot.readMessageEnd()
|
|
351
|
+
raise x
|
|
352
|
+
result = explainAnalyze_result()
|
|
353
|
+
result.read(iprot)
|
|
354
|
+
iprot.readMessageEnd()
|
|
355
|
+
if result.success is not None:
|
|
356
|
+
return result.success
|
|
357
|
+
if result.error1 is not None:
|
|
358
|
+
raise result.error1
|
|
359
|
+
if result.error2 is not None:
|
|
360
|
+
raise result.error2
|
|
361
|
+
raise TApplicationException(TApplicationException.MISSING_RESULT, "explainAnalyze failed: unknown result")
|
|
362
|
+
|
|
363
|
+
def prepareStatement(self, sessionId, sSchemaName, query):
|
|
364
|
+
"""
|
|
365
|
+
Parameters:
|
|
366
|
+
- sessionId
|
|
367
|
+
- sSchemaName
|
|
368
|
+
- query
|
|
369
|
+
|
|
370
|
+
"""
|
|
371
|
+
self.send_prepareStatement(sessionId, sSchemaName, query)
|
|
372
|
+
return self.recv_prepareStatement()
|
|
373
|
+
|
|
374
|
+
def send_prepareStatement(self, sessionId, sSchemaName, query):
|
|
375
|
+
self._oprot.writeMessageBegin('prepareStatement', TMessageType.CALL, self._seqid)
|
|
376
|
+
args = prepareStatement_args()
|
|
377
|
+
args.sessionId = sessionId
|
|
378
|
+
args.sSchemaName = sSchemaName
|
|
379
|
+
args.query = query
|
|
380
|
+
args.write(self._oprot)
|
|
381
|
+
self._oprot.writeMessageEnd()
|
|
382
|
+
self._oprot.trans.flush()
|
|
383
|
+
|
|
384
|
+
def recv_prepareStatement(self):
|
|
385
|
+
iprot = self._iprot
|
|
386
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
387
|
+
if mtype == TMessageType.EXCEPTION:
|
|
388
|
+
x = TApplicationException()
|
|
389
|
+
x.read(iprot)
|
|
390
|
+
iprot.readMessageEnd()
|
|
391
|
+
raise x
|
|
392
|
+
result = prepareStatement_result()
|
|
393
|
+
result.read(iprot)
|
|
394
|
+
iprot.readMessageEnd()
|
|
395
|
+
if result.success is not None:
|
|
396
|
+
return result.success
|
|
397
|
+
if result.error1 is not None:
|
|
398
|
+
raise result.error1
|
|
399
|
+
if result.error2 is not None:
|
|
400
|
+
raise result.error2
|
|
401
|
+
raise TApplicationException(TApplicationException.MISSING_RESULT, "prepareStatement failed: unknown result")
|
|
402
|
+
|
|
403
|
+
def executeStatement(self, sessionId, queryId):
|
|
404
|
+
"""
|
|
405
|
+
Parameters:
|
|
406
|
+
- sessionId
|
|
407
|
+
- queryId
|
|
408
|
+
|
|
409
|
+
"""
|
|
410
|
+
self.send_executeStatement(sessionId, queryId)
|
|
411
|
+
self.recv_executeStatement()
|
|
412
|
+
|
|
413
|
+
def send_executeStatement(self, sessionId, queryId):
|
|
414
|
+
self._oprot.writeMessageBegin('executeStatement', TMessageType.CALL, self._seqid)
|
|
415
|
+
args = executeStatement_args()
|
|
416
|
+
args.sessionId = sessionId
|
|
417
|
+
args.queryId = queryId
|
|
418
|
+
args.write(self._oprot)
|
|
419
|
+
self._oprot.writeMessageEnd()
|
|
420
|
+
self._oprot.trans.flush()
|
|
421
|
+
|
|
422
|
+
def recv_executeStatement(self):
|
|
423
|
+
iprot = self._iprot
|
|
424
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
425
|
+
if mtype == TMessageType.EXCEPTION:
|
|
426
|
+
x = TApplicationException()
|
|
427
|
+
x.read(iprot)
|
|
428
|
+
iprot.readMessageEnd()
|
|
429
|
+
raise x
|
|
430
|
+
result = executeStatement_result()
|
|
431
|
+
result.read(iprot)
|
|
432
|
+
iprot.readMessageEnd()
|
|
433
|
+
if result.error1 is not None:
|
|
434
|
+
raise result.error1
|
|
435
|
+
if result.error2 is not None:
|
|
436
|
+
raise result.error2
|
|
437
|
+
return
|
|
438
|
+
|
|
439
|
+
def getNextResultRow(self, sessionId, queryId):
|
|
440
|
+
"""
|
|
441
|
+
Parameters:
|
|
442
|
+
- sessionId
|
|
443
|
+
- queryId
|
|
444
|
+
|
|
445
|
+
"""
|
|
446
|
+
self.send_getNextResultRow(sessionId, queryId)
|
|
447
|
+
return self.recv_getNextResultRow()
|
|
448
|
+
|
|
449
|
+
def send_getNextResultRow(self, sessionId, queryId):
|
|
450
|
+
self._oprot.writeMessageBegin('getNextResultRow', TMessageType.CALL, self._seqid)
|
|
451
|
+
args = getNextResultRow_args()
|
|
452
|
+
args.sessionId = sessionId
|
|
453
|
+
args.queryId = queryId
|
|
454
|
+
args.write(self._oprot)
|
|
455
|
+
self._oprot.writeMessageEnd()
|
|
456
|
+
self._oprot.trans.flush()
|
|
457
|
+
|
|
458
|
+
def recv_getNextResultRow(self):
|
|
459
|
+
iprot = self._iprot
|
|
460
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
461
|
+
if mtype == TMessageType.EXCEPTION:
|
|
462
|
+
x = TApplicationException()
|
|
463
|
+
x.read(iprot)
|
|
464
|
+
iprot.readMessageEnd()
|
|
465
|
+
raise x
|
|
466
|
+
result = getNextResultRow_result()
|
|
467
|
+
result.read(iprot)
|
|
468
|
+
iprot.readMessageEnd()
|
|
469
|
+
if result.success is not None:
|
|
470
|
+
return result.success
|
|
471
|
+
if result.error1 is not None:
|
|
472
|
+
raise result.error1
|
|
473
|
+
if result.error2 is not None:
|
|
474
|
+
raise result.error2
|
|
475
|
+
raise TApplicationException(TApplicationException.MISSING_RESULT, "getNextResultRow failed: unknown result")
|
|
476
|
+
|
|
477
|
+
def getNextResultBatch(self, sessionId, queryId):
|
|
478
|
+
"""
|
|
479
|
+
Parameters:
|
|
480
|
+
- sessionId
|
|
481
|
+
- queryId
|
|
482
|
+
|
|
483
|
+
"""
|
|
484
|
+
self.send_getNextResultBatch(sessionId, queryId)
|
|
485
|
+
return self.recv_getNextResultBatch()
|
|
486
|
+
|
|
487
|
+
def send_getNextResultBatch(self, sessionId, queryId):
|
|
488
|
+
self._oprot.writeMessageBegin('getNextResultBatch', TMessageType.CALL, self._seqid)
|
|
489
|
+
args = getNextResultBatch_args()
|
|
490
|
+
args.sessionId = sessionId
|
|
491
|
+
args.queryId = queryId
|
|
492
|
+
args.write(self._oprot)
|
|
493
|
+
self._oprot.writeMessageEnd()
|
|
494
|
+
self._oprot.trans.flush()
|
|
495
|
+
|
|
496
|
+
def recv_getNextResultBatch(self):
|
|
497
|
+
iprot = self._iprot
|
|
498
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
499
|
+
if mtype == TMessageType.EXCEPTION:
|
|
500
|
+
x = TApplicationException()
|
|
501
|
+
x.read(iprot)
|
|
502
|
+
iprot.readMessageEnd()
|
|
503
|
+
raise x
|
|
504
|
+
result = getNextResultBatch_result()
|
|
505
|
+
result.read(iprot)
|
|
506
|
+
iprot.readMessageEnd()
|
|
507
|
+
if result.success is not None:
|
|
508
|
+
return result.success
|
|
509
|
+
if result.error1 is not None:
|
|
510
|
+
raise result.error1
|
|
511
|
+
if result.error2 is not None:
|
|
512
|
+
raise result.error2
|
|
513
|
+
raise TApplicationException(TApplicationException.MISSING_RESULT, "getNextResultBatch failed: unknown result")
|
|
514
|
+
|
|
515
|
+
def getResultMetadata(self, sessionId, queryId):
|
|
516
|
+
"""
|
|
517
|
+
Parameters:
|
|
518
|
+
- sessionId
|
|
519
|
+
- queryId
|
|
520
|
+
|
|
521
|
+
"""
|
|
522
|
+
self.send_getResultMetadata(sessionId, queryId)
|
|
523
|
+
return self.recv_getResultMetadata()
|
|
524
|
+
|
|
525
|
+
def send_getResultMetadata(self, sessionId, queryId):
|
|
526
|
+
self._oprot.writeMessageBegin('getResultMetadata', TMessageType.CALL, self._seqid)
|
|
527
|
+
args = getResultMetadata_args()
|
|
528
|
+
args.sessionId = sessionId
|
|
529
|
+
args.queryId = queryId
|
|
530
|
+
args.write(self._oprot)
|
|
531
|
+
self._oprot.writeMessageEnd()
|
|
532
|
+
self._oprot.trans.flush()
|
|
533
|
+
|
|
534
|
+
def recv_getResultMetadata(self):
|
|
535
|
+
iprot = self._iprot
|
|
536
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
537
|
+
if mtype == TMessageType.EXCEPTION:
|
|
538
|
+
x = TApplicationException()
|
|
539
|
+
x.read(iprot)
|
|
540
|
+
iprot.readMessageEnd()
|
|
541
|
+
raise x
|
|
542
|
+
result = getResultMetadata_result()
|
|
543
|
+
result.read(iprot)
|
|
544
|
+
iprot.readMessageEnd()
|
|
545
|
+
if result.success is not None:
|
|
546
|
+
return result.success
|
|
547
|
+
if result.error1 is not None:
|
|
548
|
+
raise result.error1
|
|
549
|
+
if result.error2 is not None:
|
|
550
|
+
raise result.error2
|
|
551
|
+
raise TApplicationException(TApplicationException.MISSING_RESULT, "getResultMetadata failed: unknown result")
|
|
552
|
+
|
|
553
|
+
def authenticate(self, user, password):
|
|
554
|
+
"""
|
|
555
|
+
Parameters:
|
|
556
|
+
- user
|
|
557
|
+
- password
|
|
558
|
+
|
|
559
|
+
"""
|
|
560
|
+
self.send_authenticate(user, password)
|
|
561
|
+
return self.recv_authenticate()
|
|
562
|
+
|
|
563
|
+
def send_authenticate(self, user, password):
|
|
564
|
+
self._oprot.writeMessageBegin('authenticate', TMessageType.CALL, self._seqid)
|
|
565
|
+
args = authenticate_args()
|
|
566
|
+
args.user = user
|
|
567
|
+
args.password = password
|
|
568
|
+
args.write(self._oprot)
|
|
569
|
+
self._oprot.writeMessageEnd()
|
|
570
|
+
self._oprot.trans.flush()
|
|
571
|
+
|
|
572
|
+
def recv_authenticate(self):
|
|
573
|
+
iprot = self._iprot
|
|
574
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
575
|
+
if mtype == TMessageType.EXCEPTION:
|
|
576
|
+
x = TApplicationException()
|
|
577
|
+
x.read(iprot)
|
|
578
|
+
iprot.readMessageEnd()
|
|
579
|
+
raise x
|
|
580
|
+
result = authenticate_result()
|
|
581
|
+
result.read(iprot)
|
|
582
|
+
iprot.readMessageEnd()
|
|
583
|
+
if result.success is not None:
|
|
584
|
+
return result.success
|
|
585
|
+
if result.error is not None:
|
|
586
|
+
raise result.error
|
|
587
|
+
raise TApplicationException(TApplicationException.MISSING_RESULT, "authenticate failed: unknown result")
|
|
588
|
+
|
|
589
|
+
def getTables(self, sessionId, schema):
|
|
590
|
+
"""
|
|
591
|
+
Parameters:
|
|
592
|
+
- sessionId
|
|
593
|
+
- schema
|
|
594
|
+
|
|
595
|
+
"""
|
|
596
|
+
self.send_getTables(sessionId, schema)
|
|
597
|
+
return self.recv_getTables()
|
|
598
|
+
|
|
599
|
+
def send_getTables(self, sessionId, schema):
|
|
600
|
+
self._oprot.writeMessageBegin('getTables', TMessageType.CALL, self._seqid)
|
|
601
|
+
args = getTables_args()
|
|
602
|
+
args.sessionId = sessionId
|
|
603
|
+
args.schema = schema
|
|
604
|
+
args.write(self._oprot)
|
|
605
|
+
self._oprot.writeMessageEnd()
|
|
606
|
+
self._oprot.trans.flush()
|
|
607
|
+
|
|
608
|
+
def recv_getTables(self):
|
|
609
|
+
iprot = self._iprot
|
|
610
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
611
|
+
if mtype == TMessageType.EXCEPTION:
|
|
612
|
+
x = TApplicationException()
|
|
613
|
+
x.read(iprot)
|
|
614
|
+
iprot.readMessageEnd()
|
|
615
|
+
raise x
|
|
616
|
+
result = getTables_result()
|
|
617
|
+
result.read(iprot)
|
|
618
|
+
iprot.readMessageEnd()
|
|
619
|
+
if result.success is not None:
|
|
620
|
+
return result.success
|
|
621
|
+
if result.error1 is not None:
|
|
622
|
+
raise result.error1
|
|
623
|
+
if result.error2 is not None:
|
|
624
|
+
raise result.error2
|
|
625
|
+
raise TApplicationException(TApplicationException.MISSING_RESULT, "getTables failed: unknown result")
|
|
626
|
+
|
|
627
|
+
def getSchemaNames(self, sessionId):
|
|
628
|
+
"""
|
|
629
|
+
Parameters:
|
|
630
|
+
- sessionId
|
|
631
|
+
|
|
632
|
+
"""
|
|
633
|
+
self.send_getSchemaNames(sessionId)
|
|
634
|
+
return self.recv_getSchemaNames()
|
|
635
|
+
|
|
636
|
+
def send_getSchemaNames(self, sessionId):
|
|
637
|
+
self._oprot.writeMessageBegin('getSchemaNames', TMessageType.CALL, self._seqid)
|
|
638
|
+
args = getSchemaNames_args()
|
|
639
|
+
args.sessionId = sessionId
|
|
640
|
+
args.write(self._oprot)
|
|
641
|
+
self._oprot.writeMessageEnd()
|
|
642
|
+
self._oprot.trans.flush()
|
|
643
|
+
|
|
644
|
+
def recv_getSchemaNames(self):
|
|
645
|
+
iprot = self._iprot
|
|
646
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
647
|
+
if mtype == TMessageType.EXCEPTION:
|
|
648
|
+
x = TApplicationException()
|
|
649
|
+
x.read(iprot)
|
|
650
|
+
iprot.readMessageEnd()
|
|
651
|
+
raise x
|
|
652
|
+
result = getSchemaNames_result()
|
|
653
|
+
result.read(iprot)
|
|
654
|
+
iprot.readMessageEnd()
|
|
655
|
+
if result.success is not None:
|
|
656
|
+
return result.success
|
|
657
|
+
if result.error1 is not None:
|
|
658
|
+
raise result.error1
|
|
659
|
+
if result.error2 is not None:
|
|
660
|
+
raise result.error2
|
|
661
|
+
raise TApplicationException(TApplicationException.MISSING_RESULT, "getSchemaNames failed: unknown result")
|
|
662
|
+
|
|
663
|
+
def getColumns(self, sessionId, schema, table):
|
|
664
|
+
"""
|
|
665
|
+
Parameters:
|
|
666
|
+
- sessionId
|
|
667
|
+
- schema
|
|
668
|
+
- table
|
|
669
|
+
|
|
670
|
+
"""
|
|
671
|
+
self.send_getColumns(sessionId, schema, table)
|
|
672
|
+
return self.recv_getColumns()
|
|
673
|
+
|
|
674
|
+
def send_getColumns(self, sessionId, schema, table):
|
|
675
|
+
self._oprot.writeMessageBegin('getColumns', TMessageType.CALL, self._seqid)
|
|
676
|
+
args = getColumns_args()
|
|
677
|
+
args.sessionId = sessionId
|
|
678
|
+
args.schema = schema
|
|
679
|
+
args.table = table
|
|
680
|
+
args.write(self._oprot)
|
|
681
|
+
self._oprot.writeMessageEnd()
|
|
682
|
+
self._oprot.trans.flush()
|
|
683
|
+
|
|
684
|
+
def recv_getColumns(self):
|
|
685
|
+
iprot = self._iprot
|
|
686
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
687
|
+
if mtype == TMessageType.EXCEPTION:
|
|
688
|
+
x = TApplicationException()
|
|
689
|
+
x.read(iprot)
|
|
690
|
+
iprot.readMessageEnd()
|
|
691
|
+
raise x
|
|
692
|
+
result = getColumns_result()
|
|
693
|
+
result.read(iprot)
|
|
694
|
+
iprot.readMessageEnd()
|
|
695
|
+
if result.success is not None:
|
|
696
|
+
return result.success
|
|
697
|
+
if result.error1 is not None:
|
|
698
|
+
raise result.error1
|
|
699
|
+
if result.error2 is not None:
|
|
700
|
+
raise result.error2
|
|
701
|
+
raise TApplicationException(TApplicationException.MISSING_RESULT, "getColumns failed: unknown result")
|
|
702
|
+
|
|
703
|
+
def updateUsers(self, userInfo):
|
|
704
|
+
"""
|
|
705
|
+
Parameters:
|
|
706
|
+
- userInfo
|
|
707
|
+
|
|
708
|
+
"""
|
|
709
|
+
self.send_updateUsers(userInfo)
|
|
710
|
+
self.recv_updateUsers()
|
|
711
|
+
|
|
712
|
+
def send_updateUsers(self, userInfo):
|
|
713
|
+
self._oprot.writeMessageBegin('updateUsers', TMessageType.CALL, self._seqid)
|
|
714
|
+
args = updateUsers_args()
|
|
715
|
+
args.userInfo = userInfo
|
|
716
|
+
args.write(self._oprot)
|
|
717
|
+
self._oprot.writeMessageEnd()
|
|
718
|
+
self._oprot.trans.flush()
|
|
719
|
+
|
|
720
|
+
def recv_updateUsers(self):
|
|
721
|
+
iprot = self._iprot
|
|
722
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
723
|
+
if mtype == TMessageType.EXCEPTION:
|
|
724
|
+
x = TApplicationException()
|
|
725
|
+
x.read(iprot)
|
|
726
|
+
iprot.readMessageEnd()
|
|
727
|
+
raise x
|
|
728
|
+
result = updateUsers_result()
|
|
729
|
+
result.read(iprot)
|
|
730
|
+
iprot.readMessageEnd()
|
|
731
|
+
if result.error1 is not None:
|
|
732
|
+
raise result.error1
|
|
733
|
+
if result.error2 is not None:
|
|
734
|
+
raise result.error2
|
|
735
|
+
return
|
|
736
|
+
|
|
737
|
+
def setProps(self, sessionId, propMap):
|
|
738
|
+
"""
|
|
739
|
+
Parameters:
|
|
740
|
+
- sessionId
|
|
741
|
+
- propMap
|
|
742
|
+
|
|
743
|
+
"""
|
|
744
|
+
self.send_setProps(sessionId, propMap)
|
|
745
|
+
self.recv_setProps()
|
|
746
|
+
|
|
747
|
+
def send_setProps(self, sessionId, propMap):
|
|
748
|
+
self._oprot.writeMessageBegin('setProps', TMessageType.CALL, self._seqid)
|
|
749
|
+
args = setProps_args()
|
|
750
|
+
args.sessionId = sessionId
|
|
751
|
+
args.propMap = propMap
|
|
752
|
+
args.write(self._oprot)
|
|
753
|
+
self._oprot.writeMessageEnd()
|
|
754
|
+
self._oprot.trans.flush()
|
|
755
|
+
|
|
756
|
+
def recv_setProps(self):
|
|
757
|
+
iprot = self._iprot
|
|
758
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
759
|
+
if mtype == TMessageType.EXCEPTION:
|
|
760
|
+
x = TApplicationException()
|
|
761
|
+
x.read(iprot)
|
|
762
|
+
iprot.readMessageEnd()
|
|
763
|
+
raise x
|
|
764
|
+
result = setProps_result()
|
|
765
|
+
result.read(iprot)
|
|
766
|
+
iprot.readMessageEnd()
|
|
767
|
+
if result.error2 is not None:
|
|
768
|
+
raise result.error2
|
|
769
|
+
return
|
|
770
|
+
|
|
771
|
+
|
|
772
|
+
class Processor(Iface, TProcessor):
|
|
773
|
+
def __init__(self, handler):
|
|
774
|
+
self._handler = handler
|
|
775
|
+
self._processMap = {}
|
|
776
|
+
self._processMap["clear"] = Processor.process_clear
|
|
777
|
+
self._processMap["cancelQuery"] = Processor.process_cancelQuery
|
|
778
|
+
self._processMap["explain"] = Processor.process_explain
|
|
779
|
+
self._processMap["dryRun"] = Processor.process_dryRun
|
|
780
|
+
self._processMap["explainAnalyze"] = Processor.process_explainAnalyze
|
|
781
|
+
self._processMap["prepareStatement"] = Processor.process_prepareStatement
|
|
782
|
+
self._processMap["executeStatement"] = Processor.process_executeStatement
|
|
783
|
+
self._processMap["getNextResultRow"] = Processor.process_getNextResultRow
|
|
784
|
+
self._processMap["getNextResultBatch"] = Processor.process_getNextResultBatch
|
|
785
|
+
self._processMap["getResultMetadata"] = Processor.process_getResultMetadata
|
|
786
|
+
self._processMap["authenticate"] = Processor.process_authenticate
|
|
787
|
+
self._processMap["getTables"] = Processor.process_getTables
|
|
788
|
+
self._processMap["getSchemaNames"] = Processor.process_getSchemaNames
|
|
789
|
+
self._processMap["getColumns"] = Processor.process_getColumns
|
|
790
|
+
self._processMap["updateUsers"] = Processor.process_updateUsers
|
|
791
|
+
self._processMap["setProps"] = Processor.process_setProps
|
|
792
|
+
self._on_message_begin = None
|
|
793
|
+
|
|
794
|
+
def on_message_begin(self, func):
|
|
795
|
+
self._on_message_begin = func
|
|
796
|
+
|
|
797
|
+
def process(self, iprot, oprot):
|
|
798
|
+
(name, type, seqid) = iprot.readMessageBegin()
|
|
799
|
+
if self._on_message_begin:
|
|
800
|
+
self._on_message_begin(name, type, seqid)
|
|
801
|
+
if name not in self._processMap:
|
|
802
|
+
iprot.skip(TType.STRUCT)
|
|
803
|
+
iprot.readMessageEnd()
|
|
804
|
+
x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
|
|
805
|
+
oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
|
|
806
|
+
x.write(oprot)
|
|
807
|
+
oprot.writeMessageEnd()
|
|
808
|
+
oprot.trans.flush()
|
|
809
|
+
return
|
|
810
|
+
else:
|
|
811
|
+
self._processMap[name](self, seqid, iprot, oprot)
|
|
812
|
+
return True
|
|
813
|
+
|
|
814
|
+
def process_clear(self, seqid, iprot, oprot):
|
|
815
|
+
args = clear_args()
|
|
816
|
+
args.read(iprot)
|
|
817
|
+
iprot.readMessageEnd()
|
|
818
|
+
result = clear_result()
|
|
819
|
+
try:
|
|
820
|
+
self._handler.clear(args.sessionId, args.queryId)
|
|
821
|
+
msg_type = TMessageType.REPLY
|
|
822
|
+
except TTransport.TTransportException:
|
|
823
|
+
raise
|
|
824
|
+
except QueryProcessingException as error1:
|
|
825
|
+
msg_type = TMessageType.REPLY
|
|
826
|
+
result.error1 = error1
|
|
827
|
+
except AccessDeniedException as error2:
|
|
828
|
+
msg_type = TMessageType.REPLY
|
|
829
|
+
result.error2 = error2
|
|
830
|
+
except TApplicationException as ex:
|
|
831
|
+
logging.exception('TApplication exception in handler')
|
|
832
|
+
msg_type = TMessageType.EXCEPTION
|
|
833
|
+
result = ex
|
|
834
|
+
except Exception:
|
|
835
|
+
logging.exception('Unexpected exception in handler')
|
|
836
|
+
msg_type = TMessageType.EXCEPTION
|
|
837
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
838
|
+
oprot.writeMessageBegin("clear", msg_type, seqid)
|
|
839
|
+
result.write(oprot)
|
|
840
|
+
oprot.writeMessageEnd()
|
|
841
|
+
oprot.trans.flush()
|
|
842
|
+
|
|
843
|
+
def process_cancelQuery(self, seqid, iprot, oprot):
|
|
844
|
+
args = cancelQuery_args()
|
|
845
|
+
args.read(iprot)
|
|
846
|
+
iprot.readMessageEnd()
|
|
847
|
+
result = cancelQuery_result()
|
|
848
|
+
try:
|
|
849
|
+
self._handler.cancelQuery(args.sessionId, args.queryId)
|
|
850
|
+
msg_type = TMessageType.REPLY
|
|
851
|
+
except TTransport.TTransportException:
|
|
852
|
+
raise
|
|
853
|
+
except QueryProcessingException as error1:
|
|
854
|
+
msg_type = TMessageType.REPLY
|
|
855
|
+
result.error1 = error1
|
|
856
|
+
except AccessDeniedException as error2:
|
|
857
|
+
msg_type = TMessageType.REPLY
|
|
858
|
+
result.error2 = error2
|
|
859
|
+
except TApplicationException as ex:
|
|
860
|
+
logging.exception('TApplication exception in handler')
|
|
861
|
+
msg_type = TMessageType.EXCEPTION
|
|
862
|
+
result = ex
|
|
863
|
+
except Exception:
|
|
864
|
+
logging.exception('Unexpected exception in handler')
|
|
865
|
+
msg_type = TMessageType.EXCEPTION
|
|
866
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
867
|
+
oprot.writeMessageBegin("cancelQuery", msg_type, seqid)
|
|
868
|
+
result.write(oprot)
|
|
869
|
+
oprot.writeMessageEnd()
|
|
870
|
+
oprot.trans.flush()
|
|
871
|
+
|
|
872
|
+
def process_explain(self, seqid, iprot, oprot):
|
|
873
|
+
args = explain_args()
|
|
874
|
+
args.read(iprot)
|
|
875
|
+
iprot.readMessageEnd()
|
|
876
|
+
result = explain_result()
|
|
877
|
+
try:
|
|
878
|
+
result.success = self._handler.explain(args.sessionId, args.queryId)
|
|
879
|
+
msg_type = TMessageType.REPLY
|
|
880
|
+
except TTransport.TTransportException:
|
|
881
|
+
raise
|
|
882
|
+
except QueryProcessingException as error1:
|
|
883
|
+
msg_type = TMessageType.REPLY
|
|
884
|
+
result.error1 = error1
|
|
885
|
+
except AccessDeniedException as error2:
|
|
886
|
+
msg_type = TMessageType.REPLY
|
|
887
|
+
result.error2 = error2
|
|
888
|
+
except TApplicationException as ex:
|
|
889
|
+
logging.exception('TApplication exception in handler')
|
|
890
|
+
msg_type = TMessageType.EXCEPTION
|
|
891
|
+
result = ex
|
|
892
|
+
except Exception:
|
|
893
|
+
logging.exception('Unexpected exception in handler')
|
|
894
|
+
msg_type = TMessageType.EXCEPTION
|
|
895
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
896
|
+
oprot.writeMessageBegin("explain", msg_type, seqid)
|
|
897
|
+
result.write(oprot)
|
|
898
|
+
oprot.writeMessageEnd()
|
|
899
|
+
oprot.trans.flush()
|
|
900
|
+
|
|
901
|
+
def process_dryRun(self, seqid, iprot, oprot):
|
|
902
|
+
args = dryRun_args()
|
|
903
|
+
args.read(iprot)
|
|
904
|
+
iprot.readMessageEnd()
|
|
905
|
+
result = dryRun_result()
|
|
906
|
+
try:
|
|
907
|
+
result.success = self._handler.dryRun(args.sessionId, args.sSchema, args.sQueryString)
|
|
908
|
+
msg_type = TMessageType.REPLY
|
|
909
|
+
except TTransport.TTransportException:
|
|
910
|
+
raise
|
|
911
|
+
except QueryProcessingException as error1:
|
|
912
|
+
msg_type = TMessageType.REPLY
|
|
913
|
+
result.error1 = error1
|
|
914
|
+
except AccessDeniedException as error2:
|
|
915
|
+
msg_type = TMessageType.REPLY
|
|
916
|
+
result.error2 = error2
|
|
917
|
+
except TApplicationException as ex:
|
|
918
|
+
logging.exception('TApplication exception in handler')
|
|
919
|
+
msg_type = TMessageType.EXCEPTION
|
|
920
|
+
result = ex
|
|
921
|
+
except Exception:
|
|
922
|
+
logging.exception('Unexpected exception in handler')
|
|
923
|
+
msg_type = TMessageType.EXCEPTION
|
|
924
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
925
|
+
oprot.writeMessageBegin("dryRun", msg_type, seqid)
|
|
926
|
+
result.write(oprot)
|
|
927
|
+
oprot.writeMessageEnd()
|
|
928
|
+
oprot.trans.flush()
|
|
929
|
+
|
|
930
|
+
def process_explainAnalyze(self, seqid, iprot, oprot):
|
|
931
|
+
args = explainAnalyze_args()
|
|
932
|
+
args.read(iprot)
|
|
933
|
+
iprot.readMessageEnd()
|
|
934
|
+
result = explainAnalyze_result()
|
|
935
|
+
try:
|
|
936
|
+
result.success = self._handler.explainAnalyze(args.sessionId, args.queryId)
|
|
937
|
+
msg_type = TMessageType.REPLY
|
|
938
|
+
except TTransport.TTransportException:
|
|
939
|
+
raise
|
|
940
|
+
except QueryProcessingException as error1:
|
|
941
|
+
msg_type = TMessageType.REPLY
|
|
942
|
+
result.error1 = error1
|
|
943
|
+
except AccessDeniedException as error2:
|
|
944
|
+
msg_type = TMessageType.REPLY
|
|
945
|
+
result.error2 = error2
|
|
946
|
+
except TApplicationException as ex:
|
|
947
|
+
logging.exception('TApplication exception in handler')
|
|
948
|
+
msg_type = TMessageType.EXCEPTION
|
|
949
|
+
result = ex
|
|
950
|
+
except Exception:
|
|
951
|
+
logging.exception('Unexpected exception in handler')
|
|
952
|
+
msg_type = TMessageType.EXCEPTION
|
|
953
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
954
|
+
oprot.writeMessageBegin("explainAnalyze", msg_type, seqid)
|
|
955
|
+
result.write(oprot)
|
|
956
|
+
oprot.writeMessageEnd()
|
|
957
|
+
oprot.trans.flush()
|
|
958
|
+
|
|
959
|
+
def process_prepareStatement(self, seqid, iprot, oprot):
|
|
960
|
+
args = prepareStatement_args()
|
|
961
|
+
args.read(iprot)
|
|
962
|
+
iprot.readMessageEnd()
|
|
963
|
+
result = prepareStatement_result()
|
|
964
|
+
try:
|
|
965
|
+
result.success = self._handler.prepareStatement(args.sessionId, args.sSchemaName, args.query)
|
|
966
|
+
msg_type = TMessageType.REPLY
|
|
967
|
+
except TTransport.TTransportException:
|
|
968
|
+
raise
|
|
969
|
+
except QueryProcessingException as error1:
|
|
970
|
+
msg_type = TMessageType.REPLY
|
|
971
|
+
result.error1 = error1
|
|
972
|
+
except AccessDeniedException as error2:
|
|
973
|
+
msg_type = TMessageType.REPLY
|
|
974
|
+
result.error2 = error2
|
|
975
|
+
except TApplicationException as ex:
|
|
976
|
+
logging.exception('TApplication exception in handler')
|
|
977
|
+
msg_type = TMessageType.EXCEPTION
|
|
978
|
+
result = ex
|
|
979
|
+
except Exception:
|
|
980
|
+
logging.exception('Unexpected exception in handler')
|
|
981
|
+
msg_type = TMessageType.EXCEPTION
|
|
982
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
983
|
+
oprot.writeMessageBegin("prepareStatement", msg_type, seqid)
|
|
984
|
+
result.write(oprot)
|
|
985
|
+
oprot.writeMessageEnd()
|
|
986
|
+
oprot.trans.flush()
|
|
987
|
+
|
|
988
|
+
def process_executeStatement(self, seqid, iprot, oprot):
|
|
989
|
+
args = executeStatement_args()
|
|
990
|
+
args.read(iprot)
|
|
991
|
+
iprot.readMessageEnd()
|
|
992
|
+
result = executeStatement_result()
|
|
993
|
+
try:
|
|
994
|
+
self._handler.executeStatement(args.sessionId, args.queryId)
|
|
995
|
+
msg_type = TMessageType.REPLY
|
|
996
|
+
except TTransport.TTransportException:
|
|
997
|
+
raise
|
|
998
|
+
except QueryProcessingException as error1:
|
|
999
|
+
msg_type = TMessageType.REPLY
|
|
1000
|
+
result.error1 = error1
|
|
1001
|
+
except AccessDeniedException as error2:
|
|
1002
|
+
msg_type = TMessageType.REPLY
|
|
1003
|
+
result.error2 = error2
|
|
1004
|
+
except TApplicationException as ex:
|
|
1005
|
+
logging.exception('TApplication exception in handler')
|
|
1006
|
+
msg_type = TMessageType.EXCEPTION
|
|
1007
|
+
result = ex
|
|
1008
|
+
except Exception:
|
|
1009
|
+
logging.exception('Unexpected exception in handler')
|
|
1010
|
+
msg_type = TMessageType.EXCEPTION
|
|
1011
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
1012
|
+
oprot.writeMessageBegin("executeStatement", msg_type, seqid)
|
|
1013
|
+
result.write(oprot)
|
|
1014
|
+
oprot.writeMessageEnd()
|
|
1015
|
+
oprot.trans.flush()
|
|
1016
|
+
|
|
1017
|
+
def process_getNextResultRow(self, seqid, iprot, oprot):
|
|
1018
|
+
args = getNextResultRow_args()
|
|
1019
|
+
args.read(iprot)
|
|
1020
|
+
iprot.readMessageEnd()
|
|
1021
|
+
result = getNextResultRow_result()
|
|
1022
|
+
try:
|
|
1023
|
+
result.success = self._handler.getNextResultRow(args.sessionId, args.queryId)
|
|
1024
|
+
msg_type = TMessageType.REPLY
|
|
1025
|
+
except TTransport.TTransportException:
|
|
1026
|
+
raise
|
|
1027
|
+
except QueryProcessingException as error1:
|
|
1028
|
+
msg_type = TMessageType.REPLY
|
|
1029
|
+
result.error1 = error1
|
|
1030
|
+
except AccessDeniedException as error2:
|
|
1031
|
+
msg_type = TMessageType.REPLY
|
|
1032
|
+
result.error2 = error2
|
|
1033
|
+
except TApplicationException as ex:
|
|
1034
|
+
logging.exception('TApplication exception in handler')
|
|
1035
|
+
msg_type = TMessageType.EXCEPTION
|
|
1036
|
+
result = ex
|
|
1037
|
+
except Exception:
|
|
1038
|
+
logging.exception('Unexpected exception in handler')
|
|
1039
|
+
msg_type = TMessageType.EXCEPTION
|
|
1040
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
1041
|
+
oprot.writeMessageBegin("getNextResultRow", msg_type, seqid)
|
|
1042
|
+
result.write(oprot)
|
|
1043
|
+
oprot.writeMessageEnd()
|
|
1044
|
+
oprot.trans.flush()
|
|
1045
|
+
|
|
1046
|
+
def process_getNextResultBatch(self, seqid, iprot, oprot):
|
|
1047
|
+
args = getNextResultBatch_args()
|
|
1048
|
+
args.read(iprot)
|
|
1049
|
+
iprot.readMessageEnd()
|
|
1050
|
+
result = getNextResultBatch_result()
|
|
1051
|
+
try:
|
|
1052
|
+
result.success = self._handler.getNextResultBatch(args.sessionId, args.queryId)
|
|
1053
|
+
msg_type = TMessageType.REPLY
|
|
1054
|
+
except TTransport.TTransportException:
|
|
1055
|
+
raise
|
|
1056
|
+
except QueryProcessingException as error1:
|
|
1057
|
+
msg_type = TMessageType.REPLY
|
|
1058
|
+
result.error1 = error1
|
|
1059
|
+
except AccessDeniedException as error2:
|
|
1060
|
+
msg_type = TMessageType.REPLY
|
|
1061
|
+
result.error2 = error2
|
|
1062
|
+
except TApplicationException as ex:
|
|
1063
|
+
logging.exception('TApplication exception in handler')
|
|
1064
|
+
msg_type = TMessageType.EXCEPTION
|
|
1065
|
+
result = ex
|
|
1066
|
+
except Exception:
|
|
1067
|
+
logging.exception('Unexpected exception in handler')
|
|
1068
|
+
msg_type = TMessageType.EXCEPTION
|
|
1069
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
1070
|
+
oprot.writeMessageBegin("getNextResultBatch", msg_type, seqid)
|
|
1071
|
+
result.write(oprot)
|
|
1072
|
+
oprot.writeMessageEnd()
|
|
1073
|
+
oprot.trans.flush()
|
|
1074
|
+
|
|
1075
|
+
def process_getResultMetadata(self, seqid, iprot, oprot):
|
|
1076
|
+
args = getResultMetadata_args()
|
|
1077
|
+
args.read(iprot)
|
|
1078
|
+
iprot.readMessageEnd()
|
|
1079
|
+
result = getResultMetadata_result()
|
|
1080
|
+
try:
|
|
1081
|
+
result.success = self._handler.getResultMetadata(args.sessionId, args.queryId)
|
|
1082
|
+
msg_type = TMessageType.REPLY
|
|
1083
|
+
except TTransport.TTransportException:
|
|
1084
|
+
raise
|
|
1085
|
+
except QueryProcessingException as error1:
|
|
1086
|
+
msg_type = TMessageType.REPLY
|
|
1087
|
+
result.error1 = error1
|
|
1088
|
+
except AccessDeniedException as error2:
|
|
1089
|
+
msg_type = TMessageType.REPLY
|
|
1090
|
+
result.error2 = error2
|
|
1091
|
+
except TApplicationException as ex:
|
|
1092
|
+
logging.exception('TApplication exception in handler')
|
|
1093
|
+
msg_type = TMessageType.EXCEPTION
|
|
1094
|
+
result = ex
|
|
1095
|
+
except Exception:
|
|
1096
|
+
logging.exception('Unexpected exception in handler')
|
|
1097
|
+
msg_type = TMessageType.EXCEPTION
|
|
1098
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
1099
|
+
oprot.writeMessageBegin("getResultMetadata", msg_type, seqid)
|
|
1100
|
+
result.write(oprot)
|
|
1101
|
+
oprot.writeMessageEnd()
|
|
1102
|
+
oprot.trans.flush()
|
|
1103
|
+
|
|
1104
|
+
def process_authenticate(self, seqid, iprot, oprot):
|
|
1105
|
+
args = authenticate_args()
|
|
1106
|
+
args.read(iprot)
|
|
1107
|
+
iprot.readMessageEnd()
|
|
1108
|
+
result = authenticate_result()
|
|
1109
|
+
try:
|
|
1110
|
+
result.success = self._handler.authenticate(args.user, args.password)
|
|
1111
|
+
msg_type = TMessageType.REPLY
|
|
1112
|
+
except TTransport.TTransportException:
|
|
1113
|
+
raise
|
|
1114
|
+
except AccessDeniedException as error:
|
|
1115
|
+
msg_type = TMessageType.REPLY
|
|
1116
|
+
result.error = error
|
|
1117
|
+
except TApplicationException as ex:
|
|
1118
|
+
logging.exception('TApplication exception in handler')
|
|
1119
|
+
msg_type = TMessageType.EXCEPTION
|
|
1120
|
+
result = ex
|
|
1121
|
+
except Exception:
|
|
1122
|
+
logging.exception('Unexpected exception in handler')
|
|
1123
|
+
msg_type = TMessageType.EXCEPTION
|
|
1124
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
1125
|
+
oprot.writeMessageBegin("authenticate", msg_type, seqid)
|
|
1126
|
+
result.write(oprot)
|
|
1127
|
+
oprot.writeMessageEnd()
|
|
1128
|
+
oprot.trans.flush()
|
|
1129
|
+
|
|
1130
|
+
def process_getTables(self, seqid, iprot, oprot):
|
|
1131
|
+
args = getTables_args()
|
|
1132
|
+
args.read(iprot)
|
|
1133
|
+
iprot.readMessageEnd()
|
|
1134
|
+
result = getTables_result()
|
|
1135
|
+
try:
|
|
1136
|
+
result.success = self._handler.getTables(args.sessionId, args.schema)
|
|
1137
|
+
msg_type = TMessageType.REPLY
|
|
1138
|
+
except TTransport.TTransportException:
|
|
1139
|
+
raise
|
|
1140
|
+
except QueryProcessingException as error1:
|
|
1141
|
+
msg_type = TMessageType.REPLY
|
|
1142
|
+
result.error1 = error1
|
|
1143
|
+
except AccessDeniedException as error2:
|
|
1144
|
+
msg_type = TMessageType.REPLY
|
|
1145
|
+
result.error2 = error2
|
|
1146
|
+
except TApplicationException as ex:
|
|
1147
|
+
logging.exception('TApplication exception in handler')
|
|
1148
|
+
msg_type = TMessageType.EXCEPTION
|
|
1149
|
+
result = ex
|
|
1150
|
+
except Exception:
|
|
1151
|
+
logging.exception('Unexpected exception in handler')
|
|
1152
|
+
msg_type = TMessageType.EXCEPTION
|
|
1153
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
1154
|
+
oprot.writeMessageBegin("getTables", msg_type, seqid)
|
|
1155
|
+
result.write(oprot)
|
|
1156
|
+
oprot.writeMessageEnd()
|
|
1157
|
+
oprot.trans.flush()
|
|
1158
|
+
|
|
1159
|
+
def process_getSchemaNames(self, seqid, iprot, oprot):
|
|
1160
|
+
args = getSchemaNames_args()
|
|
1161
|
+
args.read(iprot)
|
|
1162
|
+
iprot.readMessageEnd()
|
|
1163
|
+
result = getSchemaNames_result()
|
|
1164
|
+
try:
|
|
1165
|
+
result.success = self._handler.getSchemaNames(args.sessionId)
|
|
1166
|
+
msg_type = TMessageType.REPLY
|
|
1167
|
+
except TTransport.TTransportException:
|
|
1168
|
+
raise
|
|
1169
|
+
except QueryProcessingException as error1:
|
|
1170
|
+
msg_type = TMessageType.REPLY
|
|
1171
|
+
result.error1 = error1
|
|
1172
|
+
except AccessDeniedException as error2:
|
|
1173
|
+
msg_type = TMessageType.REPLY
|
|
1174
|
+
result.error2 = error2
|
|
1175
|
+
except TApplicationException as ex:
|
|
1176
|
+
logging.exception('TApplication exception in handler')
|
|
1177
|
+
msg_type = TMessageType.EXCEPTION
|
|
1178
|
+
result = ex
|
|
1179
|
+
except Exception:
|
|
1180
|
+
logging.exception('Unexpected exception in handler')
|
|
1181
|
+
msg_type = TMessageType.EXCEPTION
|
|
1182
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
1183
|
+
oprot.writeMessageBegin("getSchemaNames", msg_type, seqid)
|
|
1184
|
+
result.write(oprot)
|
|
1185
|
+
oprot.writeMessageEnd()
|
|
1186
|
+
oprot.trans.flush()
|
|
1187
|
+
|
|
1188
|
+
def process_getColumns(self, seqid, iprot, oprot):
|
|
1189
|
+
args = getColumns_args()
|
|
1190
|
+
args.read(iprot)
|
|
1191
|
+
iprot.readMessageEnd()
|
|
1192
|
+
result = getColumns_result()
|
|
1193
|
+
try:
|
|
1194
|
+
result.success = self._handler.getColumns(args.sessionId, args.schema, args.table)
|
|
1195
|
+
msg_type = TMessageType.REPLY
|
|
1196
|
+
except TTransport.TTransportException:
|
|
1197
|
+
raise
|
|
1198
|
+
except QueryProcessingException as error1:
|
|
1199
|
+
msg_type = TMessageType.REPLY
|
|
1200
|
+
result.error1 = error1
|
|
1201
|
+
except AccessDeniedException as error2:
|
|
1202
|
+
msg_type = TMessageType.REPLY
|
|
1203
|
+
result.error2 = error2
|
|
1204
|
+
except TApplicationException as ex:
|
|
1205
|
+
logging.exception('TApplication exception in handler')
|
|
1206
|
+
msg_type = TMessageType.EXCEPTION
|
|
1207
|
+
result = ex
|
|
1208
|
+
except Exception:
|
|
1209
|
+
logging.exception('Unexpected exception in handler')
|
|
1210
|
+
msg_type = TMessageType.EXCEPTION
|
|
1211
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
1212
|
+
oprot.writeMessageBegin("getColumns", msg_type, seqid)
|
|
1213
|
+
result.write(oprot)
|
|
1214
|
+
oprot.writeMessageEnd()
|
|
1215
|
+
oprot.trans.flush()
|
|
1216
|
+
|
|
1217
|
+
def process_updateUsers(self, seqid, iprot, oprot):
|
|
1218
|
+
args = updateUsers_args()
|
|
1219
|
+
args.read(iprot)
|
|
1220
|
+
iprot.readMessageEnd()
|
|
1221
|
+
result = updateUsers_result()
|
|
1222
|
+
try:
|
|
1223
|
+
self._handler.updateUsers(args.userInfo)
|
|
1224
|
+
msg_type = TMessageType.REPLY
|
|
1225
|
+
except TTransport.TTransportException:
|
|
1226
|
+
raise
|
|
1227
|
+
except QueryProcessingException as error1:
|
|
1228
|
+
msg_type = TMessageType.REPLY
|
|
1229
|
+
result.error1 = error1
|
|
1230
|
+
except AccessDeniedException as error2:
|
|
1231
|
+
msg_type = TMessageType.REPLY
|
|
1232
|
+
result.error2 = error2
|
|
1233
|
+
except TApplicationException as ex:
|
|
1234
|
+
logging.exception('TApplication exception in handler')
|
|
1235
|
+
msg_type = TMessageType.EXCEPTION
|
|
1236
|
+
result = ex
|
|
1237
|
+
except Exception:
|
|
1238
|
+
logging.exception('Unexpected exception in handler')
|
|
1239
|
+
msg_type = TMessageType.EXCEPTION
|
|
1240
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
1241
|
+
oprot.writeMessageBegin("updateUsers", msg_type, seqid)
|
|
1242
|
+
result.write(oprot)
|
|
1243
|
+
oprot.writeMessageEnd()
|
|
1244
|
+
oprot.trans.flush()
|
|
1245
|
+
|
|
1246
|
+
def process_setProps(self, seqid, iprot, oprot):
|
|
1247
|
+
args = setProps_args()
|
|
1248
|
+
args.read(iprot)
|
|
1249
|
+
iprot.readMessageEnd()
|
|
1250
|
+
result = setProps_result()
|
|
1251
|
+
try:
|
|
1252
|
+
self._handler.setProps(args.sessionId, args.propMap)
|
|
1253
|
+
msg_type = TMessageType.REPLY
|
|
1254
|
+
except TTransport.TTransportException:
|
|
1255
|
+
raise
|
|
1256
|
+
except AccessDeniedException as error2:
|
|
1257
|
+
msg_type = TMessageType.REPLY
|
|
1258
|
+
result.error2 = error2
|
|
1259
|
+
except TApplicationException as ex:
|
|
1260
|
+
logging.exception('TApplication exception in handler')
|
|
1261
|
+
msg_type = TMessageType.EXCEPTION
|
|
1262
|
+
result = ex
|
|
1263
|
+
except Exception:
|
|
1264
|
+
logging.exception('Unexpected exception in handler')
|
|
1265
|
+
msg_type = TMessageType.EXCEPTION
|
|
1266
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
1267
|
+
oprot.writeMessageBegin("setProps", msg_type, seqid)
|
|
1268
|
+
result.write(oprot)
|
|
1269
|
+
oprot.writeMessageEnd()
|
|
1270
|
+
oprot.trans.flush()
|
|
1271
|
+
|
|
1272
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
|
1273
|
+
|
|
1274
|
+
|
|
1275
|
+
class clear_args(object):
|
|
1276
|
+
"""
|
|
1277
|
+
Attributes:
|
|
1278
|
+
- sessionId
|
|
1279
|
+
- queryId
|
|
1280
|
+
|
|
1281
|
+
"""
|
|
1282
|
+
|
|
1283
|
+
|
|
1284
|
+
def __init__(self, sessionId=None, queryId=None,):
|
|
1285
|
+
self.sessionId = sessionId
|
|
1286
|
+
self.queryId = queryId
|
|
1287
|
+
|
|
1288
|
+
def read(self, iprot):
|
|
1289
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
1290
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
1291
|
+
return
|
|
1292
|
+
iprot.readStructBegin()
|
|
1293
|
+
while True:
|
|
1294
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
1295
|
+
if ftype == TType.STOP:
|
|
1296
|
+
break
|
|
1297
|
+
if fid == 1:
|
|
1298
|
+
if ftype == TType.STRING:
|
|
1299
|
+
self.sessionId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1300
|
+
else:
|
|
1301
|
+
iprot.skip(ftype)
|
|
1302
|
+
elif fid == 2:
|
|
1303
|
+
if ftype == TType.STRING:
|
|
1304
|
+
self.queryId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1305
|
+
else:
|
|
1306
|
+
iprot.skip(ftype)
|
|
1307
|
+
else:
|
|
1308
|
+
iprot.skip(ftype)
|
|
1309
|
+
iprot.readFieldEnd()
|
|
1310
|
+
iprot.readStructEnd()
|
|
1311
|
+
|
|
1312
|
+
def write(self, oprot):
|
|
1313
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
1314
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
1315
|
+
return
|
|
1316
|
+
oprot.writeStructBegin('clear_args')
|
|
1317
|
+
if self.sessionId is not None:
|
|
1318
|
+
oprot.writeFieldBegin('sessionId', TType.STRING, 1)
|
|
1319
|
+
oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId)
|
|
1320
|
+
oprot.writeFieldEnd()
|
|
1321
|
+
if self.queryId is not None:
|
|
1322
|
+
oprot.writeFieldBegin('queryId', TType.STRING, 2)
|
|
1323
|
+
oprot.writeString(self.queryId.encode('utf-8') if sys.version_info[0] == 2 else self.queryId)
|
|
1324
|
+
oprot.writeFieldEnd()
|
|
1325
|
+
oprot.writeFieldStop()
|
|
1326
|
+
oprot.writeStructEnd()
|
|
1327
|
+
|
|
1328
|
+
def validate(self):
|
|
1329
|
+
return
|
|
1330
|
+
|
|
1331
|
+
def __repr__(self):
|
|
1332
|
+
L = ['%s=%r' % (key, value)
|
|
1333
|
+
for key, value in self.__dict__.items()]
|
|
1334
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
1335
|
+
|
|
1336
|
+
def __eq__(self, other):
|
|
1337
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
1338
|
+
|
|
1339
|
+
def __ne__(self, other):
|
|
1340
|
+
return not (self == other)
|
|
1341
|
+
all_structs.append(clear_args)
|
|
1342
|
+
clear_args.thrift_spec = (
|
|
1343
|
+
None, # 0
|
|
1344
|
+
(1, TType.STRING, 'sessionId', 'UTF8', None, ), # 1
|
|
1345
|
+
(2, TType.STRING, 'queryId', 'UTF8', None, ), # 2
|
|
1346
|
+
)
|
|
1347
|
+
|
|
1348
|
+
|
|
1349
|
+
class clear_result(object):
|
|
1350
|
+
"""
|
|
1351
|
+
Attributes:
|
|
1352
|
+
- error1
|
|
1353
|
+
- error2
|
|
1354
|
+
|
|
1355
|
+
"""
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
def __init__(self, error1=None, error2=None,):
|
|
1359
|
+
self.error1 = error1
|
|
1360
|
+
self.error2 = error2
|
|
1361
|
+
|
|
1362
|
+
def read(self, iprot):
|
|
1363
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
1364
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
1365
|
+
return
|
|
1366
|
+
iprot.readStructBegin()
|
|
1367
|
+
while True:
|
|
1368
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
1369
|
+
if ftype == TType.STOP:
|
|
1370
|
+
break
|
|
1371
|
+
if fid == 1:
|
|
1372
|
+
if ftype == TType.STRUCT:
|
|
1373
|
+
self.error1 = QueryProcessingException.read(iprot)
|
|
1374
|
+
else:
|
|
1375
|
+
iprot.skip(ftype)
|
|
1376
|
+
elif fid == 2:
|
|
1377
|
+
if ftype == TType.STRUCT:
|
|
1378
|
+
self.error2 = AccessDeniedException.read(iprot)
|
|
1379
|
+
else:
|
|
1380
|
+
iprot.skip(ftype)
|
|
1381
|
+
else:
|
|
1382
|
+
iprot.skip(ftype)
|
|
1383
|
+
iprot.readFieldEnd()
|
|
1384
|
+
iprot.readStructEnd()
|
|
1385
|
+
|
|
1386
|
+
def write(self, oprot):
|
|
1387
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
1388
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
1389
|
+
return
|
|
1390
|
+
oprot.writeStructBegin('clear_result')
|
|
1391
|
+
if self.error1 is not None:
|
|
1392
|
+
oprot.writeFieldBegin('error1', TType.STRUCT, 1)
|
|
1393
|
+
self.error1.write(oprot)
|
|
1394
|
+
oprot.writeFieldEnd()
|
|
1395
|
+
if self.error2 is not None:
|
|
1396
|
+
oprot.writeFieldBegin('error2', TType.STRUCT, 2)
|
|
1397
|
+
self.error2.write(oprot)
|
|
1398
|
+
oprot.writeFieldEnd()
|
|
1399
|
+
oprot.writeFieldStop()
|
|
1400
|
+
oprot.writeStructEnd()
|
|
1401
|
+
|
|
1402
|
+
def validate(self):
|
|
1403
|
+
return
|
|
1404
|
+
|
|
1405
|
+
def __repr__(self):
|
|
1406
|
+
L = ['%s=%r' % (key, value)
|
|
1407
|
+
for key, value in self.__dict__.items()]
|
|
1408
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
1409
|
+
|
|
1410
|
+
def __eq__(self, other):
|
|
1411
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
1412
|
+
|
|
1413
|
+
def __ne__(self, other):
|
|
1414
|
+
return not (self == other)
|
|
1415
|
+
all_structs.append(clear_result)
|
|
1416
|
+
clear_result.thrift_spec = (
|
|
1417
|
+
None, # 0
|
|
1418
|
+
(1, TType.STRUCT, 'error1', [QueryProcessingException, None], None, ), # 1
|
|
1419
|
+
(2, TType.STRUCT, 'error2', [AccessDeniedException, None], None, ), # 2
|
|
1420
|
+
)
|
|
1421
|
+
|
|
1422
|
+
|
|
1423
|
+
class cancelQuery_args(object):
|
|
1424
|
+
"""
|
|
1425
|
+
Attributes:
|
|
1426
|
+
- sessionId
|
|
1427
|
+
- queryId
|
|
1428
|
+
|
|
1429
|
+
"""
|
|
1430
|
+
|
|
1431
|
+
|
|
1432
|
+
def __init__(self, sessionId=None, queryId=None,):
|
|
1433
|
+
self.sessionId = sessionId
|
|
1434
|
+
self.queryId = queryId
|
|
1435
|
+
|
|
1436
|
+
def read(self, iprot):
|
|
1437
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
1438
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
1439
|
+
return
|
|
1440
|
+
iprot.readStructBegin()
|
|
1441
|
+
while True:
|
|
1442
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
1443
|
+
if ftype == TType.STOP:
|
|
1444
|
+
break
|
|
1445
|
+
if fid == 1:
|
|
1446
|
+
if ftype == TType.STRING:
|
|
1447
|
+
self.sessionId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1448
|
+
else:
|
|
1449
|
+
iprot.skip(ftype)
|
|
1450
|
+
elif fid == 2:
|
|
1451
|
+
if ftype == TType.STRING:
|
|
1452
|
+
self.queryId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1453
|
+
else:
|
|
1454
|
+
iprot.skip(ftype)
|
|
1455
|
+
else:
|
|
1456
|
+
iprot.skip(ftype)
|
|
1457
|
+
iprot.readFieldEnd()
|
|
1458
|
+
iprot.readStructEnd()
|
|
1459
|
+
|
|
1460
|
+
def write(self, oprot):
|
|
1461
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
1462
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
1463
|
+
return
|
|
1464
|
+
oprot.writeStructBegin('cancelQuery_args')
|
|
1465
|
+
if self.sessionId is not None:
|
|
1466
|
+
oprot.writeFieldBegin('sessionId', TType.STRING, 1)
|
|
1467
|
+
oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId)
|
|
1468
|
+
oprot.writeFieldEnd()
|
|
1469
|
+
if self.queryId is not None:
|
|
1470
|
+
oprot.writeFieldBegin('queryId', TType.STRING, 2)
|
|
1471
|
+
oprot.writeString(self.queryId.encode('utf-8') if sys.version_info[0] == 2 else self.queryId)
|
|
1472
|
+
oprot.writeFieldEnd()
|
|
1473
|
+
oprot.writeFieldStop()
|
|
1474
|
+
oprot.writeStructEnd()
|
|
1475
|
+
|
|
1476
|
+
def validate(self):
|
|
1477
|
+
return
|
|
1478
|
+
|
|
1479
|
+
def __repr__(self):
|
|
1480
|
+
L = ['%s=%r' % (key, value)
|
|
1481
|
+
for key, value in self.__dict__.items()]
|
|
1482
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
1483
|
+
|
|
1484
|
+
def __eq__(self, other):
|
|
1485
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
1486
|
+
|
|
1487
|
+
def __ne__(self, other):
|
|
1488
|
+
return not (self == other)
|
|
1489
|
+
all_structs.append(cancelQuery_args)
|
|
1490
|
+
cancelQuery_args.thrift_spec = (
|
|
1491
|
+
None, # 0
|
|
1492
|
+
(1, TType.STRING, 'sessionId', 'UTF8', None, ), # 1
|
|
1493
|
+
(2, TType.STRING, 'queryId', 'UTF8', None, ), # 2
|
|
1494
|
+
)
|
|
1495
|
+
|
|
1496
|
+
|
|
1497
|
+
class cancelQuery_result(object):
|
|
1498
|
+
"""
|
|
1499
|
+
Attributes:
|
|
1500
|
+
- error1
|
|
1501
|
+
- error2
|
|
1502
|
+
|
|
1503
|
+
"""
|
|
1504
|
+
|
|
1505
|
+
|
|
1506
|
+
def __init__(self, error1=None, error2=None,):
|
|
1507
|
+
self.error1 = error1
|
|
1508
|
+
self.error2 = error2
|
|
1509
|
+
|
|
1510
|
+
def read(self, iprot):
|
|
1511
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
1512
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
1513
|
+
return
|
|
1514
|
+
iprot.readStructBegin()
|
|
1515
|
+
while True:
|
|
1516
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
1517
|
+
if ftype == TType.STOP:
|
|
1518
|
+
break
|
|
1519
|
+
if fid == 1:
|
|
1520
|
+
if ftype == TType.STRUCT:
|
|
1521
|
+
self.error1 = QueryProcessingException.read(iprot)
|
|
1522
|
+
else:
|
|
1523
|
+
iprot.skip(ftype)
|
|
1524
|
+
elif fid == 2:
|
|
1525
|
+
if ftype == TType.STRUCT:
|
|
1526
|
+
self.error2 = AccessDeniedException.read(iprot)
|
|
1527
|
+
else:
|
|
1528
|
+
iprot.skip(ftype)
|
|
1529
|
+
else:
|
|
1530
|
+
iprot.skip(ftype)
|
|
1531
|
+
iprot.readFieldEnd()
|
|
1532
|
+
iprot.readStructEnd()
|
|
1533
|
+
|
|
1534
|
+
def write(self, oprot):
|
|
1535
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
1536
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
1537
|
+
return
|
|
1538
|
+
oprot.writeStructBegin('cancelQuery_result')
|
|
1539
|
+
if self.error1 is not None:
|
|
1540
|
+
oprot.writeFieldBegin('error1', TType.STRUCT, 1)
|
|
1541
|
+
self.error1.write(oprot)
|
|
1542
|
+
oprot.writeFieldEnd()
|
|
1543
|
+
if self.error2 is not None:
|
|
1544
|
+
oprot.writeFieldBegin('error2', TType.STRUCT, 2)
|
|
1545
|
+
self.error2.write(oprot)
|
|
1546
|
+
oprot.writeFieldEnd()
|
|
1547
|
+
oprot.writeFieldStop()
|
|
1548
|
+
oprot.writeStructEnd()
|
|
1549
|
+
|
|
1550
|
+
def validate(self):
|
|
1551
|
+
return
|
|
1552
|
+
|
|
1553
|
+
def __repr__(self):
|
|
1554
|
+
L = ['%s=%r' % (key, value)
|
|
1555
|
+
for key, value in self.__dict__.items()]
|
|
1556
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
1557
|
+
|
|
1558
|
+
def __eq__(self, other):
|
|
1559
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
1560
|
+
|
|
1561
|
+
def __ne__(self, other):
|
|
1562
|
+
return not (self == other)
|
|
1563
|
+
all_structs.append(cancelQuery_result)
|
|
1564
|
+
cancelQuery_result.thrift_spec = (
|
|
1565
|
+
None, # 0
|
|
1566
|
+
(1, TType.STRUCT, 'error1', [QueryProcessingException, None], None, ), # 1
|
|
1567
|
+
(2, TType.STRUCT, 'error2', [AccessDeniedException, None], None, ), # 2
|
|
1568
|
+
)
|
|
1569
|
+
|
|
1570
|
+
|
|
1571
|
+
class explain_args(object):
|
|
1572
|
+
"""
|
|
1573
|
+
Attributes:
|
|
1574
|
+
- sessionId
|
|
1575
|
+
- queryId
|
|
1576
|
+
|
|
1577
|
+
"""
|
|
1578
|
+
|
|
1579
|
+
|
|
1580
|
+
def __init__(self, sessionId=None, queryId=None,):
|
|
1581
|
+
self.sessionId = sessionId
|
|
1582
|
+
self.queryId = queryId
|
|
1583
|
+
|
|
1584
|
+
def read(self, iprot):
|
|
1585
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
1586
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
1587
|
+
return
|
|
1588
|
+
iprot.readStructBegin()
|
|
1589
|
+
while True:
|
|
1590
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
1591
|
+
if ftype == TType.STOP:
|
|
1592
|
+
break
|
|
1593
|
+
if fid == 1:
|
|
1594
|
+
if ftype == TType.STRING:
|
|
1595
|
+
self.sessionId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1596
|
+
else:
|
|
1597
|
+
iprot.skip(ftype)
|
|
1598
|
+
elif fid == 2:
|
|
1599
|
+
if ftype == TType.STRING:
|
|
1600
|
+
self.queryId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1601
|
+
else:
|
|
1602
|
+
iprot.skip(ftype)
|
|
1603
|
+
else:
|
|
1604
|
+
iprot.skip(ftype)
|
|
1605
|
+
iprot.readFieldEnd()
|
|
1606
|
+
iprot.readStructEnd()
|
|
1607
|
+
|
|
1608
|
+
def write(self, oprot):
|
|
1609
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
1610
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
1611
|
+
return
|
|
1612
|
+
oprot.writeStructBegin('explain_args')
|
|
1613
|
+
if self.sessionId is not None:
|
|
1614
|
+
oprot.writeFieldBegin('sessionId', TType.STRING, 1)
|
|
1615
|
+
oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId)
|
|
1616
|
+
oprot.writeFieldEnd()
|
|
1617
|
+
if self.queryId is not None:
|
|
1618
|
+
oprot.writeFieldBegin('queryId', TType.STRING, 2)
|
|
1619
|
+
oprot.writeString(self.queryId.encode('utf-8') if sys.version_info[0] == 2 else self.queryId)
|
|
1620
|
+
oprot.writeFieldEnd()
|
|
1621
|
+
oprot.writeFieldStop()
|
|
1622
|
+
oprot.writeStructEnd()
|
|
1623
|
+
|
|
1624
|
+
def validate(self):
|
|
1625
|
+
return
|
|
1626
|
+
|
|
1627
|
+
def __repr__(self):
|
|
1628
|
+
L = ['%s=%r' % (key, value)
|
|
1629
|
+
for key, value in self.__dict__.items()]
|
|
1630
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
1631
|
+
|
|
1632
|
+
def __eq__(self, other):
|
|
1633
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
1634
|
+
|
|
1635
|
+
def __ne__(self, other):
|
|
1636
|
+
return not (self == other)
|
|
1637
|
+
all_structs.append(explain_args)
|
|
1638
|
+
explain_args.thrift_spec = (
|
|
1639
|
+
None, # 0
|
|
1640
|
+
(1, TType.STRING, 'sessionId', 'UTF8', None, ), # 1
|
|
1641
|
+
(2, TType.STRING, 'queryId', 'UTF8', None, ), # 2
|
|
1642
|
+
)
|
|
1643
|
+
|
|
1644
|
+
|
|
1645
|
+
class explain_result(object):
|
|
1646
|
+
"""
|
|
1647
|
+
Attributes:
|
|
1648
|
+
- success
|
|
1649
|
+
- error1
|
|
1650
|
+
- error2
|
|
1651
|
+
|
|
1652
|
+
"""
|
|
1653
|
+
|
|
1654
|
+
|
|
1655
|
+
def __init__(self, success=None, error1=None, error2=None,):
|
|
1656
|
+
self.success = success
|
|
1657
|
+
self.error1 = error1
|
|
1658
|
+
self.error2 = error2
|
|
1659
|
+
|
|
1660
|
+
def read(self, iprot):
|
|
1661
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
1662
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
1663
|
+
return
|
|
1664
|
+
iprot.readStructBegin()
|
|
1665
|
+
while True:
|
|
1666
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
1667
|
+
if ftype == TType.STOP:
|
|
1668
|
+
break
|
|
1669
|
+
if fid == 0:
|
|
1670
|
+
if ftype == TType.STRING:
|
|
1671
|
+
self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1672
|
+
else:
|
|
1673
|
+
iprot.skip(ftype)
|
|
1674
|
+
elif fid == 1:
|
|
1675
|
+
if ftype == TType.STRUCT:
|
|
1676
|
+
self.error1 = QueryProcessingException.read(iprot)
|
|
1677
|
+
else:
|
|
1678
|
+
iprot.skip(ftype)
|
|
1679
|
+
elif fid == 2:
|
|
1680
|
+
if ftype == TType.STRUCT:
|
|
1681
|
+
self.error2 = AccessDeniedException.read(iprot)
|
|
1682
|
+
else:
|
|
1683
|
+
iprot.skip(ftype)
|
|
1684
|
+
else:
|
|
1685
|
+
iprot.skip(ftype)
|
|
1686
|
+
iprot.readFieldEnd()
|
|
1687
|
+
iprot.readStructEnd()
|
|
1688
|
+
|
|
1689
|
+
def write(self, oprot):
|
|
1690
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
1691
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
1692
|
+
return
|
|
1693
|
+
oprot.writeStructBegin('explain_result')
|
|
1694
|
+
if self.success is not None:
|
|
1695
|
+
oprot.writeFieldBegin('success', TType.STRING, 0)
|
|
1696
|
+
oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success)
|
|
1697
|
+
oprot.writeFieldEnd()
|
|
1698
|
+
if self.error1 is not None:
|
|
1699
|
+
oprot.writeFieldBegin('error1', TType.STRUCT, 1)
|
|
1700
|
+
self.error1.write(oprot)
|
|
1701
|
+
oprot.writeFieldEnd()
|
|
1702
|
+
if self.error2 is not None:
|
|
1703
|
+
oprot.writeFieldBegin('error2', TType.STRUCT, 2)
|
|
1704
|
+
self.error2.write(oprot)
|
|
1705
|
+
oprot.writeFieldEnd()
|
|
1706
|
+
oprot.writeFieldStop()
|
|
1707
|
+
oprot.writeStructEnd()
|
|
1708
|
+
|
|
1709
|
+
def validate(self):
|
|
1710
|
+
return
|
|
1711
|
+
|
|
1712
|
+
def __repr__(self):
|
|
1713
|
+
L = ['%s=%r' % (key, value)
|
|
1714
|
+
for key, value in self.__dict__.items()]
|
|
1715
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
1716
|
+
|
|
1717
|
+
def __eq__(self, other):
|
|
1718
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
1719
|
+
|
|
1720
|
+
def __ne__(self, other):
|
|
1721
|
+
return not (self == other)
|
|
1722
|
+
all_structs.append(explain_result)
|
|
1723
|
+
explain_result.thrift_spec = (
|
|
1724
|
+
(0, TType.STRING, 'success', 'UTF8', None, ), # 0
|
|
1725
|
+
(1, TType.STRUCT, 'error1', [QueryProcessingException, None], None, ), # 1
|
|
1726
|
+
(2, TType.STRUCT, 'error2', [AccessDeniedException, None], None, ), # 2
|
|
1727
|
+
)
|
|
1728
|
+
|
|
1729
|
+
|
|
1730
|
+
class dryRun_args(object):
|
|
1731
|
+
"""
|
|
1732
|
+
Attributes:
|
|
1733
|
+
- sessionId
|
|
1734
|
+
- sSchema
|
|
1735
|
+
- sQueryString
|
|
1736
|
+
|
|
1737
|
+
"""
|
|
1738
|
+
|
|
1739
|
+
|
|
1740
|
+
def __init__(self, sessionId=None, sSchema=None, sQueryString=None,):
|
|
1741
|
+
self.sessionId = sessionId
|
|
1742
|
+
self.sSchema = sSchema
|
|
1743
|
+
self.sQueryString = sQueryString
|
|
1744
|
+
|
|
1745
|
+
def read(self, iprot):
|
|
1746
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
1747
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
1748
|
+
return
|
|
1749
|
+
iprot.readStructBegin()
|
|
1750
|
+
while True:
|
|
1751
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
1752
|
+
if ftype == TType.STOP:
|
|
1753
|
+
break
|
|
1754
|
+
if fid == 1:
|
|
1755
|
+
if ftype == TType.STRING:
|
|
1756
|
+
self.sessionId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1757
|
+
else:
|
|
1758
|
+
iprot.skip(ftype)
|
|
1759
|
+
elif fid == 2:
|
|
1760
|
+
if ftype == TType.STRING:
|
|
1761
|
+
self.sSchema = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1762
|
+
else:
|
|
1763
|
+
iprot.skip(ftype)
|
|
1764
|
+
elif fid == 3:
|
|
1765
|
+
if ftype == TType.STRING:
|
|
1766
|
+
self.sQueryString = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1767
|
+
else:
|
|
1768
|
+
iprot.skip(ftype)
|
|
1769
|
+
else:
|
|
1770
|
+
iprot.skip(ftype)
|
|
1771
|
+
iprot.readFieldEnd()
|
|
1772
|
+
iprot.readStructEnd()
|
|
1773
|
+
|
|
1774
|
+
def write(self, oprot):
|
|
1775
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
1776
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
1777
|
+
return
|
|
1778
|
+
oprot.writeStructBegin('dryRun_args')
|
|
1779
|
+
if self.sessionId is not None:
|
|
1780
|
+
oprot.writeFieldBegin('sessionId', TType.STRING, 1)
|
|
1781
|
+
oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId)
|
|
1782
|
+
oprot.writeFieldEnd()
|
|
1783
|
+
if self.sSchema is not None:
|
|
1784
|
+
oprot.writeFieldBegin('sSchema', TType.STRING, 2)
|
|
1785
|
+
oprot.writeString(self.sSchema.encode('utf-8') if sys.version_info[0] == 2 else self.sSchema)
|
|
1786
|
+
oprot.writeFieldEnd()
|
|
1787
|
+
if self.sQueryString is not None:
|
|
1788
|
+
oprot.writeFieldBegin('sQueryString', TType.STRING, 3)
|
|
1789
|
+
oprot.writeString(self.sQueryString.encode('utf-8') if sys.version_info[0] == 2 else self.sQueryString)
|
|
1790
|
+
oprot.writeFieldEnd()
|
|
1791
|
+
oprot.writeFieldStop()
|
|
1792
|
+
oprot.writeStructEnd()
|
|
1793
|
+
|
|
1794
|
+
def validate(self):
|
|
1795
|
+
return
|
|
1796
|
+
|
|
1797
|
+
def __repr__(self):
|
|
1798
|
+
L = ['%s=%r' % (key, value)
|
|
1799
|
+
for key, value in self.__dict__.items()]
|
|
1800
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
1801
|
+
|
|
1802
|
+
def __eq__(self, other):
|
|
1803
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
1804
|
+
|
|
1805
|
+
def __ne__(self, other):
|
|
1806
|
+
return not (self == other)
|
|
1807
|
+
all_structs.append(dryRun_args)
|
|
1808
|
+
dryRun_args.thrift_spec = (
|
|
1809
|
+
None, # 0
|
|
1810
|
+
(1, TType.STRING, 'sessionId', 'UTF8', None, ), # 1
|
|
1811
|
+
(2, TType.STRING, 'sSchema', 'UTF8', None, ), # 2
|
|
1812
|
+
(3, TType.STRING, 'sQueryString', 'UTF8', None, ), # 3
|
|
1813
|
+
)
|
|
1814
|
+
|
|
1815
|
+
|
|
1816
|
+
class dryRun_result(object):
|
|
1817
|
+
"""
|
|
1818
|
+
Attributes:
|
|
1819
|
+
- success
|
|
1820
|
+
- error1
|
|
1821
|
+
- error2
|
|
1822
|
+
|
|
1823
|
+
"""
|
|
1824
|
+
|
|
1825
|
+
|
|
1826
|
+
def __init__(self, success=None, error1=None, error2=None,):
|
|
1827
|
+
self.success = success
|
|
1828
|
+
self.error1 = error1
|
|
1829
|
+
self.error2 = error2
|
|
1830
|
+
|
|
1831
|
+
def read(self, iprot):
|
|
1832
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
1833
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
1834
|
+
return
|
|
1835
|
+
iprot.readStructBegin()
|
|
1836
|
+
while True:
|
|
1837
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
1838
|
+
if ftype == TType.STOP:
|
|
1839
|
+
break
|
|
1840
|
+
if fid == 0:
|
|
1841
|
+
if ftype == TType.STRING:
|
|
1842
|
+
self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1843
|
+
else:
|
|
1844
|
+
iprot.skip(ftype)
|
|
1845
|
+
elif fid == 1:
|
|
1846
|
+
if ftype == TType.STRUCT:
|
|
1847
|
+
self.error1 = QueryProcessingException.read(iprot)
|
|
1848
|
+
else:
|
|
1849
|
+
iprot.skip(ftype)
|
|
1850
|
+
elif fid == 2:
|
|
1851
|
+
if ftype == TType.STRUCT:
|
|
1852
|
+
self.error2 = AccessDeniedException.read(iprot)
|
|
1853
|
+
else:
|
|
1854
|
+
iprot.skip(ftype)
|
|
1855
|
+
else:
|
|
1856
|
+
iprot.skip(ftype)
|
|
1857
|
+
iprot.readFieldEnd()
|
|
1858
|
+
iprot.readStructEnd()
|
|
1859
|
+
|
|
1860
|
+
def write(self, oprot):
|
|
1861
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
1862
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
1863
|
+
return
|
|
1864
|
+
oprot.writeStructBegin('dryRun_result')
|
|
1865
|
+
if self.success is not None:
|
|
1866
|
+
oprot.writeFieldBegin('success', TType.STRING, 0)
|
|
1867
|
+
oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success)
|
|
1868
|
+
oprot.writeFieldEnd()
|
|
1869
|
+
if self.error1 is not None:
|
|
1870
|
+
oprot.writeFieldBegin('error1', TType.STRUCT, 1)
|
|
1871
|
+
self.error1.write(oprot)
|
|
1872
|
+
oprot.writeFieldEnd()
|
|
1873
|
+
if self.error2 is not None:
|
|
1874
|
+
oprot.writeFieldBegin('error2', TType.STRUCT, 2)
|
|
1875
|
+
self.error2.write(oprot)
|
|
1876
|
+
oprot.writeFieldEnd()
|
|
1877
|
+
oprot.writeFieldStop()
|
|
1878
|
+
oprot.writeStructEnd()
|
|
1879
|
+
|
|
1880
|
+
def validate(self):
|
|
1881
|
+
return
|
|
1882
|
+
|
|
1883
|
+
def __repr__(self):
|
|
1884
|
+
L = ['%s=%r' % (key, value)
|
|
1885
|
+
for key, value in self.__dict__.items()]
|
|
1886
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
1887
|
+
|
|
1888
|
+
def __eq__(self, other):
|
|
1889
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
1890
|
+
|
|
1891
|
+
def __ne__(self, other):
|
|
1892
|
+
return not (self == other)
|
|
1893
|
+
all_structs.append(dryRun_result)
|
|
1894
|
+
dryRun_result.thrift_spec = (
|
|
1895
|
+
(0, TType.STRING, 'success', 'UTF8', None, ), # 0
|
|
1896
|
+
(1, TType.STRUCT, 'error1', [QueryProcessingException, None], None, ), # 1
|
|
1897
|
+
(2, TType.STRUCT, 'error2', [AccessDeniedException, None], None, ), # 2
|
|
1898
|
+
)
|
|
1899
|
+
|
|
1900
|
+
|
|
1901
|
+
class explainAnalyze_args(object):
|
|
1902
|
+
"""
|
|
1903
|
+
Attributes:
|
|
1904
|
+
- sessionId
|
|
1905
|
+
- queryId
|
|
1906
|
+
|
|
1907
|
+
"""
|
|
1908
|
+
|
|
1909
|
+
|
|
1910
|
+
def __init__(self, sessionId=None, queryId=None,):
|
|
1911
|
+
self.sessionId = sessionId
|
|
1912
|
+
self.queryId = queryId
|
|
1913
|
+
|
|
1914
|
+
def read(self, iprot):
|
|
1915
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
1916
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
1917
|
+
return
|
|
1918
|
+
iprot.readStructBegin()
|
|
1919
|
+
while True:
|
|
1920
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
1921
|
+
if ftype == TType.STOP:
|
|
1922
|
+
break
|
|
1923
|
+
if fid == 1:
|
|
1924
|
+
if ftype == TType.STRING:
|
|
1925
|
+
self.sessionId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1926
|
+
else:
|
|
1927
|
+
iprot.skip(ftype)
|
|
1928
|
+
elif fid == 2:
|
|
1929
|
+
if ftype == TType.STRING:
|
|
1930
|
+
self.queryId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1931
|
+
else:
|
|
1932
|
+
iprot.skip(ftype)
|
|
1933
|
+
else:
|
|
1934
|
+
iprot.skip(ftype)
|
|
1935
|
+
iprot.readFieldEnd()
|
|
1936
|
+
iprot.readStructEnd()
|
|
1937
|
+
|
|
1938
|
+
def write(self, oprot):
|
|
1939
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
1940
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
1941
|
+
return
|
|
1942
|
+
oprot.writeStructBegin('explainAnalyze_args')
|
|
1943
|
+
if self.sessionId is not None:
|
|
1944
|
+
oprot.writeFieldBegin('sessionId', TType.STRING, 1)
|
|
1945
|
+
oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId)
|
|
1946
|
+
oprot.writeFieldEnd()
|
|
1947
|
+
if self.queryId is not None:
|
|
1948
|
+
oprot.writeFieldBegin('queryId', TType.STRING, 2)
|
|
1949
|
+
oprot.writeString(self.queryId.encode('utf-8') if sys.version_info[0] == 2 else self.queryId)
|
|
1950
|
+
oprot.writeFieldEnd()
|
|
1951
|
+
oprot.writeFieldStop()
|
|
1952
|
+
oprot.writeStructEnd()
|
|
1953
|
+
|
|
1954
|
+
def validate(self):
|
|
1955
|
+
return
|
|
1956
|
+
|
|
1957
|
+
def __repr__(self):
|
|
1958
|
+
L = ['%s=%r' % (key, value)
|
|
1959
|
+
for key, value in self.__dict__.items()]
|
|
1960
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
1961
|
+
|
|
1962
|
+
def __eq__(self, other):
|
|
1963
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
1964
|
+
|
|
1965
|
+
def __ne__(self, other):
|
|
1966
|
+
return not (self == other)
|
|
1967
|
+
all_structs.append(explainAnalyze_args)
|
|
1968
|
+
explainAnalyze_args.thrift_spec = (
|
|
1969
|
+
None, # 0
|
|
1970
|
+
(1, TType.STRING, 'sessionId', 'UTF8', None, ), # 1
|
|
1971
|
+
(2, TType.STRING, 'queryId', 'UTF8', None, ), # 2
|
|
1972
|
+
)
|
|
1973
|
+
|
|
1974
|
+
|
|
1975
|
+
class explainAnalyze_result(object):
|
|
1976
|
+
"""
|
|
1977
|
+
Attributes:
|
|
1978
|
+
- success
|
|
1979
|
+
- error1
|
|
1980
|
+
- error2
|
|
1981
|
+
|
|
1982
|
+
"""
|
|
1983
|
+
|
|
1984
|
+
|
|
1985
|
+
def __init__(self, success=None, error1=None, error2=None,):
|
|
1986
|
+
self.success = success
|
|
1987
|
+
self.error1 = error1
|
|
1988
|
+
self.error2 = error2
|
|
1989
|
+
|
|
1990
|
+
def read(self, iprot):
|
|
1991
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
1992
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
1993
|
+
return
|
|
1994
|
+
iprot.readStructBegin()
|
|
1995
|
+
while True:
|
|
1996
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
1997
|
+
if ftype == TType.STOP:
|
|
1998
|
+
break
|
|
1999
|
+
if fid == 0:
|
|
2000
|
+
if ftype == TType.STRING:
|
|
2001
|
+
self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2002
|
+
else:
|
|
2003
|
+
iprot.skip(ftype)
|
|
2004
|
+
elif fid == 1:
|
|
2005
|
+
if ftype == TType.STRUCT:
|
|
2006
|
+
self.error1 = QueryProcessingException.read(iprot)
|
|
2007
|
+
else:
|
|
2008
|
+
iprot.skip(ftype)
|
|
2009
|
+
elif fid == 2:
|
|
2010
|
+
if ftype == TType.STRUCT:
|
|
2011
|
+
self.error2 = AccessDeniedException.read(iprot)
|
|
2012
|
+
else:
|
|
2013
|
+
iprot.skip(ftype)
|
|
2014
|
+
else:
|
|
2015
|
+
iprot.skip(ftype)
|
|
2016
|
+
iprot.readFieldEnd()
|
|
2017
|
+
iprot.readStructEnd()
|
|
2018
|
+
|
|
2019
|
+
def write(self, oprot):
|
|
2020
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
2021
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
2022
|
+
return
|
|
2023
|
+
oprot.writeStructBegin('explainAnalyze_result')
|
|
2024
|
+
if self.success is not None:
|
|
2025
|
+
oprot.writeFieldBegin('success', TType.STRING, 0)
|
|
2026
|
+
oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success)
|
|
2027
|
+
oprot.writeFieldEnd()
|
|
2028
|
+
if self.error1 is not None:
|
|
2029
|
+
oprot.writeFieldBegin('error1', TType.STRUCT, 1)
|
|
2030
|
+
self.error1.write(oprot)
|
|
2031
|
+
oprot.writeFieldEnd()
|
|
2032
|
+
if self.error2 is not None:
|
|
2033
|
+
oprot.writeFieldBegin('error2', TType.STRUCT, 2)
|
|
2034
|
+
self.error2.write(oprot)
|
|
2035
|
+
oprot.writeFieldEnd()
|
|
2036
|
+
oprot.writeFieldStop()
|
|
2037
|
+
oprot.writeStructEnd()
|
|
2038
|
+
|
|
2039
|
+
def validate(self):
|
|
2040
|
+
return
|
|
2041
|
+
|
|
2042
|
+
def __repr__(self):
|
|
2043
|
+
L = ['%s=%r' % (key, value)
|
|
2044
|
+
for key, value in self.__dict__.items()]
|
|
2045
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
2046
|
+
|
|
2047
|
+
def __eq__(self, other):
|
|
2048
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
2049
|
+
|
|
2050
|
+
def __ne__(self, other):
|
|
2051
|
+
return not (self == other)
|
|
2052
|
+
all_structs.append(explainAnalyze_result)
|
|
2053
|
+
explainAnalyze_result.thrift_spec = (
|
|
2054
|
+
(0, TType.STRING, 'success', 'UTF8', None, ), # 0
|
|
2055
|
+
(1, TType.STRUCT, 'error1', [QueryProcessingException, None], None, ), # 1
|
|
2056
|
+
(2, TType.STRUCT, 'error2', [AccessDeniedException, None], None, ), # 2
|
|
2057
|
+
)
|
|
2058
|
+
|
|
2059
|
+
|
|
2060
|
+
class prepareStatement_args(object):
|
|
2061
|
+
"""
|
|
2062
|
+
Attributes:
|
|
2063
|
+
- sessionId
|
|
2064
|
+
- sSchemaName
|
|
2065
|
+
- query
|
|
2066
|
+
|
|
2067
|
+
"""
|
|
2068
|
+
|
|
2069
|
+
|
|
2070
|
+
def __init__(self, sessionId=None, sSchemaName=None, query=None,):
|
|
2071
|
+
self.sessionId = sessionId
|
|
2072
|
+
self.sSchemaName = sSchemaName
|
|
2073
|
+
self.query = query
|
|
2074
|
+
|
|
2075
|
+
def read(self, iprot):
|
|
2076
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
2077
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
2078
|
+
return
|
|
2079
|
+
iprot.readStructBegin()
|
|
2080
|
+
while True:
|
|
2081
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
2082
|
+
if ftype == TType.STOP:
|
|
2083
|
+
break
|
|
2084
|
+
if fid == 1:
|
|
2085
|
+
if ftype == TType.STRING:
|
|
2086
|
+
self.sessionId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2087
|
+
else:
|
|
2088
|
+
iprot.skip(ftype)
|
|
2089
|
+
elif fid == 2:
|
|
2090
|
+
if ftype == TType.STRING:
|
|
2091
|
+
self.sSchemaName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2092
|
+
else:
|
|
2093
|
+
iprot.skip(ftype)
|
|
2094
|
+
elif fid == 3:
|
|
2095
|
+
if ftype == TType.STRING:
|
|
2096
|
+
self.query = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2097
|
+
else:
|
|
2098
|
+
iprot.skip(ftype)
|
|
2099
|
+
else:
|
|
2100
|
+
iprot.skip(ftype)
|
|
2101
|
+
iprot.readFieldEnd()
|
|
2102
|
+
iprot.readStructEnd()
|
|
2103
|
+
|
|
2104
|
+
def write(self, oprot):
|
|
2105
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
2106
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
2107
|
+
return
|
|
2108
|
+
oprot.writeStructBegin('prepareStatement_args')
|
|
2109
|
+
if self.sessionId is not None:
|
|
2110
|
+
oprot.writeFieldBegin('sessionId', TType.STRING, 1)
|
|
2111
|
+
oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId)
|
|
2112
|
+
oprot.writeFieldEnd()
|
|
2113
|
+
if self.sSchemaName is not None:
|
|
2114
|
+
oprot.writeFieldBegin('sSchemaName', TType.STRING, 2)
|
|
2115
|
+
oprot.writeString(self.sSchemaName.encode('utf-8') if sys.version_info[0] == 2 else self.sSchemaName)
|
|
2116
|
+
oprot.writeFieldEnd()
|
|
2117
|
+
if self.query is not None:
|
|
2118
|
+
oprot.writeFieldBegin('query', TType.STRING, 3)
|
|
2119
|
+
oprot.writeString(self.query.encode('utf-8') if sys.version_info[0] == 2 else self.query)
|
|
2120
|
+
oprot.writeFieldEnd()
|
|
2121
|
+
oprot.writeFieldStop()
|
|
2122
|
+
oprot.writeStructEnd()
|
|
2123
|
+
|
|
2124
|
+
def validate(self):
|
|
2125
|
+
return
|
|
2126
|
+
|
|
2127
|
+
def __repr__(self):
|
|
2128
|
+
L = ['%s=%r' % (key, value)
|
|
2129
|
+
for key, value in self.__dict__.items()]
|
|
2130
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
2131
|
+
|
|
2132
|
+
def __eq__(self, other):
|
|
2133
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
2134
|
+
|
|
2135
|
+
def __ne__(self, other):
|
|
2136
|
+
return not (self == other)
|
|
2137
|
+
all_structs.append(prepareStatement_args)
|
|
2138
|
+
prepareStatement_args.thrift_spec = (
|
|
2139
|
+
None, # 0
|
|
2140
|
+
(1, TType.STRING, 'sessionId', 'UTF8', None, ), # 1
|
|
2141
|
+
(2, TType.STRING, 'sSchemaName', 'UTF8', None, ), # 2
|
|
2142
|
+
(3, TType.STRING, 'query', 'UTF8', None, ), # 3
|
|
2143
|
+
)
|
|
2144
|
+
|
|
2145
|
+
|
|
2146
|
+
class prepareStatement_result(object):
|
|
2147
|
+
"""
|
|
2148
|
+
Attributes:
|
|
2149
|
+
- success
|
|
2150
|
+
- error1
|
|
2151
|
+
- error2
|
|
2152
|
+
|
|
2153
|
+
"""
|
|
2154
|
+
|
|
2155
|
+
|
|
2156
|
+
def __init__(self, success=None, error1=None, error2=None,):
|
|
2157
|
+
self.success = success
|
|
2158
|
+
self.error1 = error1
|
|
2159
|
+
self.error2 = error2
|
|
2160
|
+
|
|
2161
|
+
def read(self, iprot):
|
|
2162
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
2163
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
2164
|
+
return
|
|
2165
|
+
iprot.readStructBegin()
|
|
2166
|
+
while True:
|
|
2167
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
2168
|
+
if ftype == TType.STOP:
|
|
2169
|
+
break
|
|
2170
|
+
if fid == 0:
|
|
2171
|
+
if ftype == TType.STRING:
|
|
2172
|
+
self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2173
|
+
else:
|
|
2174
|
+
iprot.skip(ftype)
|
|
2175
|
+
elif fid == 1:
|
|
2176
|
+
if ftype == TType.STRUCT:
|
|
2177
|
+
self.error1 = QueryProcessingException.read(iprot)
|
|
2178
|
+
else:
|
|
2179
|
+
iprot.skip(ftype)
|
|
2180
|
+
elif fid == 2:
|
|
2181
|
+
if ftype == TType.STRUCT:
|
|
2182
|
+
self.error2 = AccessDeniedException.read(iprot)
|
|
2183
|
+
else:
|
|
2184
|
+
iprot.skip(ftype)
|
|
2185
|
+
else:
|
|
2186
|
+
iprot.skip(ftype)
|
|
2187
|
+
iprot.readFieldEnd()
|
|
2188
|
+
iprot.readStructEnd()
|
|
2189
|
+
|
|
2190
|
+
def write(self, oprot):
|
|
2191
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
2192
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
2193
|
+
return
|
|
2194
|
+
oprot.writeStructBegin('prepareStatement_result')
|
|
2195
|
+
if self.success is not None:
|
|
2196
|
+
oprot.writeFieldBegin('success', TType.STRING, 0)
|
|
2197
|
+
oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success)
|
|
2198
|
+
oprot.writeFieldEnd()
|
|
2199
|
+
if self.error1 is not None:
|
|
2200
|
+
oprot.writeFieldBegin('error1', TType.STRUCT, 1)
|
|
2201
|
+
self.error1.write(oprot)
|
|
2202
|
+
oprot.writeFieldEnd()
|
|
2203
|
+
if self.error2 is not None:
|
|
2204
|
+
oprot.writeFieldBegin('error2', TType.STRUCT, 2)
|
|
2205
|
+
self.error2.write(oprot)
|
|
2206
|
+
oprot.writeFieldEnd()
|
|
2207
|
+
oprot.writeFieldStop()
|
|
2208
|
+
oprot.writeStructEnd()
|
|
2209
|
+
|
|
2210
|
+
def validate(self):
|
|
2211
|
+
return
|
|
2212
|
+
|
|
2213
|
+
def __repr__(self):
|
|
2214
|
+
L = ['%s=%r' % (key, value)
|
|
2215
|
+
for key, value in self.__dict__.items()]
|
|
2216
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
2217
|
+
|
|
2218
|
+
def __eq__(self, other):
|
|
2219
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
2220
|
+
|
|
2221
|
+
def __ne__(self, other):
|
|
2222
|
+
return not (self == other)
|
|
2223
|
+
all_structs.append(prepareStatement_result)
|
|
2224
|
+
prepareStatement_result.thrift_spec = (
|
|
2225
|
+
(0, TType.STRING, 'success', 'UTF8', None, ), # 0
|
|
2226
|
+
(1, TType.STRUCT, 'error1', [QueryProcessingException, None], None, ), # 1
|
|
2227
|
+
(2, TType.STRUCT, 'error2', [AccessDeniedException, None], None, ), # 2
|
|
2228
|
+
)
|
|
2229
|
+
|
|
2230
|
+
|
|
2231
|
+
class executeStatement_args(object):
|
|
2232
|
+
"""
|
|
2233
|
+
Attributes:
|
|
2234
|
+
- sessionId
|
|
2235
|
+
- queryId
|
|
2236
|
+
|
|
2237
|
+
"""
|
|
2238
|
+
|
|
2239
|
+
|
|
2240
|
+
def __init__(self, sessionId=None, queryId=None,):
|
|
2241
|
+
self.sessionId = sessionId
|
|
2242
|
+
self.queryId = queryId
|
|
2243
|
+
|
|
2244
|
+
def read(self, iprot):
|
|
2245
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
2246
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
2247
|
+
return
|
|
2248
|
+
iprot.readStructBegin()
|
|
2249
|
+
while True:
|
|
2250
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
2251
|
+
if ftype == TType.STOP:
|
|
2252
|
+
break
|
|
2253
|
+
if fid == 1:
|
|
2254
|
+
if ftype == TType.STRING:
|
|
2255
|
+
self.sessionId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2256
|
+
else:
|
|
2257
|
+
iprot.skip(ftype)
|
|
2258
|
+
elif fid == 2:
|
|
2259
|
+
if ftype == TType.STRING:
|
|
2260
|
+
self.queryId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2261
|
+
else:
|
|
2262
|
+
iprot.skip(ftype)
|
|
2263
|
+
else:
|
|
2264
|
+
iprot.skip(ftype)
|
|
2265
|
+
iprot.readFieldEnd()
|
|
2266
|
+
iprot.readStructEnd()
|
|
2267
|
+
|
|
2268
|
+
def write(self, oprot):
|
|
2269
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
2270
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
2271
|
+
return
|
|
2272
|
+
oprot.writeStructBegin('executeStatement_args')
|
|
2273
|
+
if self.sessionId is not None:
|
|
2274
|
+
oprot.writeFieldBegin('sessionId', TType.STRING, 1)
|
|
2275
|
+
oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId)
|
|
2276
|
+
oprot.writeFieldEnd()
|
|
2277
|
+
if self.queryId is not None:
|
|
2278
|
+
oprot.writeFieldBegin('queryId', TType.STRING, 2)
|
|
2279
|
+
oprot.writeString(self.queryId.encode('utf-8') if sys.version_info[0] == 2 else self.queryId)
|
|
2280
|
+
oprot.writeFieldEnd()
|
|
2281
|
+
oprot.writeFieldStop()
|
|
2282
|
+
oprot.writeStructEnd()
|
|
2283
|
+
|
|
2284
|
+
def validate(self):
|
|
2285
|
+
return
|
|
2286
|
+
|
|
2287
|
+
def __repr__(self):
|
|
2288
|
+
L = ['%s=%r' % (key, value)
|
|
2289
|
+
for key, value in self.__dict__.items()]
|
|
2290
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
2291
|
+
|
|
2292
|
+
def __eq__(self, other):
|
|
2293
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
2294
|
+
|
|
2295
|
+
def __ne__(self, other):
|
|
2296
|
+
return not (self == other)
|
|
2297
|
+
all_structs.append(executeStatement_args)
|
|
2298
|
+
executeStatement_args.thrift_spec = (
|
|
2299
|
+
None, # 0
|
|
2300
|
+
(1, TType.STRING, 'sessionId', 'UTF8', None, ), # 1
|
|
2301
|
+
(2, TType.STRING, 'queryId', 'UTF8', None, ), # 2
|
|
2302
|
+
)
|
|
2303
|
+
|
|
2304
|
+
|
|
2305
|
+
class executeStatement_result(object):
|
|
2306
|
+
"""
|
|
2307
|
+
Attributes:
|
|
2308
|
+
- error1
|
|
2309
|
+
- error2
|
|
2310
|
+
|
|
2311
|
+
"""
|
|
2312
|
+
|
|
2313
|
+
|
|
2314
|
+
def __init__(self, error1=None, error2=None,):
|
|
2315
|
+
self.error1 = error1
|
|
2316
|
+
self.error2 = error2
|
|
2317
|
+
|
|
2318
|
+
def read(self, iprot):
|
|
2319
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
2320
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
2321
|
+
return
|
|
2322
|
+
iprot.readStructBegin()
|
|
2323
|
+
while True:
|
|
2324
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
2325
|
+
if ftype == TType.STOP:
|
|
2326
|
+
break
|
|
2327
|
+
if fid == 1:
|
|
2328
|
+
if ftype == TType.STRUCT:
|
|
2329
|
+
self.error1 = QueryProcessingException.read(iprot)
|
|
2330
|
+
else:
|
|
2331
|
+
iprot.skip(ftype)
|
|
2332
|
+
elif fid == 2:
|
|
2333
|
+
if ftype == TType.STRUCT:
|
|
2334
|
+
self.error2 = AccessDeniedException.read(iprot)
|
|
2335
|
+
else:
|
|
2336
|
+
iprot.skip(ftype)
|
|
2337
|
+
else:
|
|
2338
|
+
iprot.skip(ftype)
|
|
2339
|
+
iprot.readFieldEnd()
|
|
2340
|
+
iprot.readStructEnd()
|
|
2341
|
+
|
|
2342
|
+
def write(self, oprot):
|
|
2343
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
2344
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
2345
|
+
return
|
|
2346
|
+
oprot.writeStructBegin('executeStatement_result')
|
|
2347
|
+
if self.error1 is not None:
|
|
2348
|
+
oprot.writeFieldBegin('error1', TType.STRUCT, 1)
|
|
2349
|
+
self.error1.write(oprot)
|
|
2350
|
+
oprot.writeFieldEnd()
|
|
2351
|
+
if self.error2 is not None:
|
|
2352
|
+
oprot.writeFieldBegin('error2', TType.STRUCT, 2)
|
|
2353
|
+
self.error2.write(oprot)
|
|
2354
|
+
oprot.writeFieldEnd()
|
|
2355
|
+
oprot.writeFieldStop()
|
|
2356
|
+
oprot.writeStructEnd()
|
|
2357
|
+
|
|
2358
|
+
def validate(self):
|
|
2359
|
+
return
|
|
2360
|
+
|
|
2361
|
+
def __repr__(self):
|
|
2362
|
+
L = ['%s=%r' % (key, value)
|
|
2363
|
+
for key, value in self.__dict__.items()]
|
|
2364
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
2365
|
+
|
|
2366
|
+
def __eq__(self, other):
|
|
2367
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
2368
|
+
|
|
2369
|
+
def __ne__(self, other):
|
|
2370
|
+
return not (self == other)
|
|
2371
|
+
all_structs.append(executeStatement_result)
|
|
2372
|
+
executeStatement_result.thrift_spec = (
|
|
2373
|
+
None, # 0
|
|
2374
|
+
(1, TType.STRUCT, 'error1', [QueryProcessingException, None], None, ), # 1
|
|
2375
|
+
(2, TType.STRUCT, 'error2', [AccessDeniedException, None], None, ), # 2
|
|
2376
|
+
)
|
|
2377
|
+
|
|
2378
|
+
|
|
2379
|
+
class getNextResultRow_args(object):
|
|
2380
|
+
"""
|
|
2381
|
+
Attributes:
|
|
2382
|
+
- sessionId
|
|
2383
|
+
- queryId
|
|
2384
|
+
|
|
2385
|
+
"""
|
|
2386
|
+
|
|
2387
|
+
|
|
2388
|
+
def __init__(self, sessionId=None, queryId=None,):
|
|
2389
|
+
self.sessionId = sessionId
|
|
2390
|
+
self.queryId = queryId
|
|
2391
|
+
|
|
2392
|
+
def read(self, iprot):
|
|
2393
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
2394
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
2395
|
+
return
|
|
2396
|
+
iprot.readStructBegin()
|
|
2397
|
+
while True:
|
|
2398
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
2399
|
+
if ftype == TType.STOP:
|
|
2400
|
+
break
|
|
2401
|
+
if fid == 1:
|
|
2402
|
+
if ftype == TType.STRING:
|
|
2403
|
+
self.sessionId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2404
|
+
else:
|
|
2405
|
+
iprot.skip(ftype)
|
|
2406
|
+
elif fid == 2:
|
|
2407
|
+
if ftype == TType.STRING:
|
|
2408
|
+
self.queryId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2409
|
+
else:
|
|
2410
|
+
iprot.skip(ftype)
|
|
2411
|
+
else:
|
|
2412
|
+
iprot.skip(ftype)
|
|
2413
|
+
iprot.readFieldEnd()
|
|
2414
|
+
iprot.readStructEnd()
|
|
2415
|
+
|
|
2416
|
+
def write(self, oprot):
|
|
2417
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
2418
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
2419
|
+
return
|
|
2420
|
+
oprot.writeStructBegin('getNextResultRow_args')
|
|
2421
|
+
if self.sessionId is not None:
|
|
2422
|
+
oprot.writeFieldBegin('sessionId', TType.STRING, 1)
|
|
2423
|
+
oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId)
|
|
2424
|
+
oprot.writeFieldEnd()
|
|
2425
|
+
if self.queryId is not None:
|
|
2426
|
+
oprot.writeFieldBegin('queryId', TType.STRING, 2)
|
|
2427
|
+
oprot.writeString(self.queryId.encode('utf-8') if sys.version_info[0] == 2 else self.queryId)
|
|
2428
|
+
oprot.writeFieldEnd()
|
|
2429
|
+
oprot.writeFieldStop()
|
|
2430
|
+
oprot.writeStructEnd()
|
|
2431
|
+
|
|
2432
|
+
def validate(self):
|
|
2433
|
+
return
|
|
2434
|
+
|
|
2435
|
+
def __repr__(self):
|
|
2436
|
+
L = ['%s=%r' % (key, value)
|
|
2437
|
+
for key, value in self.__dict__.items()]
|
|
2438
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
2439
|
+
|
|
2440
|
+
def __eq__(self, other):
|
|
2441
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
2442
|
+
|
|
2443
|
+
def __ne__(self, other):
|
|
2444
|
+
return not (self == other)
|
|
2445
|
+
all_structs.append(getNextResultRow_args)
|
|
2446
|
+
getNextResultRow_args.thrift_spec = (
|
|
2447
|
+
None, # 0
|
|
2448
|
+
(1, TType.STRING, 'sessionId', 'UTF8', None, ), # 1
|
|
2449
|
+
(2, TType.STRING, 'queryId', 'UTF8', None, ), # 2
|
|
2450
|
+
)
|
|
2451
|
+
|
|
2452
|
+
|
|
2453
|
+
class getNextResultRow_result(object):
|
|
2454
|
+
"""
|
|
2455
|
+
Attributes:
|
|
2456
|
+
- success
|
|
2457
|
+
- error1
|
|
2458
|
+
- error2
|
|
2459
|
+
|
|
2460
|
+
"""
|
|
2461
|
+
|
|
2462
|
+
|
|
2463
|
+
def __init__(self, success=None, error1=None, error2=None,):
|
|
2464
|
+
self.success = success
|
|
2465
|
+
self.error1 = error1
|
|
2466
|
+
self.error2 = error2
|
|
2467
|
+
|
|
2468
|
+
def read(self, iprot):
|
|
2469
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
2470
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
2471
|
+
return
|
|
2472
|
+
iprot.readStructBegin()
|
|
2473
|
+
while True:
|
|
2474
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
2475
|
+
if ftype == TType.STOP:
|
|
2476
|
+
break
|
|
2477
|
+
if fid == 0:
|
|
2478
|
+
if ftype == TType.STRING:
|
|
2479
|
+
self.success = iprot.readBinary()
|
|
2480
|
+
else:
|
|
2481
|
+
iprot.skip(ftype)
|
|
2482
|
+
elif fid == 1:
|
|
2483
|
+
if ftype == TType.STRUCT:
|
|
2484
|
+
self.error1 = QueryProcessingException.read(iprot)
|
|
2485
|
+
else:
|
|
2486
|
+
iprot.skip(ftype)
|
|
2487
|
+
elif fid == 2:
|
|
2488
|
+
if ftype == TType.STRUCT:
|
|
2489
|
+
self.error2 = AccessDeniedException.read(iprot)
|
|
2490
|
+
else:
|
|
2491
|
+
iprot.skip(ftype)
|
|
2492
|
+
else:
|
|
2493
|
+
iprot.skip(ftype)
|
|
2494
|
+
iprot.readFieldEnd()
|
|
2495
|
+
iprot.readStructEnd()
|
|
2496
|
+
|
|
2497
|
+
def write(self, oprot):
|
|
2498
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
2499
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
2500
|
+
return
|
|
2501
|
+
oprot.writeStructBegin('getNextResultRow_result')
|
|
2502
|
+
if self.success is not None:
|
|
2503
|
+
oprot.writeFieldBegin('success', TType.STRING, 0)
|
|
2504
|
+
oprot.writeBinary(self.success)
|
|
2505
|
+
oprot.writeFieldEnd()
|
|
2506
|
+
if self.error1 is not None:
|
|
2507
|
+
oprot.writeFieldBegin('error1', TType.STRUCT, 1)
|
|
2508
|
+
self.error1.write(oprot)
|
|
2509
|
+
oprot.writeFieldEnd()
|
|
2510
|
+
if self.error2 is not None:
|
|
2511
|
+
oprot.writeFieldBegin('error2', TType.STRUCT, 2)
|
|
2512
|
+
self.error2.write(oprot)
|
|
2513
|
+
oprot.writeFieldEnd()
|
|
2514
|
+
oprot.writeFieldStop()
|
|
2515
|
+
oprot.writeStructEnd()
|
|
2516
|
+
|
|
2517
|
+
def validate(self):
|
|
2518
|
+
return
|
|
2519
|
+
|
|
2520
|
+
def __repr__(self):
|
|
2521
|
+
L = ['%s=%r' % (key, value)
|
|
2522
|
+
for key, value in self.__dict__.items()]
|
|
2523
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
2524
|
+
|
|
2525
|
+
def __eq__(self, other):
|
|
2526
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
2527
|
+
|
|
2528
|
+
def __ne__(self, other):
|
|
2529
|
+
return not (self == other)
|
|
2530
|
+
all_structs.append(getNextResultRow_result)
|
|
2531
|
+
getNextResultRow_result.thrift_spec = (
|
|
2532
|
+
(0, TType.STRING, 'success', 'BINARY', None, ), # 0
|
|
2533
|
+
(1, TType.STRUCT, 'error1', [QueryProcessingException, None], None, ), # 1
|
|
2534
|
+
(2, TType.STRUCT, 'error2', [AccessDeniedException, None], None, ), # 2
|
|
2535
|
+
)
|
|
2536
|
+
|
|
2537
|
+
|
|
2538
|
+
class getNextResultBatch_args(object):
|
|
2539
|
+
"""
|
|
2540
|
+
Attributes:
|
|
2541
|
+
- sessionId
|
|
2542
|
+
- queryId
|
|
2543
|
+
|
|
2544
|
+
"""
|
|
2545
|
+
|
|
2546
|
+
|
|
2547
|
+
def __init__(self, sessionId=None, queryId=None,):
|
|
2548
|
+
self.sessionId = sessionId
|
|
2549
|
+
self.queryId = queryId
|
|
2550
|
+
|
|
2551
|
+
def read(self, iprot):
|
|
2552
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
2553
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
2554
|
+
return
|
|
2555
|
+
iprot.readStructBegin()
|
|
2556
|
+
while True:
|
|
2557
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
2558
|
+
if ftype == TType.STOP:
|
|
2559
|
+
break
|
|
2560
|
+
if fid == 1:
|
|
2561
|
+
if ftype == TType.STRING:
|
|
2562
|
+
self.sessionId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2563
|
+
else:
|
|
2564
|
+
iprot.skip(ftype)
|
|
2565
|
+
elif fid == 2:
|
|
2566
|
+
if ftype == TType.STRING:
|
|
2567
|
+
self.queryId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2568
|
+
else:
|
|
2569
|
+
iprot.skip(ftype)
|
|
2570
|
+
else:
|
|
2571
|
+
iprot.skip(ftype)
|
|
2572
|
+
iprot.readFieldEnd()
|
|
2573
|
+
iprot.readStructEnd()
|
|
2574
|
+
|
|
2575
|
+
def write(self, oprot):
|
|
2576
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
2577
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
2578
|
+
return
|
|
2579
|
+
oprot.writeStructBegin('getNextResultBatch_args')
|
|
2580
|
+
if self.sessionId is not None:
|
|
2581
|
+
oprot.writeFieldBegin('sessionId', TType.STRING, 1)
|
|
2582
|
+
oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId)
|
|
2583
|
+
oprot.writeFieldEnd()
|
|
2584
|
+
if self.queryId is not None:
|
|
2585
|
+
oprot.writeFieldBegin('queryId', TType.STRING, 2)
|
|
2586
|
+
oprot.writeString(self.queryId.encode('utf-8') if sys.version_info[0] == 2 else self.queryId)
|
|
2587
|
+
oprot.writeFieldEnd()
|
|
2588
|
+
oprot.writeFieldStop()
|
|
2589
|
+
oprot.writeStructEnd()
|
|
2590
|
+
|
|
2591
|
+
def validate(self):
|
|
2592
|
+
return
|
|
2593
|
+
|
|
2594
|
+
def __repr__(self):
|
|
2595
|
+
L = ['%s=%r' % (key, value)
|
|
2596
|
+
for key, value in self.__dict__.items()]
|
|
2597
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
2598
|
+
|
|
2599
|
+
def __eq__(self, other):
|
|
2600
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
2601
|
+
|
|
2602
|
+
def __ne__(self, other):
|
|
2603
|
+
return not (self == other)
|
|
2604
|
+
all_structs.append(getNextResultBatch_args)
|
|
2605
|
+
getNextResultBatch_args.thrift_spec = (
|
|
2606
|
+
None, # 0
|
|
2607
|
+
(1, TType.STRING, 'sessionId', 'UTF8', None, ), # 1
|
|
2608
|
+
(2, TType.STRING, 'queryId', 'UTF8', None, ), # 2
|
|
2609
|
+
)
|
|
2610
|
+
|
|
2611
|
+
|
|
2612
|
+
class getNextResultBatch_result(object):
|
|
2613
|
+
"""
|
|
2614
|
+
Attributes:
|
|
2615
|
+
- success
|
|
2616
|
+
- error1
|
|
2617
|
+
- error2
|
|
2618
|
+
|
|
2619
|
+
"""
|
|
2620
|
+
|
|
2621
|
+
|
|
2622
|
+
def __init__(self, success=None, error1=None, error2=None,):
|
|
2623
|
+
self.success = success
|
|
2624
|
+
self.error1 = error1
|
|
2625
|
+
self.error2 = error2
|
|
2626
|
+
|
|
2627
|
+
def read(self, iprot):
|
|
2628
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
2629
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
2630
|
+
return
|
|
2631
|
+
iprot.readStructBegin()
|
|
2632
|
+
while True:
|
|
2633
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
2634
|
+
if ftype == TType.STOP:
|
|
2635
|
+
break
|
|
2636
|
+
if fid == 0:
|
|
2637
|
+
if ftype == TType.STRING:
|
|
2638
|
+
self.success = iprot.readBinary()
|
|
2639
|
+
else:
|
|
2640
|
+
iprot.skip(ftype)
|
|
2641
|
+
elif fid == 1:
|
|
2642
|
+
if ftype == TType.STRUCT:
|
|
2643
|
+
self.error1 = QueryProcessingException.read(iprot)
|
|
2644
|
+
else:
|
|
2645
|
+
iprot.skip(ftype)
|
|
2646
|
+
elif fid == 2:
|
|
2647
|
+
if ftype == TType.STRUCT:
|
|
2648
|
+
self.error2 = AccessDeniedException.read(iprot)
|
|
2649
|
+
else:
|
|
2650
|
+
iprot.skip(ftype)
|
|
2651
|
+
else:
|
|
2652
|
+
iprot.skip(ftype)
|
|
2653
|
+
iprot.readFieldEnd()
|
|
2654
|
+
iprot.readStructEnd()
|
|
2655
|
+
|
|
2656
|
+
def write(self, oprot):
|
|
2657
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
2658
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
2659
|
+
return
|
|
2660
|
+
oprot.writeStructBegin('getNextResultBatch_result')
|
|
2661
|
+
if self.success is not None:
|
|
2662
|
+
oprot.writeFieldBegin('success', TType.STRING, 0)
|
|
2663
|
+
oprot.writeBinary(self.success)
|
|
2664
|
+
oprot.writeFieldEnd()
|
|
2665
|
+
if self.error1 is not None:
|
|
2666
|
+
oprot.writeFieldBegin('error1', TType.STRUCT, 1)
|
|
2667
|
+
self.error1.write(oprot)
|
|
2668
|
+
oprot.writeFieldEnd()
|
|
2669
|
+
if self.error2 is not None:
|
|
2670
|
+
oprot.writeFieldBegin('error2', TType.STRUCT, 2)
|
|
2671
|
+
self.error2.write(oprot)
|
|
2672
|
+
oprot.writeFieldEnd()
|
|
2673
|
+
oprot.writeFieldStop()
|
|
2674
|
+
oprot.writeStructEnd()
|
|
2675
|
+
|
|
2676
|
+
def validate(self):
|
|
2677
|
+
return
|
|
2678
|
+
|
|
2679
|
+
def __repr__(self):
|
|
2680
|
+
L = ['%s=%r' % (key, value)
|
|
2681
|
+
for key, value in self.__dict__.items()]
|
|
2682
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
2683
|
+
|
|
2684
|
+
def __eq__(self, other):
|
|
2685
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
2686
|
+
|
|
2687
|
+
def __ne__(self, other):
|
|
2688
|
+
return not (self == other)
|
|
2689
|
+
all_structs.append(getNextResultBatch_result)
|
|
2690
|
+
getNextResultBatch_result.thrift_spec = (
|
|
2691
|
+
(0, TType.STRING, 'success', 'BINARY', None, ), # 0
|
|
2692
|
+
(1, TType.STRUCT, 'error1', [QueryProcessingException, None], None, ), # 1
|
|
2693
|
+
(2, TType.STRUCT, 'error2', [AccessDeniedException, None], None, ), # 2
|
|
2694
|
+
)
|
|
2695
|
+
|
|
2696
|
+
|
|
2697
|
+
class getResultMetadata_args(object):
|
|
2698
|
+
"""
|
|
2699
|
+
Attributes:
|
|
2700
|
+
- sessionId
|
|
2701
|
+
- queryId
|
|
2702
|
+
|
|
2703
|
+
"""
|
|
2704
|
+
|
|
2705
|
+
|
|
2706
|
+
def __init__(self, sessionId=None, queryId=None,):
|
|
2707
|
+
self.sessionId = sessionId
|
|
2708
|
+
self.queryId = queryId
|
|
2709
|
+
|
|
2710
|
+
def read(self, iprot):
|
|
2711
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
2712
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
2713
|
+
return
|
|
2714
|
+
iprot.readStructBegin()
|
|
2715
|
+
while True:
|
|
2716
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
2717
|
+
if ftype == TType.STOP:
|
|
2718
|
+
break
|
|
2719
|
+
if fid == 1:
|
|
2720
|
+
if ftype == TType.STRING:
|
|
2721
|
+
self.sessionId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2722
|
+
else:
|
|
2723
|
+
iprot.skip(ftype)
|
|
2724
|
+
elif fid == 2:
|
|
2725
|
+
if ftype == TType.STRING:
|
|
2726
|
+
self.queryId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2727
|
+
else:
|
|
2728
|
+
iprot.skip(ftype)
|
|
2729
|
+
else:
|
|
2730
|
+
iprot.skip(ftype)
|
|
2731
|
+
iprot.readFieldEnd()
|
|
2732
|
+
iprot.readStructEnd()
|
|
2733
|
+
|
|
2734
|
+
def write(self, oprot):
|
|
2735
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
2736
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
2737
|
+
return
|
|
2738
|
+
oprot.writeStructBegin('getResultMetadata_args')
|
|
2739
|
+
if self.sessionId is not None:
|
|
2740
|
+
oprot.writeFieldBegin('sessionId', TType.STRING, 1)
|
|
2741
|
+
oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId)
|
|
2742
|
+
oprot.writeFieldEnd()
|
|
2743
|
+
if self.queryId is not None:
|
|
2744
|
+
oprot.writeFieldBegin('queryId', TType.STRING, 2)
|
|
2745
|
+
oprot.writeString(self.queryId.encode('utf-8') if sys.version_info[0] == 2 else self.queryId)
|
|
2746
|
+
oprot.writeFieldEnd()
|
|
2747
|
+
oprot.writeFieldStop()
|
|
2748
|
+
oprot.writeStructEnd()
|
|
2749
|
+
|
|
2750
|
+
def validate(self):
|
|
2751
|
+
return
|
|
2752
|
+
|
|
2753
|
+
def __repr__(self):
|
|
2754
|
+
L = ['%s=%r' % (key, value)
|
|
2755
|
+
for key, value in self.__dict__.items()]
|
|
2756
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
2757
|
+
|
|
2758
|
+
def __eq__(self, other):
|
|
2759
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
2760
|
+
|
|
2761
|
+
def __ne__(self, other):
|
|
2762
|
+
return not (self == other)
|
|
2763
|
+
all_structs.append(getResultMetadata_args)
|
|
2764
|
+
getResultMetadata_args.thrift_spec = (
|
|
2765
|
+
None, # 0
|
|
2766
|
+
(1, TType.STRING, 'sessionId', 'UTF8', None, ), # 1
|
|
2767
|
+
(2, TType.STRING, 'queryId', 'UTF8', None, ), # 2
|
|
2768
|
+
)
|
|
2769
|
+
|
|
2770
|
+
|
|
2771
|
+
class getResultMetadata_result(object):
|
|
2772
|
+
"""
|
|
2773
|
+
Attributes:
|
|
2774
|
+
- success
|
|
2775
|
+
- error1
|
|
2776
|
+
- error2
|
|
2777
|
+
|
|
2778
|
+
"""
|
|
2779
|
+
|
|
2780
|
+
|
|
2781
|
+
def __init__(self, success=None, error1=None, error2=None,):
|
|
2782
|
+
self.success = success
|
|
2783
|
+
self.error1 = error1
|
|
2784
|
+
self.error2 = error2
|
|
2785
|
+
|
|
2786
|
+
def read(self, iprot):
|
|
2787
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
2788
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
2789
|
+
return
|
|
2790
|
+
iprot.readStructBegin()
|
|
2791
|
+
while True:
|
|
2792
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
2793
|
+
if ftype == TType.STOP:
|
|
2794
|
+
break
|
|
2795
|
+
if fid == 0:
|
|
2796
|
+
if ftype == TType.STRING:
|
|
2797
|
+
self.success = iprot.readBinary()
|
|
2798
|
+
else:
|
|
2799
|
+
iprot.skip(ftype)
|
|
2800
|
+
elif fid == 1:
|
|
2801
|
+
if ftype == TType.STRUCT:
|
|
2802
|
+
self.error1 = QueryProcessingException.read(iprot)
|
|
2803
|
+
else:
|
|
2804
|
+
iprot.skip(ftype)
|
|
2805
|
+
elif fid == 2:
|
|
2806
|
+
if ftype == TType.STRUCT:
|
|
2807
|
+
self.error2 = AccessDeniedException.read(iprot)
|
|
2808
|
+
else:
|
|
2809
|
+
iprot.skip(ftype)
|
|
2810
|
+
else:
|
|
2811
|
+
iprot.skip(ftype)
|
|
2812
|
+
iprot.readFieldEnd()
|
|
2813
|
+
iprot.readStructEnd()
|
|
2814
|
+
|
|
2815
|
+
def write(self, oprot):
|
|
2816
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
2817
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
2818
|
+
return
|
|
2819
|
+
oprot.writeStructBegin('getResultMetadata_result')
|
|
2820
|
+
if self.success is not None:
|
|
2821
|
+
oprot.writeFieldBegin('success', TType.STRING, 0)
|
|
2822
|
+
oprot.writeBinary(self.success)
|
|
2823
|
+
oprot.writeFieldEnd()
|
|
2824
|
+
if self.error1 is not None:
|
|
2825
|
+
oprot.writeFieldBegin('error1', TType.STRUCT, 1)
|
|
2826
|
+
self.error1.write(oprot)
|
|
2827
|
+
oprot.writeFieldEnd()
|
|
2828
|
+
if self.error2 is not None:
|
|
2829
|
+
oprot.writeFieldBegin('error2', TType.STRUCT, 2)
|
|
2830
|
+
self.error2.write(oprot)
|
|
2831
|
+
oprot.writeFieldEnd()
|
|
2832
|
+
oprot.writeFieldStop()
|
|
2833
|
+
oprot.writeStructEnd()
|
|
2834
|
+
|
|
2835
|
+
def validate(self):
|
|
2836
|
+
return
|
|
2837
|
+
|
|
2838
|
+
def __repr__(self):
|
|
2839
|
+
L = ['%s=%r' % (key, value)
|
|
2840
|
+
for key, value in self.__dict__.items()]
|
|
2841
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
2842
|
+
|
|
2843
|
+
def __eq__(self, other):
|
|
2844
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
2845
|
+
|
|
2846
|
+
def __ne__(self, other):
|
|
2847
|
+
return not (self == other)
|
|
2848
|
+
all_structs.append(getResultMetadata_result)
|
|
2849
|
+
getResultMetadata_result.thrift_spec = (
|
|
2850
|
+
(0, TType.STRING, 'success', 'BINARY', None, ), # 0
|
|
2851
|
+
(1, TType.STRUCT, 'error1', [QueryProcessingException, None], None, ), # 1
|
|
2852
|
+
(2, TType.STRUCT, 'error2', [AccessDeniedException, None], None, ), # 2
|
|
2853
|
+
)
|
|
2854
|
+
|
|
2855
|
+
|
|
2856
|
+
class authenticate_args(object):
|
|
2857
|
+
"""
|
|
2858
|
+
Attributes:
|
|
2859
|
+
- user
|
|
2860
|
+
- password
|
|
2861
|
+
|
|
2862
|
+
"""
|
|
2863
|
+
|
|
2864
|
+
|
|
2865
|
+
def __init__(self, user=None, password=None,):
|
|
2866
|
+
self.user = user
|
|
2867
|
+
self.password = password
|
|
2868
|
+
|
|
2869
|
+
def read(self, iprot):
|
|
2870
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
2871
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
2872
|
+
return
|
|
2873
|
+
iprot.readStructBegin()
|
|
2874
|
+
while True:
|
|
2875
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
2876
|
+
if ftype == TType.STOP:
|
|
2877
|
+
break
|
|
2878
|
+
if fid == 1:
|
|
2879
|
+
if ftype == TType.STRING:
|
|
2880
|
+
self.user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2881
|
+
else:
|
|
2882
|
+
iprot.skip(ftype)
|
|
2883
|
+
elif fid == 2:
|
|
2884
|
+
if ftype == TType.STRING:
|
|
2885
|
+
self.password = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2886
|
+
else:
|
|
2887
|
+
iprot.skip(ftype)
|
|
2888
|
+
else:
|
|
2889
|
+
iprot.skip(ftype)
|
|
2890
|
+
iprot.readFieldEnd()
|
|
2891
|
+
iprot.readStructEnd()
|
|
2892
|
+
|
|
2893
|
+
def write(self, oprot):
|
|
2894
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
2895
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
2896
|
+
return
|
|
2897
|
+
oprot.writeStructBegin('authenticate_args')
|
|
2898
|
+
if self.user is not None:
|
|
2899
|
+
oprot.writeFieldBegin('user', TType.STRING, 1)
|
|
2900
|
+
oprot.writeString(self.user.encode('utf-8') if sys.version_info[0] == 2 else self.user)
|
|
2901
|
+
oprot.writeFieldEnd()
|
|
2902
|
+
if self.password is not None:
|
|
2903
|
+
oprot.writeFieldBegin('password', TType.STRING, 2)
|
|
2904
|
+
oprot.writeString(self.password.encode('utf-8') if sys.version_info[0] == 2 else self.password)
|
|
2905
|
+
oprot.writeFieldEnd()
|
|
2906
|
+
oprot.writeFieldStop()
|
|
2907
|
+
oprot.writeStructEnd()
|
|
2908
|
+
|
|
2909
|
+
def validate(self):
|
|
2910
|
+
return
|
|
2911
|
+
|
|
2912
|
+
def __repr__(self):
|
|
2913
|
+
L = ['%s=%r' % (key, value)
|
|
2914
|
+
for key, value in self.__dict__.items()]
|
|
2915
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
2916
|
+
|
|
2917
|
+
def __eq__(self, other):
|
|
2918
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
2919
|
+
|
|
2920
|
+
def __ne__(self, other):
|
|
2921
|
+
return not (self == other)
|
|
2922
|
+
all_structs.append(authenticate_args)
|
|
2923
|
+
authenticate_args.thrift_spec = (
|
|
2924
|
+
None, # 0
|
|
2925
|
+
(1, TType.STRING, 'user', 'UTF8', None, ), # 1
|
|
2926
|
+
(2, TType.STRING, 'password', 'UTF8', None, ), # 2
|
|
2927
|
+
)
|
|
2928
|
+
|
|
2929
|
+
|
|
2930
|
+
class authenticate_result(object):
|
|
2931
|
+
"""
|
|
2932
|
+
Attributes:
|
|
2933
|
+
- success
|
|
2934
|
+
- error
|
|
2935
|
+
|
|
2936
|
+
"""
|
|
2937
|
+
|
|
2938
|
+
|
|
2939
|
+
def __init__(self, success=None, error=None,):
|
|
2940
|
+
self.success = success
|
|
2941
|
+
self.error = error
|
|
2942
|
+
|
|
2943
|
+
def read(self, iprot):
|
|
2944
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
2945
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
2946
|
+
return
|
|
2947
|
+
iprot.readStructBegin()
|
|
2948
|
+
while True:
|
|
2949
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
2950
|
+
if ftype == TType.STOP:
|
|
2951
|
+
break
|
|
2952
|
+
if fid == 0:
|
|
2953
|
+
if ftype == TType.STRING:
|
|
2954
|
+
self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2955
|
+
else:
|
|
2956
|
+
iprot.skip(ftype)
|
|
2957
|
+
elif fid == 1:
|
|
2958
|
+
if ftype == TType.STRUCT:
|
|
2959
|
+
self.error = AccessDeniedException.read(iprot)
|
|
2960
|
+
else:
|
|
2961
|
+
iprot.skip(ftype)
|
|
2962
|
+
else:
|
|
2963
|
+
iprot.skip(ftype)
|
|
2964
|
+
iprot.readFieldEnd()
|
|
2965
|
+
iprot.readStructEnd()
|
|
2966
|
+
|
|
2967
|
+
def write(self, oprot):
|
|
2968
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
2969
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
2970
|
+
return
|
|
2971
|
+
oprot.writeStructBegin('authenticate_result')
|
|
2972
|
+
if self.success is not None:
|
|
2973
|
+
oprot.writeFieldBegin('success', TType.STRING, 0)
|
|
2974
|
+
oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success)
|
|
2975
|
+
oprot.writeFieldEnd()
|
|
2976
|
+
if self.error is not None:
|
|
2977
|
+
oprot.writeFieldBegin('error', TType.STRUCT, 1)
|
|
2978
|
+
self.error.write(oprot)
|
|
2979
|
+
oprot.writeFieldEnd()
|
|
2980
|
+
oprot.writeFieldStop()
|
|
2981
|
+
oprot.writeStructEnd()
|
|
2982
|
+
|
|
2983
|
+
def validate(self):
|
|
2984
|
+
return
|
|
2985
|
+
|
|
2986
|
+
def __repr__(self):
|
|
2987
|
+
L = ['%s=%r' % (key, value)
|
|
2988
|
+
for key, value in self.__dict__.items()]
|
|
2989
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
2990
|
+
|
|
2991
|
+
def __eq__(self, other):
|
|
2992
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
2993
|
+
|
|
2994
|
+
def __ne__(self, other):
|
|
2995
|
+
return not (self == other)
|
|
2996
|
+
all_structs.append(authenticate_result)
|
|
2997
|
+
authenticate_result.thrift_spec = (
|
|
2998
|
+
(0, TType.STRING, 'success', 'UTF8', None, ), # 0
|
|
2999
|
+
(1, TType.STRUCT, 'error', [AccessDeniedException, None], None, ), # 1
|
|
3000
|
+
)
|
|
3001
|
+
|
|
3002
|
+
|
|
3003
|
+
class getTables_args(object):
|
|
3004
|
+
"""
|
|
3005
|
+
Attributes:
|
|
3006
|
+
- sessionId
|
|
3007
|
+
- schema
|
|
3008
|
+
|
|
3009
|
+
"""
|
|
3010
|
+
|
|
3011
|
+
|
|
3012
|
+
def __init__(self, sessionId=None, schema=None,):
|
|
3013
|
+
self.sessionId = sessionId
|
|
3014
|
+
self.schema = schema
|
|
3015
|
+
|
|
3016
|
+
def read(self, iprot):
|
|
3017
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
3018
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
3019
|
+
return
|
|
3020
|
+
iprot.readStructBegin()
|
|
3021
|
+
while True:
|
|
3022
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
3023
|
+
if ftype == TType.STOP:
|
|
3024
|
+
break
|
|
3025
|
+
if fid == 1:
|
|
3026
|
+
if ftype == TType.STRING:
|
|
3027
|
+
self.sessionId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
3028
|
+
else:
|
|
3029
|
+
iprot.skip(ftype)
|
|
3030
|
+
elif fid == 2:
|
|
3031
|
+
if ftype == TType.STRING:
|
|
3032
|
+
self.schema = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
3033
|
+
else:
|
|
3034
|
+
iprot.skip(ftype)
|
|
3035
|
+
else:
|
|
3036
|
+
iprot.skip(ftype)
|
|
3037
|
+
iprot.readFieldEnd()
|
|
3038
|
+
iprot.readStructEnd()
|
|
3039
|
+
|
|
3040
|
+
def write(self, oprot):
|
|
3041
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
3042
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
3043
|
+
return
|
|
3044
|
+
oprot.writeStructBegin('getTables_args')
|
|
3045
|
+
if self.sessionId is not None:
|
|
3046
|
+
oprot.writeFieldBegin('sessionId', TType.STRING, 1)
|
|
3047
|
+
oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId)
|
|
3048
|
+
oprot.writeFieldEnd()
|
|
3049
|
+
if self.schema is not None:
|
|
3050
|
+
oprot.writeFieldBegin('schema', TType.STRING, 2)
|
|
3051
|
+
oprot.writeString(self.schema.encode('utf-8') if sys.version_info[0] == 2 else self.schema)
|
|
3052
|
+
oprot.writeFieldEnd()
|
|
3053
|
+
oprot.writeFieldStop()
|
|
3054
|
+
oprot.writeStructEnd()
|
|
3055
|
+
|
|
3056
|
+
def validate(self):
|
|
3057
|
+
return
|
|
3058
|
+
|
|
3059
|
+
def __repr__(self):
|
|
3060
|
+
L = ['%s=%r' % (key, value)
|
|
3061
|
+
for key, value in self.__dict__.items()]
|
|
3062
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
3063
|
+
|
|
3064
|
+
def __eq__(self, other):
|
|
3065
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
3066
|
+
|
|
3067
|
+
def __ne__(self, other):
|
|
3068
|
+
return not (self == other)
|
|
3069
|
+
all_structs.append(getTables_args)
|
|
3070
|
+
getTables_args.thrift_spec = (
|
|
3071
|
+
None, # 0
|
|
3072
|
+
(1, TType.STRING, 'sessionId', 'UTF8', None, ), # 1
|
|
3073
|
+
(2, TType.STRING, 'schema', 'UTF8', None, ), # 2
|
|
3074
|
+
)
|
|
3075
|
+
|
|
3076
|
+
|
|
3077
|
+
class getTables_result(object):
|
|
3078
|
+
"""
|
|
3079
|
+
Attributes:
|
|
3080
|
+
- success
|
|
3081
|
+
- error1
|
|
3082
|
+
- error2
|
|
3083
|
+
|
|
3084
|
+
"""
|
|
3085
|
+
|
|
3086
|
+
|
|
3087
|
+
def __init__(self, success=None, error1=None, error2=None,):
|
|
3088
|
+
self.success = success
|
|
3089
|
+
self.error1 = error1
|
|
3090
|
+
self.error2 = error2
|
|
3091
|
+
|
|
3092
|
+
def read(self, iprot):
|
|
3093
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
3094
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
3095
|
+
return
|
|
3096
|
+
iprot.readStructBegin()
|
|
3097
|
+
while True:
|
|
3098
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
3099
|
+
if ftype == TType.STOP:
|
|
3100
|
+
break
|
|
3101
|
+
if fid == 0:
|
|
3102
|
+
if ftype == TType.LIST:
|
|
3103
|
+
self.success = []
|
|
3104
|
+
(_etype10, _size7) = iprot.readListBegin()
|
|
3105
|
+
for _i11 in range(_size7):
|
|
3106
|
+
_elem12 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
3107
|
+
self.success.append(_elem12)
|
|
3108
|
+
iprot.readListEnd()
|
|
3109
|
+
else:
|
|
3110
|
+
iprot.skip(ftype)
|
|
3111
|
+
elif fid == 1:
|
|
3112
|
+
if ftype == TType.STRUCT:
|
|
3113
|
+
self.error1 = QueryProcessingException.read(iprot)
|
|
3114
|
+
else:
|
|
3115
|
+
iprot.skip(ftype)
|
|
3116
|
+
elif fid == 2:
|
|
3117
|
+
if ftype == TType.STRUCT:
|
|
3118
|
+
self.error2 = AccessDeniedException.read(iprot)
|
|
3119
|
+
else:
|
|
3120
|
+
iprot.skip(ftype)
|
|
3121
|
+
else:
|
|
3122
|
+
iprot.skip(ftype)
|
|
3123
|
+
iprot.readFieldEnd()
|
|
3124
|
+
iprot.readStructEnd()
|
|
3125
|
+
|
|
3126
|
+
def write(self, oprot):
|
|
3127
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
3128
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
3129
|
+
return
|
|
3130
|
+
oprot.writeStructBegin('getTables_result')
|
|
3131
|
+
if self.success is not None:
|
|
3132
|
+
oprot.writeFieldBegin('success', TType.LIST, 0)
|
|
3133
|
+
oprot.writeListBegin(TType.STRING, len(self.success))
|
|
3134
|
+
for iter13 in self.success:
|
|
3135
|
+
oprot.writeString(iter13.encode('utf-8') if sys.version_info[0] == 2 else iter13)
|
|
3136
|
+
oprot.writeListEnd()
|
|
3137
|
+
oprot.writeFieldEnd()
|
|
3138
|
+
if self.error1 is not None:
|
|
3139
|
+
oprot.writeFieldBegin('error1', TType.STRUCT, 1)
|
|
3140
|
+
self.error1.write(oprot)
|
|
3141
|
+
oprot.writeFieldEnd()
|
|
3142
|
+
if self.error2 is not None:
|
|
3143
|
+
oprot.writeFieldBegin('error2', TType.STRUCT, 2)
|
|
3144
|
+
self.error2.write(oprot)
|
|
3145
|
+
oprot.writeFieldEnd()
|
|
3146
|
+
oprot.writeFieldStop()
|
|
3147
|
+
oprot.writeStructEnd()
|
|
3148
|
+
|
|
3149
|
+
def validate(self):
|
|
3150
|
+
return
|
|
3151
|
+
|
|
3152
|
+
def __repr__(self):
|
|
3153
|
+
L = ['%s=%r' % (key, value)
|
|
3154
|
+
for key, value in self.__dict__.items()]
|
|
3155
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
3156
|
+
|
|
3157
|
+
def __eq__(self, other):
|
|
3158
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
3159
|
+
|
|
3160
|
+
def __ne__(self, other):
|
|
3161
|
+
return not (self == other)
|
|
3162
|
+
all_structs.append(getTables_result)
|
|
3163
|
+
getTables_result.thrift_spec = (
|
|
3164
|
+
(0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0
|
|
3165
|
+
(1, TType.STRUCT, 'error1', [QueryProcessingException, None], None, ), # 1
|
|
3166
|
+
(2, TType.STRUCT, 'error2', [AccessDeniedException, None], None, ), # 2
|
|
3167
|
+
)
|
|
3168
|
+
|
|
3169
|
+
|
|
3170
|
+
class getSchemaNames_args(object):
|
|
3171
|
+
"""
|
|
3172
|
+
Attributes:
|
|
3173
|
+
- sessionId
|
|
3174
|
+
|
|
3175
|
+
"""
|
|
3176
|
+
|
|
3177
|
+
|
|
3178
|
+
def __init__(self, sessionId=None,):
|
|
3179
|
+
self.sessionId = sessionId
|
|
3180
|
+
|
|
3181
|
+
def read(self, iprot):
|
|
3182
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
3183
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
3184
|
+
return
|
|
3185
|
+
iprot.readStructBegin()
|
|
3186
|
+
while True:
|
|
3187
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
3188
|
+
if ftype == TType.STOP:
|
|
3189
|
+
break
|
|
3190
|
+
if fid == 1:
|
|
3191
|
+
if ftype == TType.STRING:
|
|
3192
|
+
self.sessionId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
3193
|
+
else:
|
|
3194
|
+
iprot.skip(ftype)
|
|
3195
|
+
else:
|
|
3196
|
+
iprot.skip(ftype)
|
|
3197
|
+
iprot.readFieldEnd()
|
|
3198
|
+
iprot.readStructEnd()
|
|
3199
|
+
|
|
3200
|
+
def write(self, oprot):
|
|
3201
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
3202
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
3203
|
+
return
|
|
3204
|
+
oprot.writeStructBegin('getSchemaNames_args')
|
|
3205
|
+
if self.sessionId is not None:
|
|
3206
|
+
oprot.writeFieldBegin('sessionId', TType.STRING, 1)
|
|
3207
|
+
oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId)
|
|
3208
|
+
oprot.writeFieldEnd()
|
|
3209
|
+
oprot.writeFieldStop()
|
|
3210
|
+
oprot.writeStructEnd()
|
|
3211
|
+
|
|
3212
|
+
def validate(self):
|
|
3213
|
+
return
|
|
3214
|
+
|
|
3215
|
+
def __repr__(self):
|
|
3216
|
+
L = ['%s=%r' % (key, value)
|
|
3217
|
+
for key, value in self.__dict__.items()]
|
|
3218
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
3219
|
+
|
|
3220
|
+
def __eq__(self, other):
|
|
3221
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
3222
|
+
|
|
3223
|
+
def __ne__(self, other):
|
|
3224
|
+
return not (self == other)
|
|
3225
|
+
all_structs.append(getSchemaNames_args)
|
|
3226
|
+
getSchemaNames_args.thrift_spec = (
|
|
3227
|
+
None, # 0
|
|
3228
|
+
(1, TType.STRING, 'sessionId', 'UTF8', None, ), # 1
|
|
3229
|
+
)
|
|
3230
|
+
|
|
3231
|
+
|
|
3232
|
+
class getSchemaNames_result(object):
|
|
3233
|
+
"""
|
|
3234
|
+
Attributes:
|
|
3235
|
+
- success
|
|
3236
|
+
- error1
|
|
3237
|
+
- error2
|
|
3238
|
+
|
|
3239
|
+
"""
|
|
3240
|
+
|
|
3241
|
+
|
|
3242
|
+
def __init__(self, success=None, error1=None, error2=None,):
|
|
3243
|
+
self.success = success
|
|
3244
|
+
self.error1 = error1
|
|
3245
|
+
self.error2 = error2
|
|
3246
|
+
|
|
3247
|
+
def read(self, iprot):
|
|
3248
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
3249
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
3250
|
+
return
|
|
3251
|
+
iprot.readStructBegin()
|
|
3252
|
+
while True:
|
|
3253
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
3254
|
+
if ftype == TType.STOP:
|
|
3255
|
+
break
|
|
3256
|
+
if fid == 0:
|
|
3257
|
+
if ftype == TType.LIST:
|
|
3258
|
+
self.success = []
|
|
3259
|
+
(_etype17, _size14) = iprot.readListBegin()
|
|
3260
|
+
for _i18 in range(_size14):
|
|
3261
|
+
_elem19 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
3262
|
+
self.success.append(_elem19)
|
|
3263
|
+
iprot.readListEnd()
|
|
3264
|
+
else:
|
|
3265
|
+
iprot.skip(ftype)
|
|
3266
|
+
elif fid == 1:
|
|
3267
|
+
if ftype == TType.STRUCT:
|
|
3268
|
+
self.error1 = QueryProcessingException.read(iprot)
|
|
3269
|
+
else:
|
|
3270
|
+
iprot.skip(ftype)
|
|
3271
|
+
elif fid == 2:
|
|
3272
|
+
if ftype == TType.STRUCT:
|
|
3273
|
+
self.error2 = AccessDeniedException.read(iprot)
|
|
3274
|
+
else:
|
|
3275
|
+
iprot.skip(ftype)
|
|
3276
|
+
else:
|
|
3277
|
+
iprot.skip(ftype)
|
|
3278
|
+
iprot.readFieldEnd()
|
|
3279
|
+
iprot.readStructEnd()
|
|
3280
|
+
|
|
3281
|
+
def write(self, oprot):
|
|
3282
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
3283
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
3284
|
+
return
|
|
3285
|
+
oprot.writeStructBegin('getSchemaNames_result')
|
|
3286
|
+
if self.success is not None:
|
|
3287
|
+
oprot.writeFieldBegin('success', TType.LIST, 0)
|
|
3288
|
+
oprot.writeListBegin(TType.STRING, len(self.success))
|
|
3289
|
+
for iter20 in self.success:
|
|
3290
|
+
oprot.writeString(iter20.encode('utf-8') if sys.version_info[0] == 2 else iter20)
|
|
3291
|
+
oprot.writeListEnd()
|
|
3292
|
+
oprot.writeFieldEnd()
|
|
3293
|
+
if self.error1 is not None:
|
|
3294
|
+
oprot.writeFieldBegin('error1', TType.STRUCT, 1)
|
|
3295
|
+
self.error1.write(oprot)
|
|
3296
|
+
oprot.writeFieldEnd()
|
|
3297
|
+
if self.error2 is not None:
|
|
3298
|
+
oprot.writeFieldBegin('error2', TType.STRUCT, 2)
|
|
3299
|
+
self.error2.write(oprot)
|
|
3300
|
+
oprot.writeFieldEnd()
|
|
3301
|
+
oprot.writeFieldStop()
|
|
3302
|
+
oprot.writeStructEnd()
|
|
3303
|
+
|
|
3304
|
+
def validate(self):
|
|
3305
|
+
return
|
|
3306
|
+
|
|
3307
|
+
def __repr__(self):
|
|
3308
|
+
L = ['%s=%r' % (key, value)
|
|
3309
|
+
for key, value in self.__dict__.items()]
|
|
3310
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
3311
|
+
|
|
3312
|
+
def __eq__(self, other):
|
|
3313
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
3314
|
+
|
|
3315
|
+
def __ne__(self, other):
|
|
3316
|
+
return not (self == other)
|
|
3317
|
+
all_structs.append(getSchemaNames_result)
|
|
3318
|
+
getSchemaNames_result.thrift_spec = (
|
|
3319
|
+
(0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0
|
|
3320
|
+
(1, TType.STRUCT, 'error1', [QueryProcessingException, None], None, ), # 1
|
|
3321
|
+
(2, TType.STRUCT, 'error2', [AccessDeniedException, None], None, ), # 2
|
|
3322
|
+
)
|
|
3323
|
+
|
|
3324
|
+
|
|
3325
|
+
class getColumns_args(object):
|
|
3326
|
+
"""
|
|
3327
|
+
Attributes:
|
|
3328
|
+
- sessionId
|
|
3329
|
+
- schema
|
|
3330
|
+
- table
|
|
3331
|
+
|
|
3332
|
+
"""
|
|
3333
|
+
|
|
3334
|
+
|
|
3335
|
+
def __init__(self, sessionId=None, schema=None, table=None,):
|
|
3336
|
+
self.sessionId = sessionId
|
|
3337
|
+
self.schema = schema
|
|
3338
|
+
self.table = table
|
|
3339
|
+
|
|
3340
|
+
def read(self, iprot):
|
|
3341
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
3342
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
3343
|
+
return
|
|
3344
|
+
iprot.readStructBegin()
|
|
3345
|
+
while True:
|
|
3346
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
3347
|
+
if ftype == TType.STOP:
|
|
3348
|
+
break
|
|
3349
|
+
if fid == 1:
|
|
3350
|
+
if ftype == TType.STRING:
|
|
3351
|
+
self.sessionId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
3352
|
+
else:
|
|
3353
|
+
iprot.skip(ftype)
|
|
3354
|
+
elif fid == 2:
|
|
3355
|
+
if ftype == TType.STRING:
|
|
3356
|
+
self.schema = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
3357
|
+
else:
|
|
3358
|
+
iprot.skip(ftype)
|
|
3359
|
+
elif fid == 3:
|
|
3360
|
+
if ftype == TType.STRING:
|
|
3361
|
+
self.table = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
3362
|
+
else:
|
|
3363
|
+
iprot.skip(ftype)
|
|
3364
|
+
else:
|
|
3365
|
+
iprot.skip(ftype)
|
|
3366
|
+
iprot.readFieldEnd()
|
|
3367
|
+
iprot.readStructEnd()
|
|
3368
|
+
|
|
3369
|
+
def write(self, oprot):
|
|
3370
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
3371
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
3372
|
+
return
|
|
3373
|
+
oprot.writeStructBegin('getColumns_args')
|
|
3374
|
+
if self.sessionId is not None:
|
|
3375
|
+
oprot.writeFieldBegin('sessionId', TType.STRING, 1)
|
|
3376
|
+
oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId)
|
|
3377
|
+
oprot.writeFieldEnd()
|
|
3378
|
+
if self.schema is not None:
|
|
3379
|
+
oprot.writeFieldBegin('schema', TType.STRING, 2)
|
|
3380
|
+
oprot.writeString(self.schema.encode('utf-8') if sys.version_info[0] == 2 else self.schema)
|
|
3381
|
+
oprot.writeFieldEnd()
|
|
3382
|
+
if self.table is not None:
|
|
3383
|
+
oprot.writeFieldBegin('table', TType.STRING, 3)
|
|
3384
|
+
oprot.writeString(self.table.encode('utf-8') if sys.version_info[0] == 2 else self.table)
|
|
3385
|
+
oprot.writeFieldEnd()
|
|
3386
|
+
oprot.writeFieldStop()
|
|
3387
|
+
oprot.writeStructEnd()
|
|
3388
|
+
|
|
3389
|
+
def validate(self):
|
|
3390
|
+
return
|
|
3391
|
+
|
|
3392
|
+
def __repr__(self):
|
|
3393
|
+
L = ['%s=%r' % (key, value)
|
|
3394
|
+
for key, value in self.__dict__.items()]
|
|
3395
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
3396
|
+
|
|
3397
|
+
def __eq__(self, other):
|
|
3398
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
3399
|
+
|
|
3400
|
+
def __ne__(self, other):
|
|
3401
|
+
return not (self == other)
|
|
3402
|
+
all_structs.append(getColumns_args)
|
|
3403
|
+
getColumns_args.thrift_spec = (
|
|
3404
|
+
None, # 0
|
|
3405
|
+
(1, TType.STRING, 'sessionId', 'UTF8', None, ), # 1
|
|
3406
|
+
(2, TType.STRING, 'schema', 'UTF8', None, ), # 2
|
|
3407
|
+
(3, TType.STRING, 'table', 'UTF8', None, ), # 3
|
|
3408
|
+
)
|
|
3409
|
+
|
|
3410
|
+
|
|
3411
|
+
class getColumns_result(object):
|
|
3412
|
+
"""
|
|
3413
|
+
Attributes:
|
|
3414
|
+
- success
|
|
3415
|
+
- error1
|
|
3416
|
+
- error2
|
|
3417
|
+
|
|
3418
|
+
"""
|
|
3419
|
+
|
|
3420
|
+
|
|
3421
|
+
def __init__(self, success=None, error1=None, error2=None,):
|
|
3422
|
+
self.success = success
|
|
3423
|
+
self.error1 = error1
|
|
3424
|
+
self.error2 = error2
|
|
3425
|
+
|
|
3426
|
+
def read(self, iprot):
|
|
3427
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
3428
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
3429
|
+
return
|
|
3430
|
+
iprot.readStructBegin()
|
|
3431
|
+
while True:
|
|
3432
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
3433
|
+
if ftype == TType.STOP:
|
|
3434
|
+
break
|
|
3435
|
+
if fid == 0:
|
|
3436
|
+
if ftype == TType.LIST:
|
|
3437
|
+
self.success = []
|
|
3438
|
+
(_etype24, _size21) = iprot.readListBegin()
|
|
3439
|
+
for _i25 in range(_size21):
|
|
3440
|
+
_elem26 = TFieldInfo()
|
|
3441
|
+
_elem26.read(iprot)
|
|
3442
|
+
self.success.append(_elem26)
|
|
3443
|
+
iprot.readListEnd()
|
|
3444
|
+
else:
|
|
3445
|
+
iprot.skip(ftype)
|
|
3446
|
+
elif fid == 1:
|
|
3447
|
+
if ftype == TType.STRUCT:
|
|
3448
|
+
self.error1 = QueryProcessingException.read(iprot)
|
|
3449
|
+
else:
|
|
3450
|
+
iprot.skip(ftype)
|
|
3451
|
+
elif fid == 2:
|
|
3452
|
+
if ftype == TType.STRUCT:
|
|
3453
|
+
self.error2 = AccessDeniedException.read(iprot)
|
|
3454
|
+
else:
|
|
3455
|
+
iprot.skip(ftype)
|
|
3456
|
+
else:
|
|
3457
|
+
iprot.skip(ftype)
|
|
3458
|
+
iprot.readFieldEnd()
|
|
3459
|
+
iprot.readStructEnd()
|
|
3460
|
+
|
|
3461
|
+
def write(self, oprot):
|
|
3462
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
3463
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
3464
|
+
return
|
|
3465
|
+
oprot.writeStructBegin('getColumns_result')
|
|
3466
|
+
if self.success is not None:
|
|
3467
|
+
oprot.writeFieldBegin('success', TType.LIST, 0)
|
|
3468
|
+
oprot.writeListBegin(TType.STRUCT, len(self.success))
|
|
3469
|
+
for iter27 in self.success:
|
|
3470
|
+
iter27.write(oprot)
|
|
3471
|
+
oprot.writeListEnd()
|
|
3472
|
+
oprot.writeFieldEnd()
|
|
3473
|
+
if self.error1 is not None:
|
|
3474
|
+
oprot.writeFieldBegin('error1', TType.STRUCT, 1)
|
|
3475
|
+
self.error1.write(oprot)
|
|
3476
|
+
oprot.writeFieldEnd()
|
|
3477
|
+
if self.error2 is not None:
|
|
3478
|
+
oprot.writeFieldBegin('error2', TType.STRUCT, 2)
|
|
3479
|
+
self.error2.write(oprot)
|
|
3480
|
+
oprot.writeFieldEnd()
|
|
3481
|
+
oprot.writeFieldStop()
|
|
3482
|
+
oprot.writeStructEnd()
|
|
3483
|
+
|
|
3484
|
+
def validate(self):
|
|
3485
|
+
return
|
|
3486
|
+
|
|
3487
|
+
def __repr__(self):
|
|
3488
|
+
L = ['%s=%r' % (key, value)
|
|
3489
|
+
for key, value in self.__dict__.items()]
|
|
3490
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
3491
|
+
|
|
3492
|
+
def __eq__(self, other):
|
|
3493
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
3494
|
+
|
|
3495
|
+
def __ne__(self, other):
|
|
3496
|
+
return not (self == other)
|
|
3497
|
+
all_structs.append(getColumns_result)
|
|
3498
|
+
getColumns_result.thrift_spec = (
|
|
3499
|
+
(0, TType.LIST, 'success', (TType.STRUCT, [TFieldInfo, None], False), None, ), # 0
|
|
3500
|
+
(1, TType.STRUCT, 'error1', [QueryProcessingException, None], None, ), # 1
|
|
3501
|
+
(2, TType.STRUCT, 'error2', [AccessDeniedException, None], None, ), # 2
|
|
3502
|
+
)
|
|
3503
|
+
|
|
3504
|
+
|
|
3505
|
+
class updateUsers_args(object):
|
|
3506
|
+
"""
|
|
3507
|
+
Attributes:
|
|
3508
|
+
- userInfo
|
|
3509
|
+
|
|
3510
|
+
"""
|
|
3511
|
+
|
|
3512
|
+
|
|
3513
|
+
def __init__(self, userInfo=None,):
|
|
3514
|
+
self.userInfo = userInfo
|
|
3515
|
+
|
|
3516
|
+
def read(self, iprot):
|
|
3517
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
3518
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
3519
|
+
return
|
|
3520
|
+
iprot.readStructBegin()
|
|
3521
|
+
while True:
|
|
3522
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
3523
|
+
if ftype == TType.STOP:
|
|
3524
|
+
break
|
|
3525
|
+
if fid == 1:
|
|
3526
|
+
if ftype == TType.STRING:
|
|
3527
|
+
self.userInfo = iprot.readBinary()
|
|
3528
|
+
else:
|
|
3529
|
+
iprot.skip(ftype)
|
|
3530
|
+
else:
|
|
3531
|
+
iprot.skip(ftype)
|
|
3532
|
+
iprot.readFieldEnd()
|
|
3533
|
+
iprot.readStructEnd()
|
|
3534
|
+
|
|
3535
|
+
def write(self, oprot):
|
|
3536
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
3537
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
3538
|
+
return
|
|
3539
|
+
oprot.writeStructBegin('updateUsers_args')
|
|
3540
|
+
if self.userInfo is not None:
|
|
3541
|
+
oprot.writeFieldBegin('userInfo', TType.STRING, 1)
|
|
3542
|
+
oprot.writeBinary(self.userInfo)
|
|
3543
|
+
oprot.writeFieldEnd()
|
|
3544
|
+
oprot.writeFieldStop()
|
|
3545
|
+
oprot.writeStructEnd()
|
|
3546
|
+
|
|
3547
|
+
def validate(self):
|
|
3548
|
+
return
|
|
3549
|
+
|
|
3550
|
+
def __repr__(self):
|
|
3551
|
+
L = ['%s=%r' % (key, value)
|
|
3552
|
+
for key, value in self.__dict__.items()]
|
|
3553
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
3554
|
+
|
|
3555
|
+
def __eq__(self, other):
|
|
3556
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
3557
|
+
|
|
3558
|
+
def __ne__(self, other):
|
|
3559
|
+
return not (self == other)
|
|
3560
|
+
all_structs.append(updateUsers_args)
|
|
3561
|
+
updateUsers_args.thrift_spec = (
|
|
3562
|
+
None, # 0
|
|
3563
|
+
(1, TType.STRING, 'userInfo', 'BINARY', None, ), # 1
|
|
3564
|
+
)
|
|
3565
|
+
|
|
3566
|
+
|
|
3567
|
+
class updateUsers_result(object):
|
|
3568
|
+
"""
|
|
3569
|
+
Attributes:
|
|
3570
|
+
- error1
|
|
3571
|
+
- error2
|
|
3572
|
+
|
|
3573
|
+
"""
|
|
3574
|
+
|
|
3575
|
+
|
|
3576
|
+
def __init__(self, error1=None, error2=None,):
|
|
3577
|
+
self.error1 = error1
|
|
3578
|
+
self.error2 = error2
|
|
3579
|
+
|
|
3580
|
+
def read(self, iprot):
|
|
3581
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
3582
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
3583
|
+
return
|
|
3584
|
+
iprot.readStructBegin()
|
|
3585
|
+
while True:
|
|
3586
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
3587
|
+
if ftype == TType.STOP:
|
|
3588
|
+
break
|
|
3589
|
+
if fid == 1:
|
|
3590
|
+
if ftype == TType.STRUCT:
|
|
3591
|
+
self.error1 = QueryProcessingException.read(iprot)
|
|
3592
|
+
else:
|
|
3593
|
+
iprot.skip(ftype)
|
|
3594
|
+
elif fid == 2:
|
|
3595
|
+
if ftype == TType.STRUCT:
|
|
3596
|
+
self.error2 = AccessDeniedException.read(iprot)
|
|
3597
|
+
else:
|
|
3598
|
+
iprot.skip(ftype)
|
|
3599
|
+
else:
|
|
3600
|
+
iprot.skip(ftype)
|
|
3601
|
+
iprot.readFieldEnd()
|
|
3602
|
+
iprot.readStructEnd()
|
|
3603
|
+
|
|
3604
|
+
def write(self, oprot):
|
|
3605
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
3606
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
3607
|
+
return
|
|
3608
|
+
oprot.writeStructBegin('updateUsers_result')
|
|
3609
|
+
if self.error1 is not None:
|
|
3610
|
+
oprot.writeFieldBegin('error1', TType.STRUCT, 1)
|
|
3611
|
+
self.error1.write(oprot)
|
|
3612
|
+
oprot.writeFieldEnd()
|
|
3613
|
+
if self.error2 is not None:
|
|
3614
|
+
oprot.writeFieldBegin('error2', TType.STRUCT, 2)
|
|
3615
|
+
self.error2.write(oprot)
|
|
3616
|
+
oprot.writeFieldEnd()
|
|
3617
|
+
oprot.writeFieldStop()
|
|
3618
|
+
oprot.writeStructEnd()
|
|
3619
|
+
|
|
3620
|
+
def validate(self):
|
|
3621
|
+
return
|
|
3622
|
+
|
|
3623
|
+
def __repr__(self):
|
|
3624
|
+
L = ['%s=%r' % (key, value)
|
|
3625
|
+
for key, value in self.__dict__.items()]
|
|
3626
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
3627
|
+
|
|
3628
|
+
def __eq__(self, other):
|
|
3629
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
3630
|
+
|
|
3631
|
+
def __ne__(self, other):
|
|
3632
|
+
return not (self == other)
|
|
3633
|
+
all_structs.append(updateUsers_result)
|
|
3634
|
+
updateUsers_result.thrift_spec = (
|
|
3635
|
+
None, # 0
|
|
3636
|
+
(1, TType.STRUCT, 'error1', [QueryProcessingException, None], None, ), # 1
|
|
3637
|
+
(2, TType.STRUCT, 'error2', [AccessDeniedException, None], None, ), # 2
|
|
3638
|
+
)
|
|
3639
|
+
|
|
3640
|
+
|
|
3641
|
+
class setProps_args(object):
|
|
3642
|
+
"""
|
|
3643
|
+
Attributes:
|
|
3644
|
+
- sessionId
|
|
3645
|
+
- propMap
|
|
3646
|
+
|
|
3647
|
+
"""
|
|
3648
|
+
|
|
3649
|
+
|
|
3650
|
+
def __init__(self, sessionId=None, propMap=None,):
|
|
3651
|
+
self.sessionId = sessionId
|
|
3652
|
+
self.propMap = propMap
|
|
3653
|
+
|
|
3654
|
+
def read(self, iprot):
|
|
3655
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
3656
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
3657
|
+
return
|
|
3658
|
+
iprot.readStructBegin()
|
|
3659
|
+
while True:
|
|
3660
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
3661
|
+
if ftype == TType.STOP:
|
|
3662
|
+
break
|
|
3663
|
+
if fid == 1:
|
|
3664
|
+
if ftype == TType.STRING:
|
|
3665
|
+
self.sessionId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
3666
|
+
else:
|
|
3667
|
+
iprot.skip(ftype)
|
|
3668
|
+
elif fid == 2:
|
|
3669
|
+
if ftype == TType.STRING:
|
|
3670
|
+
self.propMap = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
3671
|
+
else:
|
|
3672
|
+
iprot.skip(ftype)
|
|
3673
|
+
else:
|
|
3674
|
+
iprot.skip(ftype)
|
|
3675
|
+
iprot.readFieldEnd()
|
|
3676
|
+
iprot.readStructEnd()
|
|
3677
|
+
|
|
3678
|
+
def write(self, oprot):
|
|
3679
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
3680
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
3681
|
+
return
|
|
3682
|
+
oprot.writeStructBegin('setProps_args')
|
|
3683
|
+
if self.sessionId is not None:
|
|
3684
|
+
oprot.writeFieldBegin('sessionId', TType.STRING, 1)
|
|
3685
|
+
oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId)
|
|
3686
|
+
oprot.writeFieldEnd()
|
|
3687
|
+
if self.propMap is not None:
|
|
3688
|
+
oprot.writeFieldBegin('propMap', TType.STRING, 2)
|
|
3689
|
+
oprot.writeString(self.propMap.encode('utf-8') if sys.version_info[0] == 2 else self.propMap)
|
|
3690
|
+
oprot.writeFieldEnd()
|
|
3691
|
+
oprot.writeFieldStop()
|
|
3692
|
+
oprot.writeStructEnd()
|
|
3693
|
+
|
|
3694
|
+
def validate(self):
|
|
3695
|
+
return
|
|
3696
|
+
|
|
3697
|
+
def __repr__(self):
|
|
3698
|
+
L = ['%s=%r' % (key, value)
|
|
3699
|
+
for key, value in self.__dict__.items()]
|
|
3700
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
3701
|
+
|
|
3702
|
+
def __eq__(self, other):
|
|
3703
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
3704
|
+
|
|
3705
|
+
def __ne__(self, other):
|
|
3706
|
+
return not (self == other)
|
|
3707
|
+
all_structs.append(setProps_args)
|
|
3708
|
+
setProps_args.thrift_spec = (
|
|
3709
|
+
None, # 0
|
|
3710
|
+
(1, TType.STRING, 'sessionId', 'UTF8', None, ), # 1
|
|
3711
|
+
(2, TType.STRING, 'propMap', 'UTF8', None, ), # 2
|
|
3712
|
+
)
|
|
3713
|
+
|
|
3714
|
+
|
|
3715
|
+
class setProps_result(object):
|
|
3716
|
+
"""
|
|
3717
|
+
Attributes:
|
|
3718
|
+
- error2
|
|
3719
|
+
|
|
3720
|
+
"""
|
|
3721
|
+
|
|
3722
|
+
|
|
3723
|
+
def __init__(self, error2=None,):
|
|
3724
|
+
self.error2 = error2
|
|
3725
|
+
|
|
3726
|
+
def read(self, iprot):
|
|
3727
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
3728
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
3729
|
+
return
|
|
3730
|
+
iprot.readStructBegin()
|
|
3731
|
+
while True:
|
|
3732
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
3733
|
+
if ftype == TType.STOP:
|
|
3734
|
+
break
|
|
3735
|
+
if fid == 1:
|
|
3736
|
+
if ftype == TType.STRUCT:
|
|
3737
|
+
self.error2 = AccessDeniedException.read(iprot)
|
|
3738
|
+
else:
|
|
3739
|
+
iprot.skip(ftype)
|
|
3740
|
+
else:
|
|
3741
|
+
iprot.skip(ftype)
|
|
3742
|
+
iprot.readFieldEnd()
|
|
3743
|
+
iprot.readStructEnd()
|
|
3744
|
+
|
|
3745
|
+
def write(self, oprot):
|
|
3746
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
3747
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
3748
|
+
return
|
|
3749
|
+
oprot.writeStructBegin('setProps_result')
|
|
3750
|
+
if self.error2 is not None:
|
|
3751
|
+
oprot.writeFieldBegin('error2', TType.STRUCT, 1)
|
|
3752
|
+
self.error2.write(oprot)
|
|
3753
|
+
oprot.writeFieldEnd()
|
|
3754
|
+
oprot.writeFieldStop()
|
|
3755
|
+
oprot.writeStructEnd()
|
|
3756
|
+
|
|
3757
|
+
def validate(self):
|
|
3758
|
+
return
|
|
3759
|
+
|
|
3760
|
+
def __repr__(self):
|
|
3761
|
+
L = ['%s=%r' % (key, value)
|
|
3762
|
+
for key, value in self.__dict__.items()]
|
|
3763
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
3764
|
+
|
|
3765
|
+
def __eq__(self, other):
|
|
3766
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
3767
|
+
|
|
3768
|
+
def __ne__(self, other):
|
|
3769
|
+
return not (self == other)
|
|
3770
|
+
all_structs.append(setProps_result)
|
|
3771
|
+
setProps_result.thrift_spec = (
|
|
3772
|
+
None, # 0
|
|
3773
|
+
(1, TType.STRUCT, 'error2', [AccessDeniedException, None], None, ), # 1
|
|
3774
|
+
)
|
|
3775
|
+
fix_spec(all_structs)
|
|
3776
|
+
del all_structs
|