sequel-impala 1.0.1 → 1.1.0

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