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