sequel-impala 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG +16 -0
- data/LICENSE +2 -1
- data/README.md +45 -0
- data/lib/rbhive.rb +8 -0
- data/lib/rbhive/connection.rb +150 -0
- data/lib/rbhive/explain_result.rb +46 -0
- data/lib/rbhive/result_set.rb +37 -0
- data/lib/rbhive/schema_definition.rb +86 -0
- data/lib/rbhive/t_c_l_i_connection.rb +464 -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/table_schema.rb +122 -0
- data/lib/rbhive/version.rb +3 -0
- data/lib/sequel/adapters/impala.rb +13 -1
- data/lib/sequel/adapters/rbhive.rb +174 -0
- data/lib/sequel/adapters/shared/impala.rb +11 -3
- data/lib/sequel/extensions/csv_to_parquet.rb +68 -14
- data/lib/thrift/facebook_service.rb +700 -0
- data/lib/thrift/fb303_constants.rb +9 -0
- data/lib/thrift/fb303_types.rb +19 -0
- data/lib/thrift/hive_metastore_constants.rb +41 -0
- data/lib/thrift/hive_metastore_types.rb +630 -0
- data/lib/thrift/hive_service_constants.rb +13 -0
- data/lib/thrift/hive_service_types.rb +72 -0
- data/lib/thrift/queryplan_constants.rb +13 -0
- data/lib/thrift/queryplan_types.rb +261 -0
- data/lib/thrift/sasl_client_transport.rb +161 -0
- data/lib/thrift/serde_constants.rb +92 -0
- data/lib/thrift/serde_types.rb +7 -0
- data/lib/thrift/t_c_l_i_service.rb +1054 -0
- data/lib/thrift/t_c_l_i_service_constants.rb +72 -0
- data/lib/thrift/t_c_l_i_service_types.rb +1768 -0
- data/lib/thrift/thrift_hive.rb +508 -0
- data/lib/thrift/thrift_hive_metastore.rb +3856 -0
- data/spec/impala_test.rb +6 -1
- metadata +53 -25
- data/README.rdoc +0 -39
@@ -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,1768 @@
|
|
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
|
+
MECHANISM = 4
|
950
|
+
REMOTE_HOST = 5
|
951
|
+
REMOTE_PRINCIPAL = 6
|
952
|
+
CONFIGURATION = 7
|
953
|
+
|
954
|
+
FIELDS = {
|
955
|
+
CLIENT_PROTOCOL => {:type => ::Thrift::Types::I32, :name => 'client_protocol', :default => 5, :enum_class => ::Hive2::Thrift::TProtocolVersion},
|
956
|
+
USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
|
957
|
+
PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password', :optional => true},
|
958
|
+
MECHANISM => {:type => ::Thrift::Types::STRING, :name => 'mechanism', :optional => true},
|
959
|
+
REMOTE_HOST => {:type => ::Thrift::Types::STRING, :name => 'remote_host', :optional => true},
|
960
|
+
REMOTE_PRINCIPAL => {:type => ::Thrift::Types::STRING, :name => 'remote_principal', :optional => true},
|
961
|
+
CONFIGURATION => {:type => ::Thrift::Types::MAP, :name => 'configuration', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}
|
962
|
+
}
|
963
|
+
|
964
|
+
def struct_fields; FIELDS; end
|
965
|
+
|
966
|
+
def validate
|
967
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field client_protocol is unset!') unless @client_protocol
|
968
|
+
unless @client_protocol.nil? || ::Hive2::Thrift::TProtocolVersion::VALID_VALUES.include?(@client_protocol)
|
969
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field client_protocol!')
|
970
|
+
end
|
971
|
+
end
|
972
|
+
|
973
|
+
::Thrift::Struct.generate_accessors self
|
974
|
+
end
|
975
|
+
|
976
|
+
class TOpenSessionResp
|
977
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
978
|
+
STATUS = 1
|
979
|
+
SERVERPROTOCOLVERSION = 2
|
980
|
+
SESSIONHANDLE = 3
|
981
|
+
CONFIGURATION = 4
|
982
|
+
|
983
|
+
FIELDS = {
|
984
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
|
985
|
+
SERVERPROTOCOLVERSION => {:type => ::Thrift::Types::I32, :name => 'serverProtocolVersion', :default => 5, :enum_class => ::Hive2::Thrift::TProtocolVersion},
|
986
|
+
SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle, :optional => true},
|
987
|
+
CONFIGURATION => {:type => ::Thrift::Types::MAP, :name => 'configuration', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :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
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field serverProtocolVersion is unset!') unless @serverProtocolVersion
|
995
|
+
unless @serverProtocolVersion.nil? || ::Hive2::Thrift::TProtocolVersion::VALID_VALUES.include?(@serverProtocolVersion)
|
996
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field serverProtocolVersion!')
|
997
|
+
end
|
998
|
+
end
|
999
|
+
|
1000
|
+
::Thrift::Struct.generate_accessors self
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
class TCloseSessionReq
|
1004
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1005
|
+
SESSIONHANDLE = 1
|
1006
|
+
|
1007
|
+
FIELDS = {
|
1008
|
+
SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle}
|
1009
|
+
}
|
1010
|
+
|
1011
|
+
def struct_fields; FIELDS; end
|
1012
|
+
|
1013
|
+
def validate
|
1014
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
|
1015
|
+
end
|
1016
|
+
|
1017
|
+
::Thrift::Struct.generate_accessors self
|
1018
|
+
end
|
1019
|
+
|
1020
|
+
class TCloseSessionResp
|
1021
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1022
|
+
STATUS = 1
|
1023
|
+
|
1024
|
+
FIELDS = {
|
1025
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus}
|
1026
|
+
}
|
1027
|
+
|
1028
|
+
def struct_fields; FIELDS; end
|
1029
|
+
|
1030
|
+
def validate
|
1031
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1032
|
+
end
|
1033
|
+
|
1034
|
+
::Thrift::Struct.generate_accessors self
|
1035
|
+
end
|
1036
|
+
|
1037
|
+
class TGetInfoValue < ::Thrift::Union
|
1038
|
+
include ::Thrift::Struct_Union
|
1039
|
+
class << self
|
1040
|
+
def stringValue(val)
|
1041
|
+
TGetInfoValue.new(:stringValue, val)
|
1042
|
+
end
|
1043
|
+
|
1044
|
+
def smallIntValue(val)
|
1045
|
+
TGetInfoValue.new(:smallIntValue, val)
|
1046
|
+
end
|
1047
|
+
|
1048
|
+
def integerBitmask(val)
|
1049
|
+
TGetInfoValue.new(:integerBitmask, val)
|
1050
|
+
end
|
1051
|
+
|
1052
|
+
def integerFlag(val)
|
1053
|
+
TGetInfoValue.new(:integerFlag, val)
|
1054
|
+
end
|
1055
|
+
|
1056
|
+
def binaryValue(val)
|
1057
|
+
TGetInfoValue.new(:binaryValue, val)
|
1058
|
+
end
|
1059
|
+
|
1060
|
+
def lenValue(val)
|
1061
|
+
TGetInfoValue.new(:lenValue, val)
|
1062
|
+
end
|
1063
|
+
end
|
1064
|
+
|
1065
|
+
STRINGVALUE = 1
|
1066
|
+
SMALLINTVALUE = 2
|
1067
|
+
INTEGERBITMASK = 3
|
1068
|
+
INTEGERFLAG = 4
|
1069
|
+
BINARYVALUE = 5
|
1070
|
+
LENVALUE = 6
|
1071
|
+
|
1072
|
+
FIELDS = {
|
1073
|
+
STRINGVALUE => {:type => ::Thrift::Types::STRING, :name => 'stringValue'},
|
1074
|
+
SMALLINTVALUE => {:type => ::Thrift::Types::I16, :name => 'smallIntValue'},
|
1075
|
+
INTEGERBITMASK => {:type => ::Thrift::Types::I32, :name => 'integerBitmask'},
|
1076
|
+
INTEGERFLAG => {:type => ::Thrift::Types::I32, :name => 'integerFlag'},
|
1077
|
+
BINARYVALUE => {:type => ::Thrift::Types::I32, :name => 'binaryValue'},
|
1078
|
+
LENVALUE => {:type => ::Thrift::Types::I64, :name => 'lenValue'}
|
1079
|
+
}
|
1080
|
+
|
1081
|
+
def struct_fields; FIELDS; end
|
1082
|
+
|
1083
|
+
def validate
|
1084
|
+
raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil?
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
::Thrift::Union.generate_accessors self
|
1088
|
+
end
|
1089
|
+
|
1090
|
+
class TGetInfoReq
|
1091
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1092
|
+
SESSIONHANDLE = 1
|
1093
|
+
INFOTYPE = 2
|
1094
|
+
|
1095
|
+
FIELDS = {
|
1096
|
+
SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
|
1097
|
+
INFOTYPE => {:type => ::Thrift::Types::I32, :name => 'infoType', :enum_class => ::Hive2::Thrift::TGetInfoType}
|
1098
|
+
}
|
1099
|
+
|
1100
|
+
def struct_fields; FIELDS; end
|
1101
|
+
|
1102
|
+
def validate
|
1103
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
|
1104
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field infoType is unset!') unless @infoType
|
1105
|
+
unless @infoType.nil? || ::Hive2::Thrift::TGetInfoType::VALID_VALUES.include?(@infoType)
|
1106
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field infoType!')
|
1107
|
+
end
|
1108
|
+
end
|
1109
|
+
|
1110
|
+
::Thrift::Struct.generate_accessors self
|
1111
|
+
end
|
1112
|
+
|
1113
|
+
class TGetInfoResp
|
1114
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1115
|
+
STATUS = 1
|
1116
|
+
INFOVALUE = 2
|
1117
|
+
|
1118
|
+
FIELDS = {
|
1119
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
|
1120
|
+
INFOVALUE => {:type => ::Thrift::Types::STRUCT, :name => 'infoValue', :class => ::Hive2::Thrift::TGetInfoValue}
|
1121
|
+
}
|
1122
|
+
|
1123
|
+
def struct_fields; FIELDS; end
|
1124
|
+
|
1125
|
+
def validate
|
1126
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1127
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field infoValue is unset!') unless @infoValue
|
1128
|
+
end
|
1129
|
+
|
1130
|
+
::Thrift::Struct.generate_accessors self
|
1131
|
+
end
|
1132
|
+
|
1133
|
+
class TExecuteStatementReq
|
1134
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1135
|
+
SESSIONHANDLE = 1
|
1136
|
+
STATEMENT = 2
|
1137
|
+
CONFOVERLAY = 3
|
1138
|
+
RUNASYNC = 4
|
1139
|
+
|
1140
|
+
FIELDS = {
|
1141
|
+
SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
|
1142
|
+
STATEMENT => {:type => ::Thrift::Types::STRING, :name => 'statement'},
|
1143
|
+
CONFOVERLAY => {:type => ::Thrift::Types::MAP, :name => 'confOverlay', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true},
|
1144
|
+
RUNASYNC => {:type => ::Thrift::Types::BOOL, :name => 'runAsync', :default => false, :optional => true}
|
1145
|
+
}
|
1146
|
+
|
1147
|
+
def struct_fields; FIELDS; end
|
1148
|
+
|
1149
|
+
def validate
|
1150
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
|
1151
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statement is unset!') unless @statement
|
1152
|
+
end
|
1153
|
+
|
1154
|
+
::Thrift::Struct.generate_accessors self
|
1155
|
+
end
|
1156
|
+
|
1157
|
+
class TExecuteStatementResp
|
1158
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1159
|
+
STATUS = 1
|
1160
|
+
OPERATIONHANDLE = 2
|
1161
|
+
|
1162
|
+
FIELDS = {
|
1163
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
|
1164
|
+
OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle, :optional => true}
|
1165
|
+
}
|
1166
|
+
|
1167
|
+
def struct_fields; FIELDS; end
|
1168
|
+
|
1169
|
+
def validate
|
1170
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1171
|
+
end
|
1172
|
+
|
1173
|
+
::Thrift::Struct.generate_accessors self
|
1174
|
+
end
|
1175
|
+
|
1176
|
+
class TGetTypeInfoReq
|
1177
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1178
|
+
SESSIONHANDLE = 1
|
1179
|
+
|
1180
|
+
FIELDS = {
|
1181
|
+
SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle}
|
1182
|
+
}
|
1183
|
+
|
1184
|
+
def struct_fields; FIELDS; end
|
1185
|
+
|
1186
|
+
def validate
|
1187
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
|
1188
|
+
end
|
1189
|
+
|
1190
|
+
::Thrift::Struct.generate_accessors self
|
1191
|
+
end
|
1192
|
+
|
1193
|
+
class TGetTypeInfoResp
|
1194
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1195
|
+
STATUS = 1
|
1196
|
+
OPERATIONHANDLE = 2
|
1197
|
+
|
1198
|
+
FIELDS = {
|
1199
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
|
1200
|
+
OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle, :optional => true}
|
1201
|
+
}
|
1202
|
+
|
1203
|
+
def struct_fields; FIELDS; end
|
1204
|
+
|
1205
|
+
def validate
|
1206
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1207
|
+
end
|
1208
|
+
|
1209
|
+
::Thrift::Struct.generate_accessors self
|
1210
|
+
end
|
1211
|
+
|
1212
|
+
class TGetCatalogsReq
|
1213
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1214
|
+
SESSIONHANDLE = 1
|
1215
|
+
|
1216
|
+
FIELDS = {
|
1217
|
+
SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle}
|
1218
|
+
}
|
1219
|
+
|
1220
|
+
def struct_fields; FIELDS; end
|
1221
|
+
|
1222
|
+
def validate
|
1223
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
|
1224
|
+
end
|
1225
|
+
|
1226
|
+
::Thrift::Struct.generate_accessors self
|
1227
|
+
end
|
1228
|
+
|
1229
|
+
class TGetCatalogsResp
|
1230
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1231
|
+
STATUS = 1
|
1232
|
+
OPERATIONHANDLE = 2
|
1233
|
+
|
1234
|
+
FIELDS = {
|
1235
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
|
1236
|
+
OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle, :optional => true}
|
1237
|
+
}
|
1238
|
+
|
1239
|
+
def struct_fields; FIELDS; end
|
1240
|
+
|
1241
|
+
def validate
|
1242
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1243
|
+
end
|
1244
|
+
|
1245
|
+
::Thrift::Struct.generate_accessors self
|
1246
|
+
end
|
1247
|
+
|
1248
|
+
class TGetSchemasReq
|
1249
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1250
|
+
SESSIONHANDLE = 1
|
1251
|
+
CATALOGNAME = 2
|
1252
|
+
SCHEMANAME = 3
|
1253
|
+
|
1254
|
+
FIELDS = {
|
1255
|
+
SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
|
1256
|
+
CATALOGNAME => {:type => ::Thrift::Types::STRING, :name => 'catalogName', :optional => true},
|
1257
|
+
SCHEMANAME => {:type => ::Thrift::Types::STRING, :name => 'schemaName', :optional => true}
|
1258
|
+
}
|
1259
|
+
|
1260
|
+
def struct_fields; FIELDS; end
|
1261
|
+
|
1262
|
+
def validate
|
1263
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
|
1264
|
+
end
|
1265
|
+
|
1266
|
+
::Thrift::Struct.generate_accessors self
|
1267
|
+
end
|
1268
|
+
|
1269
|
+
class TGetSchemasResp
|
1270
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1271
|
+
STATUS = 1
|
1272
|
+
OPERATIONHANDLE = 2
|
1273
|
+
|
1274
|
+
FIELDS = {
|
1275
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
|
1276
|
+
OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle, :optional => true}
|
1277
|
+
}
|
1278
|
+
|
1279
|
+
def struct_fields; FIELDS; end
|
1280
|
+
|
1281
|
+
def validate
|
1282
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1283
|
+
end
|
1284
|
+
|
1285
|
+
::Thrift::Struct.generate_accessors self
|
1286
|
+
end
|
1287
|
+
|
1288
|
+
class TGetTablesReq
|
1289
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1290
|
+
SESSIONHANDLE = 1
|
1291
|
+
CATALOGNAME = 2
|
1292
|
+
SCHEMANAME = 3
|
1293
|
+
TABLENAME = 4
|
1294
|
+
TABLETYPES = 5
|
1295
|
+
|
1296
|
+
FIELDS = {
|
1297
|
+
SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
|
1298
|
+
CATALOGNAME => {:type => ::Thrift::Types::STRING, :name => 'catalogName', :optional => true},
|
1299
|
+
SCHEMANAME => {:type => ::Thrift::Types::STRING, :name => 'schemaName', :optional => true},
|
1300
|
+
TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :optional => true},
|
1301
|
+
TABLETYPES => {:type => ::Thrift::Types::LIST, :name => 'tableTypes', :element => {:type => ::Thrift::Types::STRING}, :optional => true}
|
1302
|
+
}
|
1303
|
+
|
1304
|
+
def struct_fields; FIELDS; end
|
1305
|
+
|
1306
|
+
def validate
|
1307
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
|
1308
|
+
end
|
1309
|
+
|
1310
|
+
::Thrift::Struct.generate_accessors self
|
1311
|
+
end
|
1312
|
+
|
1313
|
+
class TGetTablesResp
|
1314
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1315
|
+
STATUS = 1
|
1316
|
+
OPERATIONHANDLE = 2
|
1317
|
+
|
1318
|
+
FIELDS = {
|
1319
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
|
1320
|
+
OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle, :optional => true}
|
1321
|
+
}
|
1322
|
+
|
1323
|
+
def struct_fields; FIELDS; end
|
1324
|
+
|
1325
|
+
def validate
|
1326
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1327
|
+
end
|
1328
|
+
|
1329
|
+
::Thrift::Struct.generate_accessors self
|
1330
|
+
end
|
1331
|
+
|
1332
|
+
class TGetTableTypesReq
|
1333
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1334
|
+
SESSIONHANDLE = 1
|
1335
|
+
|
1336
|
+
FIELDS = {
|
1337
|
+
SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle}
|
1338
|
+
}
|
1339
|
+
|
1340
|
+
def struct_fields; FIELDS; end
|
1341
|
+
|
1342
|
+
def validate
|
1343
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
|
1344
|
+
end
|
1345
|
+
|
1346
|
+
::Thrift::Struct.generate_accessors self
|
1347
|
+
end
|
1348
|
+
|
1349
|
+
class TGetTableTypesResp
|
1350
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1351
|
+
STATUS = 1
|
1352
|
+
OPERATIONHANDLE = 2
|
1353
|
+
|
1354
|
+
FIELDS = {
|
1355
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
|
1356
|
+
OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle, :optional => true}
|
1357
|
+
}
|
1358
|
+
|
1359
|
+
def struct_fields; FIELDS; end
|
1360
|
+
|
1361
|
+
def validate
|
1362
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1363
|
+
end
|
1364
|
+
|
1365
|
+
::Thrift::Struct.generate_accessors self
|
1366
|
+
end
|
1367
|
+
|
1368
|
+
class TGetColumnsReq
|
1369
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1370
|
+
SESSIONHANDLE = 1
|
1371
|
+
CATALOGNAME = 2
|
1372
|
+
SCHEMANAME = 3
|
1373
|
+
TABLENAME = 4
|
1374
|
+
COLUMNNAME = 5
|
1375
|
+
|
1376
|
+
FIELDS = {
|
1377
|
+
SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
|
1378
|
+
CATALOGNAME => {:type => ::Thrift::Types::STRING, :name => 'catalogName', :optional => true},
|
1379
|
+
SCHEMANAME => {:type => ::Thrift::Types::STRING, :name => 'schemaName', :optional => true},
|
1380
|
+
TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :optional => true},
|
1381
|
+
COLUMNNAME => {:type => ::Thrift::Types::STRING, :name => 'columnName', :optional => true}
|
1382
|
+
}
|
1383
|
+
|
1384
|
+
def struct_fields; FIELDS; end
|
1385
|
+
|
1386
|
+
def validate
|
1387
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
|
1388
|
+
end
|
1389
|
+
|
1390
|
+
::Thrift::Struct.generate_accessors self
|
1391
|
+
end
|
1392
|
+
|
1393
|
+
class TGetColumnsResp
|
1394
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1395
|
+
STATUS = 1
|
1396
|
+
OPERATIONHANDLE = 2
|
1397
|
+
|
1398
|
+
FIELDS = {
|
1399
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
|
1400
|
+
OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle, :optional => true}
|
1401
|
+
}
|
1402
|
+
|
1403
|
+
def struct_fields; FIELDS; end
|
1404
|
+
|
1405
|
+
def validate
|
1406
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1407
|
+
end
|
1408
|
+
|
1409
|
+
::Thrift::Struct.generate_accessors self
|
1410
|
+
end
|
1411
|
+
|
1412
|
+
class TGetFunctionsReq
|
1413
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1414
|
+
SESSIONHANDLE = 1
|
1415
|
+
CATALOGNAME = 2
|
1416
|
+
SCHEMANAME = 3
|
1417
|
+
FUNCTIONNAME = 4
|
1418
|
+
|
1419
|
+
FIELDS = {
|
1420
|
+
SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
|
1421
|
+
CATALOGNAME => {:type => ::Thrift::Types::STRING, :name => 'catalogName', :optional => true},
|
1422
|
+
SCHEMANAME => {:type => ::Thrift::Types::STRING, :name => 'schemaName', :optional => true},
|
1423
|
+
FUNCTIONNAME => {:type => ::Thrift::Types::STRING, :name => 'functionName'}
|
1424
|
+
}
|
1425
|
+
|
1426
|
+
def struct_fields; FIELDS; end
|
1427
|
+
|
1428
|
+
def validate
|
1429
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
|
1430
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field functionName is unset!') unless @functionName
|
1431
|
+
end
|
1432
|
+
|
1433
|
+
::Thrift::Struct.generate_accessors self
|
1434
|
+
end
|
1435
|
+
|
1436
|
+
class TGetFunctionsResp
|
1437
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1438
|
+
STATUS = 1
|
1439
|
+
OPERATIONHANDLE = 2
|
1440
|
+
|
1441
|
+
FIELDS = {
|
1442
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
|
1443
|
+
OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle, :optional => true}
|
1444
|
+
}
|
1445
|
+
|
1446
|
+
def struct_fields; FIELDS; end
|
1447
|
+
|
1448
|
+
def validate
|
1449
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1450
|
+
end
|
1451
|
+
|
1452
|
+
::Thrift::Struct.generate_accessors self
|
1453
|
+
end
|
1454
|
+
|
1455
|
+
class TGetOperationStatusReq
|
1456
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1457
|
+
OPERATIONHANDLE = 1
|
1458
|
+
|
1459
|
+
FIELDS = {
|
1460
|
+
OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle}
|
1461
|
+
}
|
1462
|
+
|
1463
|
+
def struct_fields; FIELDS; end
|
1464
|
+
|
1465
|
+
def validate
|
1466
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field operationHandle is unset!') unless @operationHandle
|
1467
|
+
end
|
1468
|
+
|
1469
|
+
::Thrift::Struct.generate_accessors self
|
1470
|
+
end
|
1471
|
+
|
1472
|
+
class TGetOperationStatusResp
|
1473
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1474
|
+
STATUS = 1
|
1475
|
+
OPERATIONSTATE = 2
|
1476
|
+
SQLSTATE = 3
|
1477
|
+
ERRORCODE = 4
|
1478
|
+
ERRORMESSAGE = 5
|
1479
|
+
|
1480
|
+
FIELDS = {
|
1481
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
|
1482
|
+
OPERATIONSTATE => {:type => ::Thrift::Types::I32, :name => 'operationState', :optional => true, :enum_class => ::Hive2::Thrift::TOperationState},
|
1483
|
+
SQLSTATE => {:type => ::Thrift::Types::STRING, :name => 'sqlState', :optional => true},
|
1484
|
+
ERRORCODE => {:type => ::Thrift::Types::I32, :name => 'errorCode', :optional => true},
|
1485
|
+
ERRORMESSAGE => {:type => ::Thrift::Types::STRING, :name => 'errorMessage', :optional => true}
|
1486
|
+
}
|
1487
|
+
|
1488
|
+
def struct_fields; FIELDS; end
|
1489
|
+
|
1490
|
+
def validate
|
1491
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1492
|
+
unless @operationState.nil? || ::Hive2::Thrift::TOperationState::VALID_VALUES.include?(@operationState)
|
1493
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operationState!')
|
1494
|
+
end
|
1495
|
+
end
|
1496
|
+
|
1497
|
+
::Thrift::Struct.generate_accessors self
|
1498
|
+
end
|
1499
|
+
|
1500
|
+
class TCancelOperationReq
|
1501
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1502
|
+
OPERATIONHANDLE = 1
|
1503
|
+
|
1504
|
+
FIELDS = {
|
1505
|
+
OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle}
|
1506
|
+
}
|
1507
|
+
|
1508
|
+
def struct_fields; FIELDS; end
|
1509
|
+
|
1510
|
+
def validate
|
1511
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field operationHandle is unset!') unless @operationHandle
|
1512
|
+
end
|
1513
|
+
|
1514
|
+
::Thrift::Struct.generate_accessors self
|
1515
|
+
end
|
1516
|
+
|
1517
|
+
class TCancelOperationResp
|
1518
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1519
|
+
STATUS = 1
|
1520
|
+
|
1521
|
+
FIELDS = {
|
1522
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus}
|
1523
|
+
}
|
1524
|
+
|
1525
|
+
def struct_fields; FIELDS; end
|
1526
|
+
|
1527
|
+
def validate
|
1528
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1529
|
+
end
|
1530
|
+
|
1531
|
+
::Thrift::Struct.generate_accessors self
|
1532
|
+
end
|
1533
|
+
|
1534
|
+
class TCloseOperationReq
|
1535
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1536
|
+
OPERATIONHANDLE = 1
|
1537
|
+
|
1538
|
+
FIELDS = {
|
1539
|
+
OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle}
|
1540
|
+
}
|
1541
|
+
|
1542
|
+
def struct_fields; FIELDS; end
|
1543
|
+
|
1544
|
+
def validate
|
1545
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field operationHandle is unset!') unless @operationHandle
|
1546
|
+
end
|
1547
|
+
|
1548
|
+
::Thrift::Struct.generate_accessors self
|
1549
|
+
end
|
1550
|
+
|
1551
|
+
class TCloseOperationResp
|
1552
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1553
|
+
STATUS = 1
|
1554
|
+
|
1555
|
+
FIELDS = {
|
1556
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus}
|
1557
|
+
}
|
1558
|
+
|
1559
|
+
def struct_fields; FIELDS; end
|
1560
|
+
|
1561
|
+
def validate
|
1562
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1563
|
+
end
|
1564
|
+
|
1565
|
+
::Thrift::Struct.generate_accessors self
|
1566
|
+
end
|
1567
|
+
|
1568
|
+
class TGetResultSetMetadataReq
|
1569
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1570
|
+
OPERATIONHANDLE = 1
|
1571
|
+
|
1572
|
+
FIELDS = {
|
1573
|
+
OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle}
|
1574
|
+
}
|
1575
|
+
|
1576
|
+
def struct_fields; FIELDS; end
|
1577
|
+
|
1578
|
+
def validate
|
1579
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field operationHandle is unset!') unless @operationHandle
|
1580
|
+
end
|
1581
|
+
|
1582
|
+
::Thrift::Struct.generate_accessors self
|
1583
|
+
end
|
1584
|
+
|
1585
|
+
class TGetResultSetMetadataResp
|
1586
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1587
|
+
STATUS = 1
|
1588
|
+
SCHEMA = 2
|
1589
|
+
|
1590
|
+
FIELDS = {
|
1591
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
|
1592
|
+
SCHEMA => {:type => ::Thrift::Types::STRUCT, :name => 'schema', :class => ::Hive2::Thrift::TTableSchema, :optional => true}
|
1593
|
+
}
|
1594
|
+
|
1595
|
+
def struct_fields; FIELDS; end
|
1596
|
+
|
1597
|
+
def validate
|
1598
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1599
|
+
end
|
1600
|
+
|
1601
|
+
::Thrift::Struct.generate_accessors self
|
1602
|
+
end
|
1603
|
+
|
1604
|
+
class TFetchResultsReq
|
1605
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1606
|
+
OPERATIONHANDLE = 1
|
1607
|
+
ORIENTATION = 2
|
1608
|
+
MAXROWS = 3
|
1609
|
+
|
1610
|
+
FIELDS = {
|
1611
|
+
OPERATIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'operationHandle', :class => ::Hive2::Thrift::TOperationHandle},
|
1612
|
+
ORIENTATION => {:type => ::Thrift::Types::I32, :name => 'orientation', :default => 0, :enum_class => ::Hive2::Thrift::TFetchOrientation},
|
1613
|
+
MAXROWS => {:type => ::Thrift::Types::I64, :name => 'maxRows'}
|
1614
|
+
}
|
1615
|
+
|
1616
|
+
def struct_fields; FIELDS; end
|
1617
|
+
|
1618
|
+
def validate
|
1619
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field operationHandle is unset!') unless @operationHandle
|
1620
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field orientation is unset!') unless @orientation
|
1621
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field maxRows is unset!') unless @maxRows
|
1622
|
+
unless @orientation.nil? || ::Hive2::Thrift::TFetchOrientation::VALID_VALUES.include?(@orientation)
|
1623
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field orientation!')
|
1624
|
+
end
|
1625
|
+
end
|
1626
|
+
|
1627
|
+
::Thrift::Struct.generate_accessors self
|
1628
|
+
end
|
1629
|
+
|
1630
|
+
class TFetchResultsResp
|
1631
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1632
|
+
STATUS = 1
|
1633
|
+
HASMOREROWS = 2
|
1634
|
+
RESULTS = 3
|
1635
|
+
|
1636
|
+
FIELDS = {
|
1637
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
|
1638
|
+
HASMOREROWS => {:type => ::Thrift::Types::BOOL, :name => 'hasMoreRows', :optional => true},
|
1639
|
+
RESULTS => {:type => ::Thrift::Types::STRUCT, :name => 'results', :class => ::Hive2::Thrift::TRowSet, :optional => true}
|
1640
|
+
}
|
1641
|
+
|
1642
|
+
def struct_fields; FIELDS; end
|
1643
|
+
|
1644
|
+
def validate
|
1645
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1646
|
+
end
|
1647
|
+
|
1648
|
+
::Thrift::Struct.generate_accessors self
|
1649
|
+
end
|
1650
|
+
|
1651
|
+
class TGetDelegationTokenReq
|
1652
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1653
|
+
SESSIONHANDLE = 1
|
1654
|
+
OWNER = 2
|
1655
|
+
RENEWER = 3
|
1656
|
+
|
1657
|
+
FIELDS = {
|
1658
|
+
SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
|
1659
|
+
OWNER => {:type => ::Thrift::Types::STRING, :name => 'owner'},
|
1660
|
+
RENEWER => {:type => ::Thrift::Types::STRING, :name => 'renewer'}
|
1661
|
+
}
|
1662
|
+
|
1663
|
+
def struct_fields; FIELDS; end
|
1664
|
+
|
1665
|
+
def validate
|
1666
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
|
1667
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field owner is unset!') unless @owner
|
1668
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field renewer is unset!') unless @renewer
|
1669
|
+
end
|
1670
|
+
|
1671
|
+
::Thrift::Struct.generate_accessors self
|
1672
|
+
end
|
1673
|
+
|
1674
|
+
class TGetDelegationTokenResp
|
1675
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1676
|
+
STATUS = 1
|
1677
|
+
DELEGATIONTOKEN = 2
|
1678
|
+
|
1679
|
+
FIELDS = {
|
1680
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
|
1681
|
+
DELEGATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'delegationToken', :optional => true}
|
1682
|
+
}
|
1683
|
+
|
1684
|
+
def struct_fields; FIELDS; end
|
1685
|
+
|
1686
|
+
def validate
|
1687
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1688
|
+
end
|
1689
|
+
|
1690
|
+
::Thrift::Struct.generate_accessors self
|
1691
|
+
end
|
1692
|
+
|
1693
|
+
class TCancelDelegationTokenReq
|
1694
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1695
|
+
SESSIONHANDLE = 1
|
1696
|
+
DELEGATIONTOKEN = 2
|
1697
|
+
|
1698
|
+
FIELDS = {
|
1699
|
+
SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
|
1700
|
+
DELEGATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'delegationToken'}
|
1701
|
+
}
|
1702
|
+
|
1703
|
+
def struct_fields; FIELDS; end
|
1704
|
+
|
1705
|
+
def validate
|
1706
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
|
1707
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field delegationToken is unset!') unless @delegationToken
|
1708
|
+
end
|
1709
|
+
|
1710
|
+
::Thrift::Struct.generate_accessors self
|
1711
|
+
end
|
1712
|
+
|
1713
|
+
class TCancelDelegationTokenResp
|
1714
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1715
|
+
STATUS = 1
|
1716
|
+
|
1717
|
+
FIELDS = {
|
1718
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus}
|
1719
|
+
}
|
1720
|
+
|
1721
|
+
def struct_fields; FIELDS; end
|
1722
|
+
|
1723
|
+
def validate
|
1724
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1725
|
+
end
|
1726
|
+
|
1727
|
+
::Thrift::Struct.generate_accessors self
|
1728
|
+
end
|
1729
|
+
|
1730
|
+
class TRenewDelegationTokenReq
|
1731
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1732
|
+
SESSIONHANDLE = 1
|
1733
|
+
DELEGATIONTOKEN = 2
|
1734
|
+
|
1735
|
+
FIELDS = {
|
1736
|
+
SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle},
|
1737
|
+
DELEGATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'delegationToken'}
|
1738
|
+
}
|
1739
|
+
|
1740
|
+
def struct_fields; FIELDS; end
|
1741
|
+
|
1742
|
+
def validate
|
1743
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
|
1744
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field delegationToken is unset!') unless @delegationToken
|
1745
|
+
end
|
1746
|
+
|
1747
|
+
::Thrift::Struct.generate_accessors self
|
1748
|
+
end
|
1749
|
+
|
1750
|
+
class TRenewDelegationTokenResp
|
1751
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1752
|
+
STATUS = 1
|
1753
|
+
|
1754
|
+
FIELDS = {
|
1755
|
+
STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus}
|
1756
|
+
}
|
1757
|
+
|
1758
|
+
def struct_fields; FIELDS; end
|
1759
|
+
|
1760
|
+
def validate
|
1761
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
|
1762
|
+
end
|
1763
|
+
|
1764
|
+
::Thrift::Struct.generate_accessors self
|
1765
|
+
end
|
1766
|
+
|
1767
|
+
end
|
1768
|
+
end
|