rbhive-u2i 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,72 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require_relative 't_c_l_i_service_types'
9
+
10
+ module Hive2
11
+ module Thrift
12
+ PRIMITIVE_TYPES = Set.new([
13
+ 0,
14
+ 1,
15
+ 2,
16
+ 3,
17
+ 4,
18
+ 5,
19
+ 6,
20
+ 7,
21
+ 8,
22
+ 9,
23
+ 15,
24
+ 16,
25
+ 17,
26
+ 18,
27
+ 19,
28
+ ])
29
+
30
+ COMPLEX_TYPES = Set.new([
31
+ 10,
32
+ 11,
33
+ 12,
34
+ 13,
35
+ 14,
36
+ ])
37
+
38
+ COLLECTION_TYPES = Set.new([
39
+ 10,
40
+ 11,
41
+ ])
42
+
43
+ TYPE_NAMES = {
44
+ 0 => %q"BOOLEAN",
45
+ 1 => %q"TINYINT",
46
+ 2 => %q"SMALLINT",
47
+ 3 => %q"INT",
48
+ 4 => %q"BIGINT",
49
+ 5 => %q"FLOAT",
50
+ 6 => %q"DOUBLE",
51
+ 7 => %q"STRING",
52
+ 8 => %q"TIMESTAMP",
53
+ 9 => %q"BINARY",
54
+ 10 => %q"ARRAY",
55
+ 11 => %q"MAP",
56
+ 12 => %q"STRUCT",
57
+ 13 => %q"UNIONTYPE",
58
+ 15 => %q"DECIMAL",
59
+ 16 => %q"NULL",
60
+ 17 => %q"DATE",
61
+ 18 => %q"VARCHAR",
62
+ 19 => %q"CHAR",
63
+ }
64
+
65
+ CHARACTER_MAXIMUM_LENGTH = %q"characterMaximumLength"
66
+
67
+ PRECISION = %q"precision"
68
+
69
+ SCALE = %q"scale"
70
+
71
+ end
72
+ end
@@ -0,0 +1,1762 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+
9
+ module Hive2
10
+ module Thrift
11
+ module TProtocolVersion
12
+ HIVE_CLI_SERVICE_PROTOCOL_V1 = 0
13
+ HIVE_CLI_SERVICE_PROTOCOL_V2 = 1
14
+ HIVE_CLI_SERVICE_PROTOCOL_V3 = 2
15
+ HIVE_CLI_SERVICE_PROTOCOL_V4 = 3
16
+ HIVE_CLI_SERVICE_PROTOCOL_V5 = 4
17
+ HIVE_CLI_SERVICE_PROTOCOL_V6 = 5
18
+ HIVE_CLI_SERVICE_PROTOCOL_V7 = 6
19
+ VALUE_MAP = {0 => "HIVE_CLI_SERVICE_PROTOCOL_V1", 1 => "HIVE_CLI_SERVICE_PROTOCOL_V2", 2 => "HIVE_CLI_SERVICE_PROTOCOL_V3", 3 => "HIVE_CLI_SERVICE_PROTOCOL_V4", 4 => "HIVE_CLI_SERVICE_PROTOCOL_V5", 5 => "HIVE_CLI_SERVICE_PROTOCOL_V6", 6 => "HIVE_CLI_SERVICE_PROTOCOL_V7"}
20
+ VALID_VALUES = Set.new([HIVE_CLI_SERVICE_PROTOCOL_V1, HIVE_CLI_SERVICE_PROTOCOL_V2, HIVE_CLI_SERVICE_PROTOCOL_V3, HIVE_CLI_SERVICE_PROTOCOL_V4, HIVE_CLI_SERVICE_PROTOCOL_V5, HIVE_CLI_SERVICE_PROTOCOL_V6, HIVE_CLI_SERVICE_PROTOCOL_V7]).freeze
21
+ end
22
+
23
+ module TTypeId
24
+ BOOLEAN_TYPE = 0
25
+ TINYINT_TYPE = 1
26
+ SMALLINT_TYPE = 2
27
+ INT_TYPE = 3
28
+ BIGINT_TYPE = 4
29
+ FLOAT_TYPE = 5
30
+ DOUBLE_TYPE = 6
31
+ STRING_TYPE = 7
32
+ TIMESTAMP_TYPE = 8
33
+ BINARY_TYPE = 9
34
+ ARRAY_TYPE = 10
35
+ MAP_TYPE = 11
36
+ STRUCT_TYPE = 12
37
+ UNION_TYPE = 13
38
+ USER_DEFINED_TYPE = 14
39
+ DECIMAL_TYPE = 15
40
+ NULL_TYPE = 16
41
+ DATE_TYPE = 17
42
+ VARCHAR_TYPE = 18
43
+ CHAR_TYPE = 19
44
+ VALUE_MAP = {0 => "BOOLEAN_TYPE", 1 => "TINYINT_TYPE", 2 => "SMALLINT_TYPE", 3 => "INT_TYPE", 4 => "BIGINT_TYPE", 5 => "FLOAT_TYPE", 6 => "DOUBLE_TYPE", 7 => "STRING_TYPE", 8 => "TIMESTAMP_TYPE", 9 => "BINARY_TYPE", 10 => "ARRAY_TYPE", 11 => "MAP_TYPE", 12 => "STRUCT_TYPE", 13 => "UNION_TYPE", 14 => "USER_DEFINED_TYPE", 15 => "DECIMAL_TYPE", 16 => "NULL_TYPE", 17 => "DATE_TYPE", 18 => "VARCHAR_TYPE", 19 => "CHAR_TYPE"}
45
+ VALID_VALUES = Set.new([BOOLEAN_TYPE, TINYINT_TYPE, SMALLINT_TYPE, INT_TYPE, BIGINT_TYPE, FLOAT_TYPE, DOUBLE_TYPE, STRING_TYPE, TIMESTAMP_TYPE, BINARY_TYPE, ARRAY_TYPE, MAP_TYPE, STRUCT_TYPE, UNION_TYPE, USER_DEFINED_TYPE, DECIMAL_TYPE, NULL_TYPE, DATE_TYPE, VARCHAR_TYPE, CHAR_TYPE]).freeze
46
+ end
47
+
48
+ module TStatusCode
49
+ SUCCESS_STATUS = 0
50
+ SUCCESS_WITH_INFO_STATUS = 1
51
+ STILL_EXECUTING_STATUS = 2
52
+ ERROR_STATUS = 3
53
+ INVALID_HANDLE_STATUS = 4
54
+ VALUE_MAP = {0 => "SUCCESS_STATUS", 1 => "SUCCESS_WITH_INFO_STATUS", 2 => "STILL_EXECUTING_STATUS", 3 => "ERROR_STATUS", 4 => "INVALID_HANDLE_STATUS"}
55
+ VALID_VALUES = Set.new([SUCCESS_STATUS, SUCCESS_WITH_INFO_STATUS, STILL_EXECUTING_STATUS, ERROR_STATUS, INVALID_HANDLE_STATUS]).freeze
56
+ end
57
+
58
+ module TOperationState
59
+ INITIALIZED_STATE = 0
60
+ RUNNING_STATE = 1
61
+ FINISHED_STATE = 2
62
+ CANCELED_STATE = 3
63
+ CLOSED_STATE = 4
64
+ ERROR_STATE = 5
65
+ UKNOWN_STATE = 6
66
+ PENDING_STATE = 7
67
+ VALUE_MAP = {0 => "INITIALIZED_STATE", 1 => "RUNNING_STATE", 2 => "FINISHED_STATE", 3 => "CANCELED_STATE", 4 => "CLOSED_STATE", 5 => "ERROR_STATE", 6 => "UKNOWN_STATE", 7 => "PENDING_STATE"}
68
+ VALID_VALUES = Set.new([INITIALIZED_STATE, RUNNING_STATE, FINISHED_STATE, CANCELED_STATE, CLOSED_STATE, ERROR_STATE, UKNOWN_STATE, PENDING_STATE]).freeze
69
+ end
70
+
71
+ module TOperationType
72
+ EXECUTE_STATEMENT = 0
73
+ GET_TYPE_INFO = 1
74
+ GET_CATALOGS = 2
75
+ GET_SCHEMAS = 3
76
+ GET_TABLES = 4
77
+ GET_TABLE_TYPES = 5
78
+ GET_COLUMNS = 6
79
+ GET_FUNCTIONS = 7
80
+ UNKNOWN = 8
81
+ VALUE_MAP = {0 => "EXECUTE_STATEMENT", 1 => "GET_TYPE_INFO", 2 => "GET_CATALOGS", 3 => "GET_SCHEMAS", 4 => "GET_TABLES", 5 => "GET_TABLE_TYPES", 6 => "GET_COLUMNS", 7 => "GET_FUNCTIONS", 8 => "UNKNOWN"}
82
+ VALID_VALUES = Set.new([EXECUTE_STATEMENT, GET_TYPE_INFO, GET_CATALOGS, GET_SCHEMAS, GET_TABLES, GET_TABLE_TYPES, GET_COLUMNS, GET_FUNCTIONS, UNKNOWN]).freeze
83
+ end
84
+
85
+ module TGetInfoType
86
+ CLI_MAX_DRIVER_CONNECTIONS = 0
87
+ CLI_MAX_CONCURRENT_ACTIVITIES = 1
88
+ CLI_DATA_SOURCE_NAME = 2
89
+ CLI_FETCH_DIRECTION = 8
90
+ CLI_SERVER_NAME = 13
91
+ CLI_SEARCH_PATTERN_ESCAPE = 14
92
+ CLI_DBMS_NAME = 17
93
+ CLI_DBMS_VER = 18
94
+ CLI_ACCESSIBLE_TABLES = 19
95
+ CLI_ACCESSIBLE_PROCEDURES = 20
96
+ CLI_CURSOR_COMMIT_BEHAVIOR = 23
97
+ CLI_DATA_SOURCE_READ_ONLY = 25
98
+ CLI_DEFAULT_TXN_ISOLATION = 26
99
+ CLI_IDENTIFIER_CASE = 28
100
+ CLI_IDENTIFIER_QUOTE_CHAR = 29
101
+ CLI_MAX_COLUMN_NAME_LEN = 30
102
+ CLI_MAX_CURSOR_NAME_LEN = 31
103
+ CLI_MAX_SCHEMA_NAME_LEN = 32
104
+ CLI_MAX_CATALOG_NAME_LEN = 34
105
+ CLI_MAX_TABLE_NAME_LEN = 35
106
+ CLI_SCROLL_CONCURRENCY = 43
107
+ CLI_TXN_CAPABLE = 46
108
+ CLI_USER_NAME = 47
109
+ CLI_TXN_ISOLATION_OPTION = 72
110
+ CLI_INTEGRITY = 73
111
+ CLI_GETDATA_EXTENSIONS = 81
112
+ CLI_NULL_COLLATION = 85
113
+ CLI_ALTER_TABLE = 86
114
+ CLI_ORDER_BY_COLUMNS_IN_SELECT = 90
115
+ CLI_SPECIAL_CHARACTERS = 94
116
+ CLI_MAX_COLUMNS_IN_GROUP_BY = 97
117
+ CLI_MAX_COLUMNS_IN_INDEX = 98
118
+ CLI_MAX_COLUMNS_IN_ORDER_BY = 99
119
+ CLI_MAX_COLUMNS_IN_SELECT = 100
120
+ CLI_MAX_COLUMNS_IN_TABLE = 101
121
+ CLI_MAX_INDEX_SIZE = 102
122
+ CLI_MAX_ROW_SIZE = 104
123
+ CLI_MAX_STATEMENT_LEN = 105
124
+ CLI_MAX_TABLES_IN_SELECT = 106
125
+ CLI_MAX_USER_NAME_LEN = 107
126
+ CLI_OJ_CAPABILITIES = 115
127
+ CLI_XOPEN_CLI_YEAR = 10000
128
+ CLI_CURSOR_SENSITIVITY = 10001
129
+ CLI_DESCRIBE_PARAMETER = 10002
130
+ CLI_CATALOG_NAME = 10003
131
+ CLI_COLLATION_SEQ = 10004
132
+ CLI_MAX_IDENTIFIER_LEN = 10005
133
+ VALUE_MAP = {0 => "CLI_MAX_DRIVER_CONNECTIONS", 1 => "CLI_MAX_CONCURRENT_ACTIVITIES", 2 => "CLI_DATA_SOURCE_NAME", 8 => "CLI_FETCH_DIRECTION", 13 => "CLI_SERVER_NAME", 14 => "CLI_SEARCH_PATTERN_ESCAPE", 17 => "CLI_DBMS_NAME", 18 => "CLI_DBMS_VER", 19 => "CLI_ACCESSIBLE_TABLES", 20 => "CLI_ACCESSIBLE_PROCEDURES", 23 => "CLI_CURSOR_COMMIT_BEHAVIOR", 25 => "CLI_DATA_SOURCE_READ_ONLY", 26 => "CLI_DEFAULT_TXN_ISOLATION", 28 => "CLI_IDENTIFIER_CASE", 29 => "CLI_IDENTIFIER_QUOTE_CHAR", 30 => "CLI_MAX_COLUMN_NAME_LEN", 31 => "CLI_MAX_CURSOR_NAME_LEN", 32 => "CLI_MAX_SCHEMA_NAME_LEN", 34 => "CLI_MAX_CATALOG_NAME_LEN", 35 => "CLI_MAX_TABLE_NAME_LEN", 43 => "CLI_SCROLL_CONCURRENCY", 46 => "CLI_TXN_CAPABLE", 47 => "CLI_USER_NAME", 72 => "CLI_TXN_ISOLATION_OPTION", 73 => "CLI_INTEGRITY", 81 => "CLI_GETDATA_EXTENSIONS", 85 => "CLI_NULL_COLLATION", 86 => "CLI_ALTER_TABLE", 90 => "CLI_ORDER_BY_COLUMNS_IN_SELECT", 94 => "CLI_SPECIAL_CHARACTERS", 97 => "CLI_MAX_COLUMNS_IN_GROUP_BY", 98 => "CLI_MAX_COLUMNS_IN_INDEX", 99 => "CLI_MAX_COLUMNS_IN_ORDER_BY", 100 => "CLI_MAX_COLUMNS_IN_SELECT", 101 => "CLI_MAX_COLUMNS_IN_TABLE", 102 => "CLI_MAX_INDEX_SIZE", 104 => "CLI_MAX_ROW_SIZE", 105 => "CLI_MAX_STATEMENT_LEN", 106 => "CLI_MAX_TABLES_IN_SELECT", 107 => "CLI_MAX_USER_NAME_LEN", 115 => "CLI_OJ_CAPABILITIES", 10000 => "CLI_XOPEN_CLI_YEAR", 10001 => "CLI_CURSOR_SENSITIVITY", 10002 => "CLI_DESCRIBE_PARAMETER", 10003 => "CLI_CATALOG_NAME", 10004 => "CLI_COLLATION_SEQ", 10005 => "CLI_MAX_IDENTIFIER_LEN"}
134
+ VALID_VALUES = Set.new([CLI_MAX_DRIVER_CONNECTIONS, CLI_MAX_CONCURRENT_ACTIVITIES, CLI_DATA_SOURCE_NAME, CLI_FETCH_DIRECTION, CLI_SERVER_NAME, CLI_SEARCH_PATTERN_ESCAPE, CLI_DBMS_NAME, CLI_DBMS_VER, CLI_ACCESSIBLE_TABLES, CLI_ACCESSIBLE_PROCEDURES, CLI_CURSOR_COMMIT_BEHAVIOR, CLI_DATA_SOURCE_READ_ONLY, CLI_DEFAULT_TXN_ISOLATION, CLI_IDENTIFIER_CASE, CLI_IDENTIFIER_QUOTE_CHAR, CLI_MAX_COLUMN_NAME_LEN, CLI_MAX_CURSOR_NAME_LEN, CLI_MAX_SCHEMA_NAME_LEN, CLI_MAX_CATALOG_NAME_LEN, CLI_MAX_TABLE_NAME_LEN, CLI_SCROLL_CONCURRENCY, CLI_TXN_CAPABLE, CLI_USER_NAME, CLI_TXN_ISOLATION_OPTION, CLI_INTEGRITY, CLI_GETDATA_EXTENSIONS, CLI_NULL_COLLATION, CLI_ALTER_TABLE, CLI_ORDER_BY_COLUMNS_IN_SELECT, CLI_SPECIAL_CHARACTERS, CLI_MAX_COLUMNS_IN_GROUP_BY, CLI_MAX_COLUMNS_IN_INDEX, CLI_MAX_COLUMNS_IN_ORDER_BY, CLI_MAX_COLUMNS_IN_SELECT, CLI_MAX_COLUMNS_IN_TABLE, CLI_MAX_INDEX_SIZE, CLI_MAX_ROW_SIZE, CLI_MAX_STATEMENT_LEN, CLI_MAX_TABLES_IN_SELECT, CLI_MAX_USER_NAME_LEN, CLI_OJ_CAPABILITIES, CLI_XOPEN_CLI_YEAR, CLI_CURSOR_SENSITIVITY, CLI_DESCRIBE_PARAMETER, CLI_CATALOG_NAME, CLI_COLLATION_SEQ, CLI_MAX_IDENTIFIER_LEN]).freeze
135
+ end
136
+
137
+ module TFetchOrientation
138
+ FETCH_NEXT = 0
139
+ FETCH_PRIOR = 1
140
+ FETCH_RELATIVE = 2
141
+ FETCH_ABSOLUTE = 3
142
+ FETCH_FIRST = 4
143
+ FETCH_LAST = 5
144
+ VALUE_MAP = {0 => "FETCH_NEXT", 1 => "FETCH_PRIOR", 2 => "FETCH_RELATIVE", 3 => "FETCH_ABSOLUTE", 4 => "FETCH_FIRST", 5 => "FETCH_LAST"}
145
+ VALID_VALUES = Set.new([FETCH_NEXT, FETCH_PRIOR, FETCH_RELATIVE, FETCH_ABSOLUTE, FETCH_FIRST, FETCH_LAST]).freeze
146
+ end
147
+
148
+ class TTypeQualifierValue < ::Thrift::Union
149
+ include ::Thrift::Struct_Union
150
+ class << self
151
+ def i32Value(val)
152
+ TTypeQualifierValue.new(:i32Value, val)
153
+ end
154
+
155
+ def stringValue(val)
156
+ TTypeQualifierValue.new(:stringValue, val)
157
+ end
158
+ end
159
+
160
+ I32VALUE = 1
161
+ STRINGVALUE = 2
162
+
163
+ FIELDS = {
164
+ I32VALUE => {:type => ::Thrift::Types::I32, :name => 'i32Value', :optional => true},
165
+ STRINGVALUE => {:type => ::Thrift::Types::STRING, :name => 'stringValue', :optional => true}
166
+ }
167
+
168
+ def struct_fields; FIELDS; end
169
+
170
+ def validate
171
+ raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil?
172
+ end
173
+
174
+ ::Thrift::Union.generate_accessors self
175
+ end
176
+
177
+ class TTypeQualifiers
178
+ include ::Thrift::Struct, ::Thrift::Struct_Union
179
+ QUALIFIERS = 1
180
+
181
+ FIELDS = {
182
+ QUALIFIERS => {:type => ::Thrift::Types::MAP, :name => 'qualifiers', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Hive2::Thrift::TTypeQualifierValue}}
183
+ }
184
+
185
+ def struct_fields; FIELDS; end
186
+
187
+ def validate
188
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field qualifiers is unset!') unless @qualifiers
189
+ end
190
+
191
+ ::Thrift::Struct.generate_accessors self
192
+ end
193
+
194
+ class TPrimitiveTypeEntry
195
+ include ::Thrift::Struct, ::Thrift::Struct_Union
196
+ TYPE = 1
197
+ TYPEQUALIFIERS = 2
198
+
199
+ FIELDS = {
200
+ TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::Hive2::Thrift::TTypeId},
201
+ TYPEQUALIFIERS => {:type => ::Thrift::Types::STRUCT, :name => 'typeQualifiers', :class => ::Hive2::Thrift::TTypeQualifiers, :optional => true}
202
+ }
203
+
204
+ def struct_fields; FIELDS; end
205
+
206
+ def validate
207
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
208
+ unless @type.nil? || ::Hive2::Thrift::TTypeId::VALID_VALUES.include?(@type)
209
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
210
+ end
211
+ end
212
+
213
+ ::Thrift::Struct.generate_accessors self
214
+ end
215
+
216
+ class TArrayTypeEntry
217
+ include ::Thrift::Struct, ::Thrift::Struct_Union
218
+ OBJECTTYPEPTR = 1
219
+
220
+ FIELDS = {
221
+ OBJECTTYPEPTR => {:type => ::Thrift::Types::I32, :name => 'objectTypePtr'}
222
+ }
223
+
224
+ def struct_fields; FIELDS; end
225
+
226
+ def validate
227
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field objectTypePtr is unset!') unless @objectTypePtr
228
+ end
229
+
230
+ ::Thrift::Struct.generate_accessors self
231
+ end
232
+
233
+ class TMapTypeEntry
234
+ include ::Thrift::Struct, ::Thrift::Struct_Union
235
+ KEYTYPEPTR = 1
236
+ VALUETYPEPTR = 2
237
+
238
+ FIELDS = {
239
+ KEYTYPEPTR => {:type => ::Thrift::Types::I32, :name => 'keyTypePtr'},
240
+ VALUETYPEPTR => {:type => ::Thrift::Types::I32, :name => 'valueTypePtr'}
241
+ }
242
+
243
+ def struct_fields; FIELDS; end
244
+
245
+ def validate
246
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyTypePtr is unset!') unless @keyTypePtr
247
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field valueTypePtr is unset!') unless @valueTypePtr
248
+ end
249
+
250
+ ::Thrift::Struct.generate_accessors self
251
+ end
252
+
253
+ class TStructTypeEntry
254
+ include ::Thrift::Struct, ::Thrift::Struct_Union
255
+ NAMETOTYPEPTR = 1
256
+
257
+ FIELDS = {
258
+ NAMETOTYPEPTR => {:type => ::Thrift::Types::MAP, :name => 'nameToTypePtr', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I32}}
259
+ }
260
+
261
+ def struct_fields; FIELDS; end
262
+
263
+ def validate
264
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nameToTypePtr is unset!') unless @nameToTypePtr
265
+ end
266
+
267
+ ::Thrift::Struct.generate_accessors self
268
+ end
269
+
270
+ class TUnionTypeEntry
271
+ include ::Thrift::Struct, ::Thrift::Struct_Union
272
+ NAMETOTYPEPTR = 1
273
+
274
+ FIELDS = {
275
+ NAMETOTYPEPTR => {:type => ::Thrift::Types::MAP, :name => 'nameToTypePtr', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I32}}
276
+ }
277
+
278
+ def struct_fields; FIELDS; end
279
+
280
+ def validate
281
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nameToTypePtr is unset!') unless @nameToTypePtr
282
+ end
283
+
284
+ ::Thrift::Struct.generate_accessors self
285
+ end
286
+
287
+ class TUserDefinedTypeEntry
288
+ include ::Thrift::Struct, ::Thrift::Struct_Union
289
+ TYPECLASSNAME = 1
290
+
291
+ FIELDS = {
292
+ TYPECLASSNAME => {:type => ::Thrift::Types::STRING, :name => 'typeClassName'}
293
+ }
294
+
295
+ def struct_fields; FIELDS; end
296
+
297
+ def validate
298
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field typeClassName is unset!') unless @typeClassName
299
+ end
300
+
301
+ ::Thrift::Struct.generate_accessors self
302
+ end
303
+
304
+ class TTypeEntry < ::Thrift::Union
305
+ include ::Thrift::Struct_Union
306
+ class << self
307
+ def primitiveEntry(val)
308
+ TTypeEntry.new(:primitiveEntry, val)
309
+ end
310
+
311
+ def arrayEntry(val)
312
+ TTypeEntry.new(:arrayEntry, val)
313
+ end
314
+
315
+ def mapEntry(val)
316
+ TTypeEntry.new(:mapEntry, val)
317
+ end
318
+
319
+ def structEntry(val)
320
+ TTypeEntry.new(:structEntry, val)
321
+ end
322
+
323
+ def unionEntry(val)
324
+ TTypeEntry.new(:unionEntry, val)
325
+ end
326
+
327
+ def userDefinedTypeEntry(val)
328
+ TTypeEntry.new(:userDefinedTypeEntry, val)
329
+ end
330
+ end
331
+
332
+ PRIMITIVEENTRY = 1
333
+ ARRAYENTRY = 2
334
+ MAPENTRY = 3
335
+ STRUCTENTRY = 4
336
+ UNIONENTRY = 5
337
+ USERDEFINEDTYPEENTRY = 6
338
+
339
+ FIELDS = {
340
+ PRIMITIVEENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'primitiveEntry', :class => ::Hive2::Thrift::TPrimitiveTypeEntry},
341
+ ARRAYENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'arrayEntry', :class => ::Hive2::Thrift::TArrayTypeEntry},
342
+ MAPENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'mapEntry', :class => ::Hive2::Thrift::TMapTypeEntry},
343
+ STRUCTENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'structEntry', :class => ::Hive2::Thrift::TStructTypeEntry},
344
+ UNIONENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'unionEntry', :class => ::Hive2::Thrift::TUnionTypeEntry},
345
+ USERDEFINEDTYPEENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'userDefinedTypeEntry', :class => ::Hive2::Thrift::TUserDefinedTypeEntry}
346
+ }
347
+
348
+ def struct_fields; FIELDS; end
349
+
350
+ def validate
351
+ raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil?
352
+ end
353
+
354
+ ::Thrift::Union.generate_accessors self
355
+ end
356
+
357
+ class TTypeDesc
358
+ include ::Thrift::Struct, ::Thrift::Struct_Union
359
+ TYPES = 1
360
+
361
+ FIELDS = {
362
+ TYPES => {:type => ::Thrift::Types::LIST, :name => 'types', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Hive2::Thrift::TTypeEntry}}
363
+ }
364
+
365
+ def struct_fields; FIELDS; end
366
+
367
+ def validate
368
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field types is unset!') unless @types
369
+ end
370
+
371
+ ::Thrift::Struct.generate_accessors self
372
+ end
373
+
374
+ class TColumnDesc
375
+ include ::Thrift::Struct, ::Thrift::Struct_Union
376
+ COLUMNNAME = 1
377
+ TYPEDESC = 2
378
+ POSITION = 3
379
+ COMMENT = 4
380
+
381
+ FIELDS = {
382
+ COLUMNNAME => {:type => ::Thrift::Types::STRING, :name => 'columnName'},
383
+ TYPEDESC => {:type => ::Thrift::Types::STRUCT, :name => 'typeDesc', :class => ::Hive2::Thrift::TTypeDesc},
384
+ POSITION => {:type => ::Thrift::Types::I32, :name => 'position'},
385
+ COMMENT => {:type => ::Thrift::Types::STRING, :name => 'comment', :optional => true}
386
+ }
387
+
388
+ def struct_fields; FIELDS; end
389
+
390
+ def validate
391
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columnName is unset!') unless @columnName
392
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field typeDesc is unset!') unless @typeDesc
393
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field position is unset!') unless @position
394
+ end
395
+
396
+ ::Thrift::Struct.generate_accessors self
397
+ end
398
+
399
+ class TTableSchema
400
+ include ::Thrift::Struct, ::Thrift::Struct_Union
401
+ COLUMNS = 1
402
+
403
+ FIELDS = {
404
+ COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Hive2::Thrift::TColumnDesc}}
405
+ }
406
+
407
+ def struct_fields; FIELDS; end
408
+
409
+ def validate
410
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns
411
+ end
412
+
413
+ ::Thrift::Struct.generate_accessors self
414
+ end
415
+
416
+ class TBoolValue
417
+ include ::Thrift::Struct, ::Thrift::Struct_Union
418
+ VALUE = 1
419
+
420
+ FIELDS = {
421
+ VALUE => {:type => ::Thrift::Types::BOOL, :name => 'value', :optional => true}
422
+ }
423
+
424
+ def struct_fields; FIELDS; end
425
+
426
+ def validate
427
+ end
428
+
429
+ ::Thrift::Struct.generate_accessors self
430
+ end
431
+
432
+ class TByteValue
433
+ include ::Thrift::Struct, ::Thrift::Struct_Union
434
+ VALUE = 1
435
+
436
+ FIELDS = {
437
+ VALUE => {:type => ::Thrift::Types::BYTE, :name => 'value', :optional => true}
438
+ }
439
+
440
+ def struct_fields; FIELDS; end
441
+
442
+ def validate
443
+ end
444
+
445
+ ::Thrift::Struct.generate_accessors self
446
+ end
447
+
448
+ class TI16Value
449
+ include ::Thrift::Struct, ::Thrift::Struct_Union
450
+ VALUE = 1
451
+
452
+ FIELDS = {
453
+ VALUE => {:type => ::Thrift::Types::I16, :name => 'value', :optional => true}
454
+ }
455
+
456
+ def struct_fields; FIELDS; end
457
+
458
+ def validate
459
+ end
460
+
461
+ ::Thrift::Struct.generate_accessors self
462
+ end
463
+
464
+ class TI32Value
465
+ include ::Thrift::Struct, ::Thrift::Struct_Union
466
+ VALUE = 1
467
+
468
+ FIELDS = {
469
+ VALUE => {:type => ::Thrift::Types::I32, :name => 'value', :optional => true}
470
+ }
471
+
472
+ def struct_fields; FIELDS; end
473
+
474
+ def validate
475
+ end
476
+
477
+ ::Thrift::Struct.generate_accessors self
478
+ end
479
+
480
+ class TI64Value
481
+ include ::Thrift::Struct, ::Thrift::Struct_Union
482
+ VALUE = 1
483
+
484
+ FIELDS = {
485
+ VALUE => {:type => ::Thrift::Types::I64, :name => 'value', :optional => true}
486
+ }
487
+
488
+ def struct_fields; FIELDS; end
489
+
490
+ def validate
491
+ end
492
+
493
+ ::Thrift::Struct.generate_accessors self
494
+ end
495
+
496
+ class TDoubleValue
497
+ include ::Thrift::Struct, ::Thrift::Struct_Union
498
+ VALUE = 1
499
+
500
+ FIELDS = {
501
+ VALUE => {:type => ::Thrift::Types::DOUBLE, :name => 'value', :optional => true}
502
+ }
503
+
504
+ def struct_fields; FIELDS; end
505
+
506
+ def validate
507
+ end
508
+
509
+ ::Thrift::Struct.generate_accessors self
510
+ end
511
+
512
+ class TStringValue
513
+ include ::Thrift::Struct, ::Thrift::Struct_Union
514
+ VALUE = 1
515
+
516
+ FIELDS = {
517
+ VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :optional => true}
518
+ }
519
+
520
+ def struct_fields; FIELDS; end
521
+
522
+ def validate
523
+ end
524
+
525
+ ::Thrift::Struct.generate_accessors self
526
+ end
527
+
528
+ class TColumnValue < ::Thrift::Union
529
+ include ::Thrift::Struct_Union
530
+ class << self
531
+ def boolVal(val)
532
+ TColumnValue.new(:boolVal, val)
533
+ end
534
+
535
+ def byteVal(val)
536
+ TColumnValue.new(:byteVal, val)
537
+ end
538
+
539
+ def i16Val(val)
540
+ TColumnValue.new(:i16Val, val)
541
+ end
542
+
543
+ def i32Val(val)
544
+ TColumnValue.new(:i32Val, val)
545
+ end
546
+
547
+ def i64Val(val)
548
+ TColumnValue.new(:i64Val, val)
549
+ end
550
+
551
+ def doubleVal(val)
552
+ TColumnValue.new(:doubleVal, val)
553
+ end
554
+
555
+ def stringVal(val)
556
+ TColumnValue.new(:stringVal, val)
557
+ end
558
+ end
559
+
560
+ BOOLVAL = 1
561
+ BYTEVAL = 2
562
+ I16VAL = 3
563
+ I32VAL = 4
564
+ I64VAL = 5
565
+ DOUBLEVAL = 6
566
+ STRINGVAL = 7
567
+
568
+ FIELDS = {
569
+ BOOLVAL => {:type => ::Thrift::Types::STRUCT, :name => 'boolVal', :class => ::Hive2::Thrift::TBoolValue},
570
+ BYTEVAL => {:type => ::Thrift::Types::STRUCT, :name => 'byteVal', :class => ::Hive2::Thrift::TByteValue},
571
+ I16VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i16Val', :class => ::Hive2::Thrift::TI16Value},
572
+ I32VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i32Val', :class => ::Hive2::Thrift::TI32Value},
573
+ I64VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i64Val', :class => ::Hive2::Thrift::TI64Value},
574
+ DOUBLEVAL => {:type => ::Thrift::Types::STRUCT, :name => 'doubleVal', :class => ::Hive2::Thrift::TDoubleValue},
575
+ STRINGVAL => {:type => ::Thrift::Types::STRUCT, :name => 'stringVal', :class => ::Hive2::Thrift::TStringValue}
576
+ }
577
+
578
+ def struct_fields; FIELDS; end
579
+
580
+ def validate
581
+ raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil?
582
+ end
583
+
584
+ ::Thrift::Union.generate_accessors self
585
+ end
586
+
587
+ class TRow
588
+ include ::Thrift::Struct, ::Thrift::Struct_Union
589
+ COLVALS = 1
590
+
591
+ FIELDS = {
592
+ COLVALS => {:type => ::Thrift::Types::LIST, :name => 'colVals', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Hive2::Thrift::TColumnValue}}
593
+ }
594
+
595
+ def struct_fields; FIELDS; end
596
+
597
+ def validate
598
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colVals is unset!') unless @colVals
599
+ end
600
+
601
+ ::Thrift::Struct.generate_accessors self
602
+ end
603
+
604
+ class TBoolColumn
605
+ include ::Thrift::Struct, ::Thrift::Struct_Union
606
+ VALUES = 1
607
+ NULLS = 2
608
+
609
+ FIELDS = {
610
+ VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::BOOL}},
611
+ NULLS => {:type => ::Thrift::Types::STRING, :name => 'nulls', :binary => true}
612
+ }
613
+
614
+ def struct_fields; FIELDS; end
615
+
616
+ def validate
617
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field values is unset!') unless @values
618
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nulls is unset!') unless @nulls
619
+ end
620
+
621
+ ::Thrift::Struct.generate_accessors self
622
+ end
623
+
624
+ class TByteColumn
625
+ include ::Thrift::Struct, ::Thrift::Struct_Union
626
+ VALUES = 1
627
+ NULLS = 2
628
+
629
+ FIELDS = {
630
+ VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::BYTE}},
631
+ NULLS => {:type => ::Thrift::Types::STRING, :name => 'nulls', :binary => true}
632
+ }
633
+
634
+ def struct_fields; FIELDS; end
635
+
636
+ def validate
637
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field values is unset!') unless @values
638
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nulls is unset!') unless @nulls
639
+ end
640
+
641
+ ::Thrift::Struct.generate_accessors self
642
+ end
643
+
644
+ class TI16Column
645
+ include ::Thrift::Struct, ::Thrift::Struct_Union
646
+ VALUES = 1
647
+ NULLS = 2
648
+
649
+ FIELDS = {
650
+ VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::I16}},
651
+ NULLS => {:type => ::Thrift::Types::STRING, :name => 'nulls', :binary => true}
652
+ }
653
+
654
+ def struct_fields; FIELDS; end
655
+
656
+ def validate
657
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field values is unset!') unless @values
658
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nulls is unset!') unless @nulls
659
+ end
660
+
661
+ ::Thrift::Struct.generate_accessors self
662
+ end
663
+
664
+ class TI32Column
665
+ include ::Thrift::Struct, ::Thrift::Struct_Union
666
+ VALUES = 1
667
+ NULLS = 2
668
+
669
+ FIELDS = {
670
+ VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::I32}},
671
+ NULLS => {:type => ::Thrift::Types::STRING, :name => 'nulls', :binary => true}
672
+ }
673
+
674
+ def struct_fields; FIELDS; end
675
+
676
+ def validate
677
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field values is unset!') unless @values
678
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nulls is unset!') unless @nulls
679
+ end
680
+
681
+ ::Thrift::Struct.generate_accessors self
682
+ end
683
+
684
+ class TI64Column
685
+ include ::Thrift::Struct, ::Thrift::Struct_Union
686
+ VALUES = 1
687
+ NULLS = 2
688
+
689
+ FIELDS = {
690
+ VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::I64}},
691
+ NULLS => {:type => ::Thrift::Types::STRING, :name => 'nulls', :binary => true}
692
+ }
693
+
694
+ def struct_fields; FIELDS; end
695
+
696
+ def validate
697
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field values is unset!') unless @values
698
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nulls is unset!') unless @nulls
699
+ end
700
+
701
+ ::Thrift::Struct.generate_accessors self
702
+ end
703
+
704
+ class TDoubleColumn
705
+ include ::Thrift::Struct, ::Thrift::Struct_Union
706
+ VALUES = 1
707
+ NULLS = 2
708
+
709
+ FIELDS = {
710
+ VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::DOUBLE}},
711
+ NULLS => {:type => ::Thrift::Types::STRING, :name => 'nulls', :binary => true}
712
+ }
713
+
714
+ def struct_fields; FIELDS; end
715
+
716
+ def validate
717
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field values is unset!') unless @values
718
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nulls is unset!') unless @nulls
719
+ end
720
+
721
+ ::Thrift::Struct.generate_accessors self
722
+ end
723
+
724
+ class TStringColumn
725
+ include ::Thrift::Struct, ::Thrift::Struct_Union
726
+ VALUES = 1
727
+ NULLS = 2
728
+
729
+ FIELDS = {
730
+ VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::STRING}},
731
+ NULLS => {:type => ::Thrift::Types::STRING, :name => 'nulls', :binary => true}
732
+ }
733
+
734
+ def struct_fields; FIELDS; end
735
+
736
+ def validate
737
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field values is unset!') unless @values
738
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nulls is unset!') unless @nulls
739
+ end
740
+
741
+ ::Thrift::Struct.generate_accessors self
742
+ end
743
+
744
+ class TBinaryColumn
745
+ include ::Thrift::Struct, ::Thrift::Struct_Union
746
+ VALUES = 1
747
+ NULLS = 2
748
+
749
+ FIELDS = {
750
+ VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::STRING, :binary => true}},
751
+ NULLS => {:type => ::Thrift::Types::STRING, :name => 'nulls', :binary => true}
752
+ }
753
+
754
+ def struct_fields; FIELDS; end
755
+
756
+ def validate
757
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field values is unset!') unless @values
758
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nulls is unset!') unless @nulls
759
+ end
760
+
761
+ ::Thrift::Struct.generate_accessors self
762
+ end
763
+
764
+ class TColumn < ::Thrift::Union
765
+ include ::Thrift::Struct_Union
766
+ class << self
767
+ def boolVal(val)
768
+ TColumn.new(:boolVal, val)
769
+ end
770
+
771
+ def byteVal(val)
772
+ TColumn.new(:byteVal, val)
773
+ end
774
+
775
+ def i16Val(val)
776
+ TColumn.new(:i16Val, val)
777
+ end
778
+
779
+ def i32Val(val)
780
+ TColumn.new(:i32Val, val)
781
+ end
782
+
783
+ def i64Val(val)
784
+ TColumn.new(:i64Val, val)
785
+ end
786
+
787
+ def doubleVal(val)
788
+ TColumn.new(:doubleVal, val)
789
+ end
790
+
791
+ def stringVal(val)
792
+ TColumn.new(:stringVal, val)
793
+ end
794
+
795
+ def binaryVal(val)
796
+ TColumn.new(:binaryVal, val)
797
+ end
798
+ end
799
+
800
+ BOOLVAL = 1
801
+ BYTEVAL = 2
802
+ I16VAL = 3
803
+ I32VAL = 4
804
+ I64VAL = 5
805
+ DOUBLEVAL = 6
806
+ STRINGVAL = 7
807
+ BINARYVAL = 8
808
+
809
+ FIELDS = {
810
+ BOOLVAL => {:type => ::Thrift::Types::STRUCT, :name => 'boolVal', :class => ::Hive2::Thrift::TBoolColumn},
811
+ BYTEVAL => {:type => ::Thrift::Types::STRUCT, :name => 'byteVal', :class => ::Hive2::Thrift::TByteColumn},
812
+ I16VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i16Val', :class => ::Hive2::Thrift::TI16Column},
813
+ I32VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i32Val', :class => ::Hive2::Thrift::TI32Column},
814
+ I64VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i64Val', :class => ::Hive2::Thrift::TI64Column},
815
+ DOUBLEVAL => {:type => ::Thrift::Types::STRUCT, :name => 'doubleVal', :class => ::Hive2::Thrift::TDoubleColumn},
816
+ STRINGVAL => {:type => ::Thrift::Types::STRUCT, :name => 'stringVal', :class => ::Hive2::Thrift::TStringColumn},
817
+ BINARYVAL => {:type => ::Thrift::Types::STRUCT, :name => 'binaryVal', :class => ::Hive2::Thrift::TBinaryColumn}
818
+ }
819
+
820
+ def struct_fields; FIELDS; end
821
+
822
+ def validate
823
+ raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil?
824
+ end
825
+
826
+ ::Thrift::Union.generate_accessors self
827
+ end
828
+
829
+ class TRowSet
830
+ include ::Thrift::Struct, ::Thrift::Struct_Union
831
+ STARTROWOFFSET = 1
832
+ ROWS = 2
833
+ COLUMNS = 3
834
+
835
+ FIELDS = {
836
+ STARTROWOFFSET => {:type => ::Thrift::Types::I64, :name => 'startRowOffset'},
837
+ ROWS => {:type => ::Thrift::Types::LIST, :name => 'rows', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Hive2::Thrift::TRow}},
838
+ COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Hive2::Thrift::TColumn}, :optional => true}
839
+ }
840
+
841
+ def struct_fields; FIELDS; end
842
+
843
+ def validate
844
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field startRowOffset is unset!') unless @startRowOffset
845
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field rows is unset!') unless @rows
846
+ end
847
+
848
+ ::Thrift::Struct.generate_accessors self
849
+ end
850
+
851
+ class TStatus
852
+ include ::Thrift::Struct, ::Thrift::Struct_Union
853
+ STATUSCODE = 1
854
+ INFOMESSAGES = 2
855
+ SQLSTATE = 3
856
+ ERRORCODE = 4
857
+ ERRORMESSAGE = 5
858
+
859
+ FIELDS = {
860
+ STATUSCODE => {:type => ::Thrift::Types::I32, :name => 'statusCode', :enum_class => ::Hive2::Thrift::TStatusCode},
861
+ INFOMESSAGES => {:type => ::Thrift::Types::LIST, :name => 'infoMessages', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
862
+ SQLSTATE => {:type => ::Thrift::Types::STRING, :name => 'sqlState', :optional => true},
863
+ ERRORCODE => {:type => ::Thrift::Types::I32, :name => 'errorCode', :optional => true},
864
+ ERRORMESSAGE => {:type => ::Thrift::Types::STRING, :name => 'errorMessage', :optional => true}
865
+ }
866
+
867
+ def struct_fields; FIELDS; end
868
+
869
+ def validate
870
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statusCode is unset!') unless @statusCode
871
+ unless @statusCode.nil? || ::Hive2::Thrift::TStatusCode::VALID_VALUES.include?(@statusCode)
872
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field statusCode!')
873
+ end
874
+ end
875
+
876
+ ::Thrift::Struct.generate_accessors self
877
+ end
878
+
879
+ class THandleIdentifier
880
+ include ::Thrift::Struct, ::Thrift::Struct_Union
881
+ GUID = 1
882
+ SECRET = 2
883
+
884
+ FIELDS = {
885
+ GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :binary => true},
886
+ SECRET => {:type => ::Thrift::Types::STRING, :name => 'secret', :binary => true}
887
+ }
888
+
889
+ def struct_fields; FIELDS; end
890
+
891
+ def validate
892
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field guid is unset!') unless @guid
893
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field secret is unset!') unless @secret
894
+ end
895
+
896
+ ::Thrift::Struct.generate_accessors self
897
+ end
898
+
899
+ class TSessionHandle
900
+ include ::Thrift::Struct, ::Thrift::Struct_Union
901
+ SESSIONID = 1
902
+
903
+ FIELDS = {
904
+ SESSIONID => {:type => ::Thrift::Types::STRUCT, :name => 'sessionId', :class => ::Hive2::Thrift::THandleIdentifier}
905
+ }
906
+
907
+ def struct_fields; FIELDS; end
908
+
909
+ def validate
910
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionId is unset!') unless @sessionId
911
+ end
912
+
913
+ ::Thrift::Struct.generate_accessors self
914
+ end
915
+
916
+ class TOperationHandle
917
+ include ::Thrift::Struct, ::Thrift::Struct_Union
918
+ OPERATIONID = 1
919
+ OPERATIONTYPE = 2
920
+ HASRESULTSET = 3
921
+ MODIFIEDROWCOUNT = 4
922
+
923
+ FIELDS = {
924
+ OPERATIONID => {:type => ::Thrift::Types::STRUCT, :name => 'operationId', :class => ::Hive2::Thrift::THandleIdentifier},
925
+ OPERATIONTYPE => {:type => ::Thrift::Types::I32, :name => 'operationType', :enum_class => ::Hive2::Thrift::TOperationType},
926
+ HASRESULTSET => {:type => ::Thrift::Types::BOOL, :name => 'hasResultSet'},
927
+ MODIFIEDROWCOUNT => {:type => ::Thrift::Types::DOUBLE, :name => 'modifiedRowCount', :optional => true}
928
+ }
929
+
930
+ def struct_fields; FIELDS; end
931
+
932
+ def validate
933
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field operationId is unset!') unless @operationId
934
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field operationType is unset!') unless @operationType
935
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hasResultSet is unset!') if @hasResultSet.nil?
936
+ unless @operationType.nil? || ::Hive2::Thrift::TOperationType::VALID_VALUES.include?(@operationType)
937
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operationType!')
938
+ end
939
+ end
940
+
941
+ ::Thrift::Struct.generate_accessors self
942
+ end
943
+
944
+ class TOpenSessionReq
945
+ include ::Thrift::Struct, ::Thrift::Struct_Union
946
+ CLIENT_PROTOCOL = 1
947
+ USERNAME = 2
948
+ PASSWORD = 3
949
+ CONFIGURATION = 4
950
+
951
+ FIELDS = {
952
+ CLIENT_PROTOCOL => {:type => ::Thrift::Types::I32, :name => 'client_protocol', :default => 5, :enum_class => ::Hive2::Thrift::TProtocolVersion},
953
+ USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
954
+ PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password', :optional => true},
955
+ CONFIGURATION => {:type => ::Thrift::Types::MAP, :name => 'configuration', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}
956
+ }
957
+
958
+ def struct_fields; FIELDS; end
959
+
960
+ def validate
961
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field client_protocol is unset!') unless @client_protocol
962
+ unless @client_protocol.nil? || ::Hive2::Thrift::TProtocolVersion::VALID_VALUES.include?(@client_protocol)
963
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field client_protocol!')
964
+ end
965
+ end
966
+
967
+ ::Thrift::Struct.generate_accessors self
968
+ end
969
+
970
+ class TOpenSessionResp
971
+ include ::Thrift::Struct, ::Thrift::Struct_Union
972
+ STATUS = 1
973
+ SERVERPROTOCOLVERSION = 2
974
+ SESSIONHANDLE = 3
975
+ CONFIGURATION = 4
976
+
977
+ FIELDS = {
978
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
979
+ SERVERPROTOCOLVERSION => {:type => ::Thrift::Types::I32, :name => 'serverProtocolVersion', :default => 5, :enum_class => ::Hive2::Thrift::TProtocolVersion},
980
+ SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle, :optional => true},
981
+ CONFIGURATION => {:type => ::Thrift::Types::MAP, :name => 'configuration', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}
982
+ }
983
+
984
+ def struct_fields; FIELDS; end
985
+
986
+ def validate
987
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
988
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field serverProtocolVersion is unset!') unless @serverProtocolVersion
989
+ unless @serverProtocolVersion.nil? || ::Hive2::Thrift::TProtocolVersion::VALID_VALUES.include?(@serverProtocolVersion)
990
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field serverProtocolVersion!')
991
+ end
992
+ end
993
+
994
+ ::Thrift::Struct.generate_accessors self
995
+ end
996
+
997
+ class TCloseSessionReq
998
+ include ::Thrift::Struct, ::Thrift::Struct_Union
999
+ SESSIONHANDLE = 1
1000
+
1001
+ FIELDS = {
1002
+ SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle}
1003
+ }
1004
+
1005
+ def struct_fields; FIELDS; end
1006
+
1007
+ def validate
1008
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
1009
+ end
1010
+
1011
+ ::Thrift::Struct.generate_accessors self
1012
+ end
1013
+
1014
+ class TCloseSessionResp
1015
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1016
+ STATUS = 1
1017
+
1018
+ FIELDS = {
1019
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus}
1020
+ }
1021
+
1022
+ def struct_fields; FIELDS; end
1023
+
1024
+ def validate
1025
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1026
+ end
1027
+
1028
+ ::Thrift::Struct.generate_accessors self
1029
+ end
1030
+
1031
+ class TGetInfoValue < ::Thrift::Union
1032
+ include ::Thrift::Struct_Union
1033
+ class << self
1034
+ def stringValue(val)
1035
+ TGetInfoValue.new(:stringValue, val)
1036
+ end
1037
+
1038
+ def smallIntValue(val)
1039
+ TGetInfoValue.new(:smallIntValue, val)
1040
+ end
1041
+
1042
+ def integerBitmask(val)
1043
+ TGetInfoValue.new(:integerBitmask, val)
1044
+ end
1045
+
1046
+ def integerFlag(val)
1047
+ TGetInfoValue.new(:integerFlag, val)
1048
+ end
1049
+
1050
+ def binaryValue(val)
1051
+ TGetInfoValue.new(:binaryValue, val)
1052
+ end
1053
+
1054
+ def lenValue(val)
1055
+ TGetInfoValue.new(:lenValue, val)
1056
+ end
1057
+ end
1058
+
1059
+ STRINGVALUE = 1
1060
+ SMALLINTVALUE = 2
1061
+ INTEGERBITMASK = 3
1062
+ INTEGERFLAG = 4
1063
+ BINARYVALUE = 5
1064
+ LENVALUE = 6
1065
+
1066
+ FIELDS = {
1067
+ STRINGVALUE => {:type => ::Thrift::Types::STRING, :name => 'stringValue'},
1068
+ SMALLINTVALUE => {:type => ::Thrift::Types::I16, :name => 'smallIntValue'},
1069
+ INTEGERBITMASK => {:type => ::Thrift::Types::I32, :name => 'integerBitmask'},
1070
+ INTEGERFLAG => {:type => ::Thrift::Types::I32, :name => 'integerFlag'},
1071
+ BINARYVALUE => {:type => ::Thrift::Types::I32, :name => 'binaryValue'},
1072
+ LENVALUE => {:type => ::Thrift::Types::I64, :name => 'lenValue'}
1073
+ }
1074
+
1075
+ def struct_fields; FIELDS; end
1076
+
1077
+ def validate
1078
+ raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil?
1079
+ end
1080
+
1081
+ ::Thrift::Union.generate_accessors self
1082
+ end
1083
+
1084
+ class TGetInfoReq
1085
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1086
+ SESSIONHANDLE = 1
1087
+ INFOTYPE = 2
1088
+
1089
+ FIELDS = {
1090
+ SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
1091
+ INFOTYPE => {:type => ::Thrift::Types::I32, :name => 'infoType', :enum_class => ::Hive2::Thrift::TGetInfoType}
1092
+ }
1093
+
1094
+ def struct_fields; FIELDS; end
1095
+
1096
+ def validate
1097
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
1098
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field infoType is unset!') unless @infoType
1099
+ unless @infoType.nil? || ::Hive2::Thrift::TGetInfoType::VALID_VALUES.include?(@infoType)
1100
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field infoType!')
1101
+ end
1102
+ end
1103
+
1104
+ ::Thrift::Struct.generate_accessors self
1105
+ end
1106
+
1107
+ class TGetInfoResp
1108
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1109
+ STATUS = 1
1110
+ INFOVALUE = 2
1111
+
1112
+ FIELDS = {
1113
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
1114
+ INFOVALUE => {:type => ::Thrift::Types::STRUCT, :name => 'infoValue', :class => ::Hive2::Thrift::TGetInfoValue}
1115
+ }
1116
+
1117
+ def struct_fields; FIELDS; end
1118
+
1119
+ def validate
1120
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1121
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field infoValue is unset!') unless @infoValue
1122
+ end
1123
+
1124
+ ::Thrift::Struct.generate_accessors self
1125
+ end
1126
+
1127
+ class TExecuteStatementReq
1128
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1129
+ SESSIONHANDLE = 1
1130
+ STATEMENT = 2
1131
+ CONFOVERLAY = 3
1132
+ RUNASYNC = 4
1133
+
1134
+ FIELDS = {
1135
+ SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
1136
+ STATEMENT => {:type => ::Thrift::Types::STRING, :name => 'statement'},
1137
+ CONFOVERLAY => {:type => ::Thrift::Types::MAP, :name => 'confOverlay', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true},
1138
+ RUNASYNC => {:type => ::Thrift::Types::BOOL, :name => 'runAsync', :default => false, :optional => true}
1139
+ }
1140
+
1141
+ def struct_fields; FIELDS; end
1142
+
1143
+ def validate
1144
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
1145
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statement is unset!') unless @statement
1146
+ end
1147
+
1148
+ ::Thrift::Struct.generate_accessors self
1149
+ end
1150
+
1151
+ class TExecuteStatementResp
1152
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1153
+ STATUS = 1
1154
+ OPERATIONHANDLE = 2
1155
+
1156
+ FIELDS = {
1157
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
1158
+ OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle, :optional => true}
1159
+ }
1160
+
1161
+ def struct_fields; FIELDS; end
1162
+
1163
+ def validate
1164
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1165
+ end
1166
+
1167
+ ::Thrift::Struct.generate_accessors self
1168
+ end
1169
+
1170
+ class TGetTypeInfoReq
1171
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1172
+ SESSIONHANDLE = 1
1173
+
1174
+ FIELDS = {
1175
+ SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle}
1176
+ }
1177
+
1178
+ def struct_fields; FIELDS; end
1179
+
1180
+ def validate
1181
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
1182
+ end
1183
+
1184
+ ::Thrift::Struct.generate_accessors self
1185
+ end
1186
+
1187
+ class TGetTypeInfoResp
1188
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1189
+ STATUS = 1
1190
+ OPERATIONHANDLE = 2
1191
+
1192
+ FIELDS = {
1193
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
1194
+ OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle, :optional => true}
1195
+ }
1196
+
1197
+ def struct_fields; FIELDS; end
1198
+
1199
+ def validate
1200
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1201
+ end
1202
+
1203
+ ::Thrift::Struct.generate_accessors self
1204
+ end
1205
+
1206
+ class TGetCatalogsReq
1207
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1208
+ SESSIONHANDLE = 1
1209
+
1210
+ FIELDS = {
1211
+ SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle}
1212
+ }
1213
+
1214
+ def struct_fields; FIELDS; end
1215
+
1216
+ def validate
1217
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
1218
+ end
1219
+
1220
+ ::Thrift::Struct.generate_accessors self
1221
+ end
1222
+
1223
+ class TGetCatalogsResp
1224
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1225
+ STATUS = 1
1226
+ OPERATIONHANDLE = 2
1227
+
1228
+ FIELDS = {
1229
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
1230
+ OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle, :optional => true}
1231
+ }
1232
+
1233
+ def struct_fields; FIELDS; end
1234
+
1235
+ def validate
1236
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1237
+ end
1238
+
1239
+ ::Thrift::Struct.generate_accessors self
1240
+ end
1241
+
1242
+ class TGetSchemasReq
1243
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1244
+ SESSIONHANDLE = 1
1245
+ CATALOGNAME = 2
1246
+ SCHEMANAME = 3
1247
+
1248
+ FIELDS = {
1249
+ SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
1250
+ CATALOGNAME => {:type => ::Thrift::Types::STRING, :name => 'catalogName', :optional => true},
1251
+ SCHEMANAME => {:type => ::Thrift::Types::STRING, :name => 'schemaName', :optional => true}
1252
+ }
1253
+
1254
+ def struct_fields; FIELDS; end
1255
+
1256
+ def validate
1257
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
1258
+ end
1259
+
1260
+ ::Thrift::Struct.generate_accessors self
1261
+ end
1262
+
1263
+ class TGetSchemasResp
1264
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1265
+ STATUS = 1
1266
+ OPERATIONHANDLE = 2
1267
+
1268
+ FIELDS = {
1269
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
1270
+ OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle, :optional => true}
1271
+ }
1272
+
1273
+ def struct_fields; FIELDS; end
1274
+
1275
+ def validate
1276
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1277
+ end
1278
+
1279
+ ::Thrift::Struct.generate_accessors self
1280
+ end
1281
+
1282
+ class TGetTablesReq
1283
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1284
+ SESSIONHANDLE = 1
1285
+ CATALOGNAME = 2
1286
+ SCHEMANAME = 3
1287
+ TABLENAME = 4
1288
+ TABLETYPES = 5
1289
+
1290
+ FIELDS = {
1291
+ SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
1292
+ CATALOGNAME => {:type => ::Thrift::Types::STRING, :name => 'catalogName', :optional => true},
1293
+ SCHEMANAME => {:type => ::Thrift::Types::STRING, :name => 'schemaName', :optional => true},
1294
+ TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :optional => true},
1295
+ TABLETYPES => {:type => ::Thrift::Types::LIST, :name => 'tableTypes', :element => {:type => ::Thrift::Types::STRING}, :optional => true}
1296
+ }
1297
+
1298
+ def struct_fields; FIELDS; end
1299
+
1300
+ def validate
1301
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
1302
+ end
1303
+
1304
+ ::Thrift::Struct.generate_accessors self
1305
+ end
1306
+
1307
+ class TGetTablesResp
1308
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1309
+ STATUS = 1
1310
+ OPERATIONHANDLE = 2
1311
+
1312
+ FIELDS = {
1313
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
1314
+ OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle, :optional => true}
1315
+ }
1316
+
1317
+ def struct_fields; FIELDS; end
1318
+
1319
+ def validate
1320
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1321
+ end
1322
+
1323
+ ::Thrift::Struct.generate_accessors self
1324
+ end
1325
+
1326
+ class TGetTableTypesReq
1327
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1328
+ SESSIONHANDLE = 1
1329
+
1330
+ FIELDS = {
1331
+ SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle}
1332
+ }
1333
+
1334
+ def struct_fields; FIELDS; end
1335
+
1336
+ def validate
1337
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
1338
+ end
1339
+
1340
+ ::Thrift::Struct.generate_accessors self
1341
+ end
1342
+
1343
+ class TGetTableTypesResp
1344
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1345
+ STATUS = 1
1346
+ OPERATIONHANDLE = 2
1347
+
1348
+ FIELDS = {
1349
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
1350
+ OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle, :optional => true}
1351
+ }
1352
+
1353
+ def struct_fields; FIELDS; end
1354
+
1355
+ def validate
1356
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1357
+ end
1358
+
1359
+ ::Thrift::Struct.generate_accessors self
1360
+ end
1361
+
1362
+ class TGetColumnsReq
1363
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1364
+ SESSIONHANDLE = 1
1365
+ CATALOGNAME = 2
1366
+ SCHEMANAME = 3
1367
+ TABLENAME = 4
1368
+ COLUMNNAME = 5
1369
+
1370
+ FIELDS = {
1371
+ SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
1372
+ CATALOGNAME => {:type => ::Thrift::Types::STRING, :name => 'catalogName', :optional => true},
1373
+ SCHEMANAME => {:type => ::Thrift::Types::STRING, :name => 'schemaName', :optional => true},
1374
+ TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :optional => true},
1375
+ COLUMNNAME => {:type => ::Thrift::Types::STRING, :name => 'columnName', :optional => true}
1376
+ }
1377
+
1378
+ def struct_fields; FIELDS; end
1379
+
1380
+ def validate
1381
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
1382
+ end
1383
+
1384
+ ::Thrift::Struct.generate_accessors self
1385
+ end
1386
+
1387
+ class TGetColumnsResp
1388
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1389
+ STATUS = 1
1390
+ OPERATIONHANDLE = 2
1391
+
1392
+ FIELDS = {
1393
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
1394
+ OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle, :optional => true}
1395
+ }
1396
+
1397
+ def struct_fields; FIELDS; end
1398
+
1399
+ def validate
1400
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1401
+ end
1402
+
1403
+ ::Thrift::Struct.generate_accessors self
1404
+ end
1405
+
1406
+ class TGetFunctionsReq
1407
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1408
+ SESSIONHANDLE = 1
1409
+ CATALOGNAME = 2
1410
+ SCHEMANAME = 3
1411
+ FUNCTIONNAME = 4
1412
+
1413
+ FIELDS = {
1414
+ SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
1415
+ CATALOGNAME => {:type => ::Thrift::Types::STRING, :name => 'catalogName', :optional => true},
1416
+ SCHEMANAME => {:type => ::Thrift::Types::STRING, :name => 'schemaName', :optional => true},
1417
+ FUNCTIONNAME => {:type => ::Thrift::Types::STRING, :name => 'functionName'}
1418
+ }
1419
+
1420
+ def struct_fields; FIELDS; end
1421
+
1422
+ def validate
1423
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
1424
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field functionName is unset!') unless @functionName
1425
+ end
1426
+
1427
+ ::Thrift::Struct.generate_accessors self
1428
+ end
1429
+
1430
+ class TGetFunctionsResp
1431
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1432
+ STATUS = 1
1433
+ OPERATIONHANDLE = 2
1434
+
1435
+ FIELDS = {
1436
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
1437
+ OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle, :optional => true}
1438
+ }
1439
+
1440
+ def struct_fields; FIELDS; end
1441
+
1442
+ def validate
1443
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1444
+ end
1445
+
1446
+ ::Thrift::Struct.generate_accessors self
1447
+ end
1448
+
1449
+ class TGetOperationStatusReq
1450
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1451
+ OPERATIONHANDLE = 1
1452
+
1453
+ FIELDS = {
1454
+ OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle}
1455
+ }
1456
+
1457
+ def struct_fields; FIELDS; end
1458
+
1459
+ def validate
1460
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field operationHandle is unset!') unless @operationHandle
1461
+ end
1462
+
1463
+ ::Thrift::Struct.generate_accessors self
1464
+ end
1465
+
1466
+ class TGetOperationStatusResp
1467
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1468
+ STATUS = 1
1469
+ OPERATIONSTATE = 2
1470
+ SQLSTATE = 3
1471
+ ERRORCODE = 4
1472
+ ERRORMESSAGE = 5
1473
+
1474
+ FIELDS = {
1475
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
1476
+ OPERATIONSTATE => {:type => ::Thrift::Types::I32, :name => 'operationState', :optional => true, :enum_class => ::Hive2::Thrift::TOperationState},
1477
+ SQLSTATE => {:type => ::Thrift::Types::STRING, :name => 'sqlState', :optional => true},
1478
+ ERRORCODE => {:type => ::Thrift::Types::I32, :name => 'errorCode', :optional => true},
1479
+ ERRORMESSAGE => {:type => ::Thrift::Types::STRING, :name => 'errorMessage', :optional => true}
1480
+ }
1481
+
1482
+ def struct_fields; FIELDS; end
1483
+
1484
+ def validate
1485
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1486
+ unless @operationState.nil? || ::Hive2::Thrift::TOperationState::VALID_VALUES.include?(@operationState)
1487
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operationState!')
1488
+ end
1489
+ end
1490
+
1491
+ ::Thrift::Struct.generate_accessors self
1492
+ end
1493
+
1494
+ class TCancelOperationReq
1495
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1496
+ OPERATIONHANDLE = 1
1497
+
1498
+ FIELDS = {
1499
+ OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle}
1500
+ }
1501
+
1502
+ def struct_fields; FIELDS; end
1503
+
1504
+ def validate
1505
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field operationHandle is unset!') unless @operationHandle
1506
+ end
1507
+
1508
+ ::Thrift::Struct.generate_accessors self
1509
+ end
1510
+
1511
+ class TCancelOperationResp
1512
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1513
+ STATUS = 1
1514
+
1515
+ FIELDS = {
1516
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus}
1517
+ }
1518
+
1519
+ def struct_fields; FIELDS; end
1520
+
1521
+ def validate
1522
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1523
+ end
1524
+
1525
+ ::Thrift::Struct.generate_accessors self
1526
+ end
1527
+
1528
+ class TCloseOperationReq
1529
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1530
+ OPERATIONHANDLE = 1
1531
+
1532
+ FIELDS = {
1533
+ OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle}
1534
+ }
1535
+
1536
+ def struct_fields; FIELDS; end
1537
+
1538
+ def validate
1539
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field operationHandle is unset!') unless @operationHandle
1540
+ end
1541
+
1542
+ ::Thrift::Struct.generate_accessors self
1543
+ end
1544
+
1545
+ class TCloseOperationResp
1546
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1547
+ STATUS = 1
1548
+
1549
+ FIELDS = {
1550
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus}
1551
+ }
1552
+
1553
+ def struct_fields; FIELDS; end
1554
+
1555
+ def validate
1556
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1557
+ end
1558
+
1559
+ ::Thrift::Struct.generate_accessors self
1560
+ end
1561
+
1562
+ class TGetResultSetMetadataReq
1563
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1564
+ OPERATIONHANDLE = 1
1565
+
1566
+ FIELDS = {
1567
+ OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle}
1568
+ }
1569
+
1570
+ def struct_fields; FIELDS; end
1571
+
1572
+ def validate
1573
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field operationHandle is unset!') unless @operationHandle
1574
+ end
1575
+
1576
+ ::Thrift::Struct.generate_accessors self
1577
+ end
1578
+
1579
+ class TGetResultSetMetadataResp
1580
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1581
+ STATUS = 1
1582
+ SCHEMA = 2
1583
+
1584
+ FIELDS = {
1585
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
1586
+ SCHEMA => {:type => ::Thrift::Types::STRUCT, :name => 'schema', :class => ::Hive2::Thrift::TTableSchema, :optional => true}
1587
+ }
1588
+
1589
+ def struct_fields; FIELDS; end
1590
+
1591
+ def validate
1592
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1593
+ end
1594
+
1595
+ ::Thrift::Struct.generate_accessors self
1596
+ end
1597
+
1598
+ class TFetchResultsReq
1599
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1600
+ OPERATIONHANDLE = 1
1601
+ ORIENTATION = 2
1602
+ MAXROWS = 3
1603
+
1604
+ FIELDS = {
1605
+ OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle},
1606
+ ORIENTATION => {:type => ::Thrift::Types::I32, :name => 'orientation', :default => 0, :enum_class => ::Hive2::Thrift::TFetchOrientation},
1607
+ MAXROWS => {:type => ::Thrift::Types::I64, :name => 'maxRows'}
1608
+ }
1609
+
1610
+ def struct_fields; FIELDS; end
1611
+
1612
+ def validate
1613
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field operationHandle is unset!') unless @operationHandle
1614
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field orientation is unset!') unless @orientation
1615
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field maxRows is unset!') unless @maxRows
1616
+ unless @orientation.nil? || ::Hive2::Thrift::TFetchOrientation::VALID_VALUES.include?(@orientation)
1617
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field orientation!')
1618
+ end
1619
+ end
1620
+
1621
+ ::Thrift::Struct.generate_accessors self
1622
+ end
1623
+
1624
+ class TFetchResultsResp
1625
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1626
+ STATUS = 1
1627
+ HASMOREROWS = 2
1628
+ RESULTS = 3
1629
+
1630
+ FIELDS = {
1631
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
1632
+ HASMOREROWS => {:type => ::Thrift::Types::BOOL, :name => 'hasMoreRows', :optional => true},
1633
+ RESULTS => {:type => ::Thrift::Types::STRUCT, :name => 'results', :class => ::Hive2::Thrift::TRowSet, :optional => true}
1634
+ }
1635
+
1636
+ def struct_fields; FIELDS; end
1637
+
1638
+ def validate
1639
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1640
+ end
1641
+
1642
+ ::Thrift::Struct.generate_accessors self
1643
+ end
1644
+
1645
+ class TGetDelegationTokenReq
1646
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1647
+ SESSIONHANDLE = 1
1648
+ OWNER = 2
1649
+ RENEWER = 3
1650
+
1651
+ FIELDS = {
1652
+ SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
1653
+ OWNER => {:type => ::Thrift::Types::STRING, :name => 'owner'},
1654
+ RENEWER => {:type => ::Thrift::Types::STRING, :name => 'renewer'}
1655
+ }
1656
+
1657
+ def struct_fields; FIELDS; end
1658
+
1659
+ def validate
1660
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
1661
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field owner is unset!') unless @owner
1662
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field renewer is unset!') unless @renewer
1663
+ end
1664
+
1665
+ ::Thrift::Struct.generate_accessors self
1666
+ end
1667
+
1668
+ class TGetDelegationTokenResp
1669
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1670
+ STATUS = 1
1671
+ DELEGATIONTOKEN = 2
1672
+
1673
+ FIELDS = {
1674
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
1675
+ DELEGATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'delegationToken', :optional => true}
1676
+ }
1677
+
1678
+ def struct_fields; FIELDS; end
1679
+
1680
+ def validate
1681
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1682
+ end
1683
+
1684
+ ::Thrift::Struct.generate_accessors self
1685
+ end
1686
+
1687
+ class TCancelDelegationTokenReq
1688
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1689
+ SESSIONHANDLE = 1
1690
+ DELEGATIONTOKEN = 2
1691
+
1692
+ FIELDS = {
1693
+ SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
1694
+ DELEGATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'delegationToken'}
1695
+ }
1696
+
1697
+ def struct_fields; FIELDS; end
1698
+
1699
+ def validate
1700
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
1701
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field delegationToken is unset!') unless @delegationToken
1702
+ end
1703
+
1704
+ ::Thrift::Struct.generate_accessors self
1705
+ end
1706
+
1707
+ class TCancelDelegationTokenResp
1708
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1709
+ STATUS = 1
1710
+
1711
+ FIELDS = {
1712
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus}
1713
+ }
1714
+
1715
+ def struct_fields; FIELDS; end
1716
+
1717
+ def validate
1718
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1719
+ end
1720
+
1721
+ ::Thrift::Struct.generate_accessors self
1722
+ end
1723
+
1724
+ class TRenewDelegationTokenReq
1725
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1726
+ SESSIONHANDLE = 1
1727
+ DELEGATIONTOKEN = 2
1728
+
1729
+ FIELDS = {
1730
+ SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
1731
+ DELEGATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'delegationToken'}
1732
+ }
1733
+
1734
+ def struct_fields; FIELDS; end
1735
+
1736
+ def validate
1737
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
1738
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field delegationToken is unset!') unless @delegationToken
1739
+ end
1740
+
1741
+ ::Thrift::Struct.generate_accessors self
1742
+ end
1743
+
1744
+ class TRenewDelegationTokenResp
1745
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1746
+ STATUS = 1
1747
+
1748
+ FIELDS = {
1749
+ STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus}
1750
+ }
1751
+
1752
+ def struct_fields; FIELDS; end
1753
+
1754
+ def validate
1755
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
1756
+ end
1757
+
1758
+ ::Thrift::Struct.generate_accessors self
1759
+ end
1760
+
1761
+ end
1762
+ end