impala 0.1.6 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +0 -2
- data/impala.gemspec +1 -2
- data/lib/impala.rb +1 -1
- data/lib/impala/cursor.rb +10 -4
- data/lib/impala/protocol/beeswax_constants.rb +2 -1
- data/lib/impala/protocol/beeswax_service.rb +46 -46
- data/lib/impala/protocol/beeswax_types.rb +31 -30
- data/lib/impala/protocol/cli_service_constants.rb +60 -0
- data/lib/impala/protocol/cli_service_types.rb +1452 -0
- data/lib/impala/protocol/facebook_service.rb +17 -17
- data/lib/impala/protocol/fb303_constants.rb +2 -1
- data/lib/impala/protocol/fb303_types.rb +3 -2
- data/lib/impala/protocol/hive_metastore_constants.rb +2 -1
- data/lib/impala/protocol/hive_metastore_types.rb +102 -101
- data/lib/impala/protocol/impala_hive_server2_service.rb +29 -0
- data/lib/impala/protocol/impala_service.rb +135 -18
- data/lib/impala/protocol/impala_service_constants.rb +2 -1
- data/lib/impala/protocol/impala_service_types.rb +54 -10
- data/lib/impala/protocol/status_constants.rb +2 -1
- data/lib/impala/protocol/status_types.rb +9 -7
- data/lib/impala/protocol/t_c_l_i_service.rb +948 -0
- data/lib/impala/protocol/thrift_hive_metastore.rb +507 -507
- data/lib/impala/version.rb +1 -1
- data/test/test_impala_connected.rb +93 -13
- data/thrift/ImpalaService.thrift +78 -6
- data/thrift/Status.thrift +2 -1
- data/thrift/beeswax.thrift +1 -1
- data/thrift/cli_service.thrift +1015 -0
- metadata +9 -75
- data/lib/impala/protocol/data_constants.rb +0 -12
- data/lib/impala/protocol/data_sinks_constants.rb +0 -12
- data/lib/impala/protocol/data_sinks_types.rb +0 -107
- data/lib/impala/protocol/data_types.rb +0 -77
- data/lib/impala/protocol/descriptors_constants.rb +0 -12
- data/lib/impala/protocol/descriptors_types.rb +0 -266
- data/lib/impala/protocol/exprs_constants.rb +0 -12
- data/lib/impala/protocol/exprs_types.rb +0 -345
- data/lib/impala/protocol/frontend_constants.rb +0 -12
- data/lib/impala/protocol/frontend_types.rb +0 -347
- data/lib/impala/protocol/impala_internal_service.rb +0 -244
- data/lib/impala/protocol/impala_internal_service_constants.rb +0 -12
- data/lib/impala/protocol/impala_internal_service_types.rb +0 -362
- data/lib/impala/protocol/impala_plan_service.rb +0 -310
- data/lib/impala/protocol/impala_plan_service_constants.rb +0 -12
- data/lib/impala/protocol/impala_plan_service_types.rb +0 -36
- data/lib/impala/protocol/java_constants_constants.rb +0 -42
- data/lib/impala/protocol/java_constants_types.rb +0 -14
- data/lib/impala/protocol/opcodes_constants.rb +0 -12
- data/lib/impala/protocol/opcodes_types.rb +0 -309
- data/lib/impala/protocol/partitions_constants.rb +0 -12
- data/lib/impala/protocol/partitions_types.rb +0 -44
- data/lib/impala/protocol/plan_nodes_constants.rb +0 -12
- data/lib/impala/protocol/plan_nodes_types.rb +0 -345
- data/lib/impala/protocol/planner_constants.rb +0 -12
- data/lib/impala/protocol/planner_types.rb +0 -78
- data/lib/impala/protocol/runtime_profile_constants.rb +0 -12
- data/lib/impala/protocol/runtime_profile_types.rb +0 -97
- data/lib/impala/protocol/state_store_service.rb +0 -244
- data/lib/impala/protocol/state_store_service_constants.rb +0 -12
- data/lib/impala/protocol/state_store_service_types.rb +0 -185
- data/lib/impala/protocol/state_store_subscriber_service.rb +0 -82
- data/lib/impala/protocol/state_store_subscriber_service_constants.rb +0 -12
- data/lib/impala/protocol/state_store_subscriber_service_types.rb +0 -67
- data/lib/impala/protocol/statestore_types_constants.rb +0 -12
- data/lib/impala/protocol/statestore_types_types.rb +0 -77
- data/lib/impala/protocol/types_constants.rb +0 -12
- data/lib/impala/protocol/types_types.rb +0 -86
- data/thrift/Data.thrift +0 -52
- data/thrift/DataSinks.thrift +0 -61
- data/thrift/Descriptors.thrift +0 -115
- data/thrift/Exprs.thrift +0 -134
- data/thrift/Frontend.thrift +0 -193
- data/thrift/ImpalaInternalService.thrift +0 -265
- data/thrift/ImpalaPlanService.thrift +0 -44
- data/thrift/JavaConstants.thrift +0 -60
- data/thrift/Opcodes.thrift +0 -317
- data/thrift/Partitions.thrift +0 -41
- data/thrift/PlanNodes.thrift +0 -184
- data/thrift/Planner.thrift +0 -72
- data/thrift/RuntimeProfile.thrift +0 -58
- data/thrift/StateStoreService.thrift +0 -121
- data/thrift/StateStoreSubscriberService.thrift +0 -64
- data/thrift/StatestoreTypes.thrift +0 -50
- data/thrift/Types.thrift +0 -71
@@ -1,345 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Autogenerated by Thrift Compiler (0.8.0)
|
3
|
-
#
|
4
|
-
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
-
#
|
6
|
-
|
7
|
-
require 'types_types'
|
8
|
-
require 'opcodes_types'
|
9
|
-
|
10
|
-
|
11
|
-
module Impala
|
12
|
-
module Protocol
|
13
|
-
module TExprNodeType
|
14
|
-
AGG_EXPR = 0
|
15
|
-
ARITHMETIC_EXPR = 1
|
16
|
-
BINARY_PRED = 2
|
17
|
-
BOOL_LITERAL = 3
|
18
|
-
CASE_EXPR = 4
|
19
|
-
CAST_EXPR = 5
|
20
|
-
COMPOUND_PRED = 6
|
21
|
-
DATE_LITERAL = 7
|
22
|
-
FLOAT_LITERAL = 8
|
23
|
-
FUNCTION_CALL = 9
|
24
|
-
INT_LITERAL = 10
|
25
|
-
IN_PRED = 11
|
26
|
-
IS_NULL_PRED = 12
|
27
|
-
LIKE_PRED = 13
|
28
|
-
LITERAL_PRED = 14
|
29
|
-
NULL_LITERAL = 15
|
30
|
-
SLOT_REF = 16
|
31
|
-
STRING_LITERAL = 17
|
32
|
-
VALUE_MAP = { 0 => "AGG_EXPR", 1 => "ARITHMETIC_EXPR", 2 => "BINARY_PRED", 3 => "BOOL_LITERAL", 4 => "CASE_EXPR", 5 => "CAST_EXPR", 6 => "COMPOUND_PRED", 7 => "DATE_LITERAL", 8 => "FLOAT_LITERAL", 9 => "FUNCTION_CALL", 10 => "INT_LITERAL", 11 => "IN_PRED", 12 => "IS_NULL_PRED", 13 => "LIKE_PRED", 14 => "LITERAL_PRED", 15 => "NULL_LITERAL", 16 => "SLOT_REF", 17 => "STRING_LITERAL" }
|
33
|
-
VALID_VALUES = Set.new([AGG_EXPR, ARITHMETIC_EXPR, BINARY_PRED, BOOL_LITERAL, CASE_EXPR, CAST_EXPR, COMPOUND_PRED, DATE_LITERAL, FLOAT_LITERAL, FUNCTION_CALL, INT_LITERAL, IN_PRED, IS_NULL_PRED, LIKE_PRED, LITERAL_PRED, NULL_LITERAL, SLOT_REF, STRING_LITERAL]).freeze
|
34
|
-
end
|
35
|
-
|
36
|
-
module TAggregationOp
|
37
|
-
INVALID = 0
|
38
|
-
COUNT = 1
|
39
|
-
MAX = 2
|
40
|
-
DISTINCT_PC = 3
|
41
|
-
MERGE_PC = 4
|
42
|
-
DISTINCT_PCSA = 5
|
43
|
-
MERGE_PCSA = 6
|
44
|
-
MIN = 7
|
45
|
-
SUM = 8
|
46
|
-
VALUE_MAP = { 0 => "INVALID", 1 => "COUNT", 2 => "MAX", 3 => "DISTINCT_PC", 4 => "MERGE_PC", 5 => "DISTINCT_PCSA", 6 => "MERGE_PCSA", 7 => "MIN", 8 => "SUM" }
|
47
|
-
VALID_VALUES = Set.new([INVALID, COUNT, MAX, DISTINCT_PC, MERGE_PC, DISTINCT_PCSA, MERGE_PCSA, MIN, SUM]).freeze
|
48
|
-
end
|
49
|
-
|
50
|
-
class TAggregateExpr
|
51
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
52
|
-
IS_STAR = 1
|
53
|
-
IS_DISTINCT = 2
|
54
|
-
OP = 3
|
55
|
-
|
56
|
-
FIELDS = {
|
57
|
-
IS_STAR => { :type => ::Thrift::Types::BOOL, :name => 'is_star' },
|
58
|
-
IS_DISTINCT => { :type => ::Thrift::Types::BOOL, :name => 'is_distinct' },
|
59
|
-
OP => { :type => ::Thrift::Types::I32, :name => 'op', :enum_class => Impala::Protocol::TAggregationOp }
|
60
|
-
}
|
61
|
-
|
62
|
-
def struct_fields; FIELDS; end
|
63
|
-
|
64
|
-
def validate
|
65
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field is_star is unset!') if @is_star.nil?
|
66
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field is_distinct is unset!') if @is_distinct.nil?
|
67
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field op is unset!') unless @op
|
68
|
-
unless @op.nil? || Impala::Protocol::TAggregationOp::VALID_VALUES.include?(@op)
|
69
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
::Thrift::Struct.generate_accessors self
|
74
|
-
end
|
75
|
-
|
76
|
-
class TBoolLiteral
|
77
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
78
|
-
VALUE = 1
|
79
|
-
|
80
|
-
FIELDS = {
|
81
|
-
VALUE => { :type => ::Thrift::Types::BOOL, :name => 'value' }
|
82
|
-
}
|
83
|
-
|
84
|
-
def struct_fields; FIELDS; end
|
85
|
-
|
86
|
-
def validate
|
87
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') if @value.nil?
|
88
|
-
end
|
89
|
-
|
90
|
-
::Thrift::Struct.generate_accessors self
|
91
|
-
end
|
92
|
-
|
93
|
-
class TCaseExpr
|
94
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
95
|
-
HAS_CASE_EXPR = 1
|
96
|
-
HAS_ELSE_EXPR = 2
|
97
|
-
|
98
|
-
FIELDS = {
|
99
|
-
HAS_CASE_EXPR => { :type => ::Thrift::Types::BOOL, :name => 'has_case_expr' },
|
100
|
-
HAS_ELSE_EXPR => { :type => ::Thrift::Types::BOOL, :name => 'has_else_expr' }
|
101
|
-
}
|
102
|
-
|
103
|
-
def struct_fields; FIELDS; end
|
104
|
-
|
105
|
-
def validate
|
106
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field has_case_expr is unset!') if @has_case_expr.nil?
|
107
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field has_else_expr is unset!') if @has_else_expr.nil?
|
108
|
-
end
|
109
|
-
|
110
|
-
::Thrift::Struct.generate_accessors self
|
111
|
-
end
|
112
|
-
|
113
|
-
class TDateLiteral
|
114
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
115
|
-
VALUE = 1
|
116
|
-
|
117
|
-
FIELDS = {
|
118
|
-
VALUE => { :type => ::Thrift::Types::I64, :name => 'value' }
|
119
|
-
}
|
120
|
-
|
121
|
-
def struct_fields; FIELDS; end
|
122
|
-
|
123
|
-
def validate
|
124
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
|
125
|
-
end
|
126
|
-
|
127
|
-
::Thrift::Struct.generate_accessors self
|
128
|
-
end
|
129
|
-
|
130
|
-
class TFloatLiteral
|
131
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
132
|
-
VALUE = 1
|
133
|
-
|
134
|
-
FIELDS = {
|
135
|
-
VALUE => { :type => ::Thrift::Types::DOUBLE, :name => 'value' }
|
136
|
-
}
|
137
|
-
|
138
|
-
def struct_fields; FIELDS; end
|
139
|
-
|
140
|
-
def validate
|
141
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
|
142
|
-
end
|
143
|
-
|
144
|
-
::Thrift::Struct.generate_accessors self
|
145
|
-
end
|
146
|
-
|
147
|
-
class TIntLiteral
|
148
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
149
|
-
VALUE = 1
|
150
|
-
|
151
|
-
FIELDS = {
|
152
|
-
VALUE => { :type => ::Thrift::Types::I64, :name => 'value' }
|
153
|
-
}
|
154
|
-
|
155
|
-
def struct_fields; FIELDS; end
|
156
|
-
|
157
|
-
def validate
|
158
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
|
159
|
-
end
|
160
|
-
|
161
|
-
::Thrift::Struct.generate_accessors self
|
162
|
-
end
|
163
|
-
|
164
|
-
class TInPredicate
|
165
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
166
|
-
IS_NOT_IN = 1
|
167
|
-
|
168
|
-
FIELDS = {
|
169
|
-
IS_NOT_IN => { :type => ::Thrift::Types::BOOL, :name => 'is_not_in' }
|
170
|
-
}
|
171
|
-
|
172
|
-
def struct_fields; FIELDS; end
|
173
|
-
|
174
|
-
def validate
|
175
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field is_not_in is unset!') if @is_not_in.nil?
|
176
|
-
end
|
177
|
-
|
178
|
-
::Thrift::Struct.generate_accessors self
|
179
|
-
end
|
180
|
-
|
181
|
-
class TIsNullPredicate
|
182
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
183
|
-
IS_NOT_NULL = 1
|
184
|
-
|
185
|
-
FIELDS = {
|
186
|
-
IS_NOT_NULL => { :type => ::Thrift::Types::BOOL, :name => 'is_not_null' }
|
187
|
-
}
|
188
|
-
|
189
|
-
def struct_fields; FIELDS; end
|
190
|
-
|
191
|
-
def validate
|
192
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field is_not_null is unset!') if @is_not_null.nil?
|
193
|
-
end
|
194
|
-
|
195
|
-
::Thrift::Struct.generate_accessors self
|
196
|
-
end
|
197
|
-
|
198
|
-
class TLikePredicate
|
199
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
200
|
-
ESCAPE_CHAR = 1
|
201
|
-
|
202
|
-
FIELDS = {
|
203
|
-
ESCAPE_CHAR => { :type => ::Thrift::Types::STRING, :name => 'escape_char' }
|
204
|
-
}
|
205
|
-
|
206
|
-
def struct_fields; FIELDS; end
|
207
|
-
|
208
|
-
def validate
|
209
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field escape_char is unset!') unless @escape_char
|
210
|
-
end
|
211
|
-
|
212
|
-
::Thrift::Struct.generate_accessors self
|
213
|
-
end
|
214
|
-
|
215
|
-
class TLiteralPredicate
|
216
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
217
|
-
VALUE = 1
|
218
|
-
IS_NULL = 2
|
219
|
-
|
220
|
-
FIELDS = {
|
221
|
-
VALUE => { :type => ::Thrift::Types::BOOL, :name => 'value' },
|
222
|
-
IS_NULL => { :type => ::Thrift::Types::BOOL, :name => 'is_null' }
|
223
|
-
}
|
224
|
-
|
225
|
-
def struct_fields; FIELDS; end
|
226
|
-
|
227
|
-
def validate
|
228
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') if @value.nil?
|
229
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field is_null is unset!') if @is_null.nil?
|
230
|
-
end
|
231
|
-
|
232
|
-
::Thrift::Struct.generate_accessors self
|
233
|
-
end
|
234
|
-
|
235
|
-
class TSlotRef
|
236
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
237
|
-
SLOT_ID = 1
|
238
|
-
|
239
|
-
FIELDS = {
|
240
|
-
SLOT_ID => { :type => ::Thrift::Types::I32, :name => 'slot_id' }
|
241
|
-
}
|
242
|
-
|
243
|
-
def struct_fields; FIELDS; end
|
244
|
-
|
245
|
-
def validate
|
246
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field slot_id is unset!') unless @slot_id
|
247
|
-
end
|
248
|
-
|
249
|
-
::Thrift::Struct.generate_accessors self
|
250
|
-
end
|
251
|
-
|
252
|
-
class TStringLiteral
|
253
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
254
|
-
VALUE = 1
|
255
|
-
|
256
|
-
FIELDS = {
|
257
|
-
VALUE => { :type => ::Thrift::Types::STRING, :name => 'value' }
|
258
|
-
}
|
259
|
-
|
260
|
-
def struct_fields; FIELDS; end
|
261
|
-
|
262
|
-
def validate
|
263
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
|
264
|
-
end
|
265
|
-
|
266
|
-
::Thrift::Struct.generate_accessors self
|
267
|
-
end
|
268
|
-
|
269
|
-
class TExprNode
|
270
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
271
|
-
NODE_TYPE = 1
|
272
|
-
TYPE = 2
|
273
|
-
OPCODE = 3
|
274
|
-
NUM_CHILDREN = 4
|
275
|
-
AGG_EXPR = 5
|
276
|
-
BOOL_LITERAL = 6
|
277
|
-
CASE_EXPR = 7
|
278
|
-
DATE_LITERAL = 8
|
279
|
-
FLOAT_LITERAL = 9
|
280
|
-
INT_LITERAL = 10
|
281
|
-
IN_PREDICATE = 11
|
282
|
-
IS_NULL_PRED = 12
|
283
|
-
LIKE_PRED = 13
|
284
|
-
LITERAL_PRED = 14
|
285
|
-
SLOT_REF = 15
|
286
|
-
STRING_LITERAL = 16
|
287
|
-
|
288
|
-
FIELDS = {
|
289
|
-
NODE_TYPE => { :type => ::Thrift::Types::I32, :name => 'node_type', :enum_class => Impala::Protocol::TExprNodeType },
|
290
|
-
TYPE => { :type => ::Thrift::Types::I32, :name => 'type', :enum_class => Impala::Protocol::TPrimitiveType },
|
291
|
-
OPCODE => { :type => ::Thrift::Types::I32, :name => 'opcode', :optional => true, :enum_class => Impala::Protocol::TExprOpcode },
|
292
|
-
NUM_CHILDREN => { :type => ::Thrift::Types::I32, :name => 'num_children' },
|
293
|
-
AGG_EXPR => { :type => ::Thrift::Types::STRUCT, :name => 'agg_expr', :class => Impala::Protocol::TAggregateExpr, :optional => true },
|
294
|
-
BOOL_LITERAL => { :type => ::Thrift::Types::STRUCT, :name => 'bool_literal', :class => Impala::Protocol::TBoolLiteral, :optional => true },
|
295
|
-
CASE_EXPR => { :type => ::Thrift::Types::STRUCT, :name => 'case_expr', :class => Impala::Protocol::TCaseExpr, :optional => true },
|
296
|
-
DATE_LITERAL => { :type => ::Thrift::Types::STRUCT, :name => 'date_literal', :class => Impala::Protocol::TDateLiteral, :optional => true },
|
297
|
-
FLOAT_LITERAL => { :type => ::Thrift::Types::STRUCT, :name => 'float_literal', :class => Impala::Protocol::TFloatLiteral, :optional => true },
|
298
|
-
INT_LITERAL => { :type => ::Thrift::Types::STRUCT, :name => 'int_literal', :class => Impala::Protocol::TIntLiteral, :optional => true },
|
299
|
-
IN_PREDICATE => { :type => ::Thrift::Types::STRUCT, :name => 'in_predicate', :class => Impala::Protocol::TInPredicate, :optional => true },
|
300
|
-
IS_NULL_PRED => { :type => ::Thrift::Types::STRUCT, :name => 'is_null_pred', :class => Impala::Protocol::TIsNullPredicate, :optional => true },
|
301
|
-
LIKE_PRED => { :type => ::Thrift::Types::STRUCT, :name => 'like_pred', :class => Impala::Protocol::TLikePredicate, :optional => true },
|
302
|
-
LITERAL_PRED => { :type => ::Thrift::Types::STRUCT, :name => 'literal_pred', :class => Impala::Protocol::TLiteralPredicate, :optional => true },
|
303
|
-
SLOT_REF => { :type => ::Thrift::Types::STRUCT, :name => 'slot_ref', :class => Impala::Protocol::TSlotRef, :optional => true },
|
304
|
-
STRING_LITERAL => { :type => ::Thrift::Types::STRUCT, :name => 'string_literal', :class => Impala::Protocol::TStringLiteral, :optional => true }
|
305
|
-
}
|
306
|
-
|
307
|
-
def struct_fields; FIELDS; end
|
308
|
-
|
309
|
-
def validate
|
310
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field node_type is unset!') unless @node_type
|
311
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
|
312
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field num_children is unset!') unless @num_children
|
313
|
-
unless @node_type.nil? || Impala::Protocol::TExprNodeType::VALID_VALUES.include?(@node_type)
|
314
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field node_type!')
|
315
|
-
end
|
316
|
-
unless @type.nil? || Impala::Protocol::TPrimitiveType::VALID_VALUES.include?(@type)
|
317
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
|
318
|
-
end
|
319
|
-
unless @opcode.nil? || Impala::Protocol::TExprOpcode::VALID_VALUES.include?(@opcode)
|
320
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field opcode!')
|
321
|
-
end
|
322
|
-
end
|
323
|
-
|
324
|
-
::Thrift::Struct.generate_accessors self
|
325
|
-
end
|
326
|
-
|
327
|
-
class TExpr
|
328
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
329
|
-
NODES = 1
|
330
|
-
|
331
|
-
FIELDS = {
|
332
|
-
NODES => { :type => ::Thrift::Types::LIST, :name => 'nodes', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TExprNode } }
|
333
|
-
}
|
334
|
-
|
335
|
-
def struct_fields; FIELDS; end
|
336
|
-
|
337
|
-
def validate
|
338
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nodes is unset!') unless @nodes
|
339
|
-
end
|
340
|
-
|
341
|
-
::Thrift::Struct.generate_accessors self
|
342
|
-
end
|
343
|
-
|
344
|
-
end
|
345
|
-
end
|
@@ -1,347 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Autogenerated by Thrift Compiler (0.8.0)
|
3
|
-
#
|
4
|
-
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
-
#
|
6
|
-
|
7
|
-
require 'types_types'
|
8
|
-
require 'impala_internal_service_types'
|
9
|
-
require 'plan_nodes_types'
|
10
|
-
require 'planner_types'
|
11
|
-
require 'descriptors_types'
|
12
|
-
|
13
|
-
|
14
|
-
module Impala
|
15
|
-
module Protocol
|
16
|
-
module TDdlType
|
17
|
-
SHOW_TABLES = 0
|
18
|
-
SHOW_DBS = 1
|
19
|
-
USE = 2
|
20
|
-
DESCRIBE = 3
|
21
|
-
VALUE_MAP = { 0 => "SHOW_TABLES", 1 => "SHOW_DBS", 2 => "USE", 3 => "DESCRIBE" }
|
22
|
-
VALID_VALUES = Set.new([SHOW_TABLES, SHOW_DBS, USE, DESCRIBE]).freeze
|
23
|
-
end
|
24
|
-
|
25
|
-
class TGetTablesParams
|
26
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
27
|
-
DB = 1
|
28
|
-
PATTERN = 2
|
29
|
-
|
30
|
-
FIELDS = {
|
31
|
-
DB => { :type => ::Thrift::Types::STRING, :name => 'db', :optional => true },
|
32
|
-
PATTERN => { :type => ::Thrift::Types::STRING, :name => 'pattern', :optional => true }
|
33
|
-
}
|
34
|
-
|
35
|
-
def struct_fields; FIELDS; end
|
36
|
-
|
37
|
-
def validate
|
38
|
-
end
|
39
|
-
|
40
|
-
::Thrift::Struct.generate_accessors self
|
41
|
-
end
|
42
|
-
|
43
|
-
class TGetTablesResult
|
44
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
45
|
-
TABLES = 1
|
46
|
-
|
47
|
-
FIELDS = {
|
48
|
-
TABLES => { :type => ::Thrift::Types::LIST, :name => 'tables', :element => { :type => ::Thrift::Types::STRING } }
|
49
|
-
}
|
50
|
-
|
51
|
-
def struct_fields; FIELDS; end
|
52
|
-
|
53
|
-
def validate
|
54
|
-
end
|
55
|
-
|
56
|
-
::Thrift::Struct.generate_accessors self
|
57
|
-
end
|
58
|
-
|
59
|
-
class TGetDbsParams
|
60
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
61
|
-
PATTERN = 1
|
62
|
-
|
63
|
-
FIELDS = {
|
64
|
-
PATTERN => { :type => ::Thrift::Types::STRING, :name => 'pattern', :optional => true }
|
65
|
-
}
|
66
|
-
|
67
|
-
def struct_fields; FIELDS; end
|
68
|
-
|
69
|
-
def validate
|
70
|
-
end
|
71
|
-
|
72
|
-
::Thrift::Struct.generate_accessors self
|
73
|
-
end
|
74
|
-
|
75
|
-
class TGetDbsResult
|
76
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
77
|
-
DBS = 1
|
78
|
-
|
79
|
-
FIELDS = {
|
80
|
-
DBS => { :type => ::Thrift::Types::LIST, :name => 'dbs', :element => { :type => ::Thrift::Types::STRING } }
|
81
|
-
}
|
82
|
-
|
83
|
-
def struct_fields; FIELDS; end
|
84
|
-
|
85
|
-
def validate
|
86
|
-
end
|
87
|
-
|
88
|
-
::Thrift::Struct.generate_accessors self
|
89
|
-
end
|
90
|
-
|
91
|
-
class TColumnDesc
|
92
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
93
|
-
COLUMNNAME = 1
|
94
|
-
COLUMNTYPE = 2
|
95
|
-
|
96
|
-
FIELDS = {
|
97
|
-
COLUMNNAME => { :type => ::Thrift::Types::STRING, :name => 'columnName' },
|
98
|
-
COLUMNTYPE => { :type => ::Thrift::Types::I32, :name => 'columnType', :enum_class => Impala::Protocol::TPrimitiveType }
|
99
|
-
}
|
100
|
-
|
101
|
-
def struct_fields; FIELDS; end
|
102
|
-
|
103
|
-
def validate
|
104
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columnName is unset!') unless @columnName
|
105
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columnType is unset!') unless @columnType
|
106
|
-
unless @columnType.nil? || Impala::Protocol::TPrimitiveType::VALID_VALUES.include?(@columnType)
|
107
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field columnType!')
|
108
|
-
end
|
109
|
-
end
|
110
|
-
|
111
|
-
::Thrift::Struct.generate_accessors self
|
112
|
-
end
|
113
|
-
|
114
|
-
class TDescribeTableParams
|
115
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
116
|
-
DB = 1
|
117
|
-
TABLE_NAME = 2
|
118
|
-
|
119
|
-
FIELDS = {
|
120
|
-
DB => { :type => ::Thrift::Types::STRING, :name => 'db', :optional => true },
|
121
|
-
TABLE_NAME => { :type => ::Thrift::Types::STRING, :name => 'table_name' }
|
122
|
-
}
|
123
|
-
|
124
|
-
def struct_fields; FIELDS; end
|
125
|
-
|
126
|
-
def validate
|
127
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field table_name is unset!') unless @table_name
|
128
|
-
end
|
129
|
-
|
130
|
-
::Thrift::Struct.generate_accessors self
|
131
|
-
end
|
132
|
-
|
133
|
-
class TDescribeTableResult
|
134
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
135
|
-
COLUMNS = 1
|
136
|
-
|
137
|
-
FIELDS = {
|
138
|
-
COLUMNS => { :type => ::Thrift::Types::LIST, :name => 'columns', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TColumnDesc } }
|
139
|
-
}
|
140
|
-
|
141
|
-
def struct_fields; FIELDS; end
|
142
|
-
|
143
|
-
def validate
|
144
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns
|
145
|
-
end
|
146
|
-
|
147
|
-
::Thrift::Struct.generate_accessors self
|
148
|
-
end
|
149
|
-
|
150
|
-
class TSessionState
|
151
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
152
|
-
DATABASE = 1
|
153
|
-
|
154
|
-
FIELDS = {
|
155
|
-
DATABASE => { :type => ::Thrift::Types::STRING, :name => 'database' }
|
156
|
-
}
|
157
|
-
|
158
|
-
def struct_fields; FIELDS; end
|
159
|
-
|
160
|
-
def validate
|
161
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field database is unset!') unless @database
|
162
|
-
end
|
163
|
-
|
164
|
-
::Thrift::Struct.generate_accessors self
|
165
|
-
end
|
166
|
-
|
167
|
-
class TClientRequest
|
168
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
169
|
-
STMT = 1
|
170
|
-
QUERYOPTIONS = 2
|
171
|
-
SESSIONSTATE = 3
|
172
|
-
|
173
|
-
FIELDS = {
|
174
|
-
STMT => { :type => ::Thrift::Types::STRING, :name => 'stmt' },
|
175
|
-
QUERYOPTIONS => { :type => ::Thrift::Types::STRUCT, :name => 'queryOptions', :class => Impala::Protocol::TQueryOptions },
|
176
|
-
SESSIONSTATE => { :type => ::Thrift::Types::STRUCT, :name => 'sessionState', :class => Impala::Protocol::TSessionState }
|
177
|
-
}
|
178
|
-
|
179
|
-
def struct_fields; FIELDS; end
|
180
|
-
|
181
|
-
def validate
|
182
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field stmt is unset!') unless @stmt
|
183
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field queryOptions is unset!') unless @queryOptions
|
184
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionState is unset!') unless @sessionState
|
185
|
-
end
|
186
|
-
|
187
|
-
::Thrift::Struct.generate_accessors self
|
188
|
-
end
|
189
|
-
|
190
|
-
class TResultSetMetadata
|
191
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
192
|
-
COLUMNDESCS = 1
|
193
|
-
|
194
|
-
FIELDS = {
|
195
|
-
COLUMNDESCS => { :type => ::Thrift::Types::LIST, :name => 'columnDescs', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TColumnDesc } }
|
196
|
-
}
|
197
|
-
|
198
|
-
def struct_fields; FIELDS; end
|
199
|
-
|
200
|
-
def validate
|
201
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columnDescs is unset!') unless @columnDescs
|
202
|
-
end
|
203
|
-
|
204
|
-
::Thrift::Struct.generate_accessors self
|
205
|
-
end
|
206
|
-
|
207
|
-
class TCatalogUpdate
|
208
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
209
|
-
TARGET_TABLE = 1
|
210
|
-
DB_NAME = 2
|
211
|
-
CREATED_PARTITIONS = 3
|
212
|
-
|
213
|
-
FIELDS = {
|
214
|
-
TARGET_TABLE => { :type => ::Thrift::Types::STRING, :name => 'target_table' },
|
215
|
-
DB_NAME => { :type => ::Thrift::Types::STRING, :name => 'db_name' },
|
216
|
-
CREATED_PARTITIONS => { :type => ::Thrift::Types::SET, :name => 'created_partitions', :element => { :type => ::Thrift::Types::STRING } }
|
217
|
-
}
|
218
|
-
|
219
|
-
def struct_fields; FIELDS; end
|
220
|
-
|
221
|
-
def validate
|
222
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field target_table is unset!') unless @target_table
|
223
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field db_name is unset!') unless @db_name
|
224
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field created_partitions is unset!') unless @created_partitions
|
225
|
-
end
|
226
|
-
|
227
|
-
::Thrift::Struct.generate_accessors self
|
228
|
-
end
|
229
|
-
|
230
|
-
class TFinalizeParams
|
231
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
232
|
-
IS_OVERWRITE = 1
|
233
|
-
HDFS_BASE_DIR = 2
|
234
|
-
TABLE_NAME = 3
|
235
|
-
TABLE_DB = 4
|
236
|
-
|
237
|
-
FIELDS = {
|
238
|
-
IS_OVERWRITE => { :type => ::Thrift::Types::BOOL, :name => 'is_overwrite' },
|
239
|
-
HDFS_BASE_DIR => { :type => ::Thrift::Types::STRING, :name => 'hdfs_base_dir' },
|
240
|
-
TABLE_NAME => { :type => ::Thrift::Types::STRING, :name => 'table_name' },
|
241
|
-
TABLE_DB => { :type => ::Thrift::Types::STRING, :name => 'table_db' }
|
242
|
-
}
|
243
|
-
|
244
|
-
def struct_fields; FIELDS; end
|
245
|
-
|
246
|
-
def validate
|
247
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field is_overwrite is unset!') if @is_overwrite.nil?
|
248
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hdfs_base_dir is unset!') unless @hdfs_base_dir
|
249
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field table_name is unset!') unless @table_name
|
250
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field table_db is unset!') unless @table_db
|
251
|
-
end
|
252
|
-
|
253
|
-
::Thrift::Struct.generate_accessors self
|
254
|
-
end
|
255
|
-
|
256
|
-
class TQueryExecRequest
|
257
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
258
|
-
DESC_TBL = 1
|
259
|
-
FRAGMENTS = 2
|
260
|
-
DEST_FRAGMENT_IDX = 3
|
261
|
-
PER_NODE_SCAN_RANGES = 4
|
262
|
-
RESULT_SET_METADATA = 5
|
263
|
-
FINALIZE_PARAMS = 6
|
264
|
-
QUERY_GLOBALS = 7
|
265
|
-
|
266
|
-
FIELDS = {
|
267
|
-
DESC_TBL => { :type => ::Thrift::Types::STRUCT, :name => 'desc_tbl', :class => Impala::Protocol::TDescriptorTable, :optional => true },
|
268
|
-
FRAGMENTS => { :type => ::Thrift::Types::LIST, :name => 'fragments', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TPlanFragment } },
|
269
|
-
DEST_FRAGMENT_IDX => { :type => ::Thrift::Types::LIST, :name => 'dest_fragment_idx', :element => { :type => ::Thrift::Types::I32 }, :optional => true },
|
270
|
-
PER_NODE_SCAN_RANGES => { :type => ::Thrift::Types::MAP, :name => 'per_node_scan_ranges', :key => { :type => ::Thrift::Types::I32 }, :value => { :type => ::Thrift::Types::LIST, :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TScanRangeLocations } }, :optional => true },
|
271
|
-
RESULT_SET_METADATA => { :type => ::Thrift::Types::STRUCT, :name => 'result_set_metadata', :class => Impala::Protocol::TResultSetMetadata, :optional => true },
|
272
|
-
FINALIZE_PARAMS => { :type => ::Thrift::Types::STRUCT, :name => 'finalize_params', :class => Impala::Protocol::TFinalizeParams, :optional => true },
|
273
|
-
QUERY_GLOBALS => { :type => ::Thrift::Types::STRUCT, :name => 'query_globals', :class => Impala::Protocol::TQueryGlobals }
|
274
|
-
}
|
275
|
-
|
276
|
-
def struct_fields; FIELDS; end
|
277
|
-
|
278
|
-
def validate
|
279
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fragments is unset!') unless @fragments
|
280
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field query_globals is unset!') unless @query_globals
|
281
|
-
end
|
282
|
-
|
283
|
-
::Thrift::Struct.generate_accessors self
|
284
|
-
end
|
285
|
-
|
286
|
-
class TDdlExecRequest
|
287
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
288
|
-
DDL_TYPE = 1
|
289
|
-
DATABASE = 2
|
290
|
-
DESCRIBE_TABLE = 3
|
291
|
-
SHOW_PATTERN = 4
|
292
|
-
|
293
|
-
FIELDS = {
|
294
|
-
DDL_TYPE => { :type => ::Thrift::Types::I32, :name => 'ddl_type', :enum_class => Impala::Protocol::TDdlType },
|
295
|
-
DATABASE => { :type => ::Thrift::Types::STRING, :name => 'database', :optional => true },
|
296
|
-
DESCRIBE_TABLE => { :type => ::Thrift::Types::STRING, :name => 'describe_table', :optional => true },
|
297
|
-
SHOW_PATTERN => { :type => ::Thrift::Types::STRING, :name => 'show_pattern', :optional => true }
|
298
|
-
}
|
299
|
-
|
300
|
-
def struct_fields; FIELDS; end
|
301
|
-
|
302
|
-
def validate
|
303
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field ddl_type is unset!') unless @ddl_type
|
304
|
-
unless @ddl_type.nil? || Impala::Protocol::TDdlType::VALID_VALUES.include?(@ddl_type)
|
305
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field ddl_type!')
|
306
|
-
end
|
307
|
-
end
|
308
|
-
|
309
|
-
::Thrift::Struct.generate_accessors self
|
310
|
-
end
|
311
|
-
|
312
|
-
class TExecRequest
|
313
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
314
|
-
STMT_TYPE = 1
|
315
|
-
SQL_STMT = 2
|
316
|
-
REQUEST_ID = 3
|
317
|
-
QUERY_OPTIONS = 4
|
318
|
-
QUERY_EXEC_REQUEST = 5
|
319
|
-
DDL_EXEC_REQUEST = 6
|
320
|
-
RESULT_SET_METADATA = 7
|
321
|
-
|
322
|
-
FIELDS = {
|
323
|
-
STMT_TYPE => { :type => ::Thrift::Types::I32, :name => 'stmt_type', :enum_class => Impala::Protocol::TStmtType },
|
324
|
-
SQL_STMT => { :type => ::Thrift::Types::STRING, :name => 'sql_stmt', :optional => true },
|
325
|
-
REQUEST_ID => { :type => ::Thrift::Types::STRUCT, :name => 'request_id', :class => Impala::Protocol::TUniqueId },
|
326
|
-
QUERY_OPTIONS => { :type => ::Thrift::Types::STRUCT, :name => 'query_options', :class => Impala::Protocol::TQueryOptions },
|
327
|
-
QUERY_EXEC_REQUEST => { :type => ::Thrift::Types::STRUCT, :name => 'query_exec_request', :class => Impala::Protocol::TQueryExecRequest, :optional => true },
|
328
|
-
DDL_EXEC_REQUEST => { :type => ::Thrift::Types::STRUCT, :name => 'ddl_exec_request', :class => Impala::Protocol::TDdlExecRequest, :optional => true },
|
329
|
-
RESULT_SET_METADATA => { :type => ::Thrift::Types::STRUCT, :name => 'result_set_metadata', :class => Impala::Protocol::TResultSetMetadata, :optional => true }
|
330
|
-
}
|
331
|
-
|
332
|
-
def struct_fields; FIELDS; end
|
333
|
-
|
334
|
-
def validate
|
335
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field stmt_type is unset!') unless @stmt_type
|
336
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field request_id is unset!') unless @request_id
|
337
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field query_options is unset!') unless @query_options
|
338
|
-
unless @stmt_type.nil? || Impala::Protocol::TStmtType::VALID_VALUES.include?(@stmt_type)
|
339
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field stmt_type!')
|
340
|
-
end
|
341
|
-
end
|
342
|
-
|
343
|
-
::Thrift::Struct.generate_accessors self
|
344
|
-
end
|
345
|
-
|
346
|
-
end
|
347
|
-
end
|