impala 0.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.
- data/.gitignore +17 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +22 -0
- data/README.md +28 -0
- data/Rakefile +15 -0
- data/impala.gemspec +25 -0
- data/lib/impala.rb +33 -0
- data/lib/impala/connection.rb +93 -0
- data/lib/impala/cursor.rb +86 -0
- data/lib/impala/protocol.rb +6 -0
- data/lib/impala/protocol/beeswax_constants.rb +14 -0
- data/lib/impala/protocol/beeswax_service.rb +747 -0
- data/lib/impala/protocol/beeswax_types.rb +192 -0
- data/lib/impala/protocol/data_constants.rb +12 -0
- data/lib/impala/protocol/data_sinks_constants.rb +12 -0
- data/lib/impala/protocol/data_sinks_types.rb +107 -0
- data/lib/impala/protocol/data_types.rb +77 -0
- data/lib/impala/protocol/descriptors_constants.rb +12 -0
- data/lib/impala/protocol/descriptors_types.rb +266 -0
- data/lib/impala/protocol/exprs_constants.rb +12 -0
- data/lib/impala/protocol/exprs_types.rb +345 -0
- data/lib/impala/protocol/facebook_service.rb +706 -0
- data/lib/impala/protocol/fb303_constants.rb +14 -0
- data/lib/impala/protocol/fb303_types.rb +24 -0
- data/lib/impala/protocol/frontend_constants.rb +12 -0
- data/lib/impala/protocol/frontend_types.rb +347 -0
- data/lib/impala/protocol/hive_metastore_constants.rb +52 -0
- data/lib/impala/protocol/hive_metastore_types.rb +697 -0
- data/lib/impala/protocol/impala_internal_service.rb +244 -0
- data/lib/impala/protocol/impala_internal_service_constants.rb +12 -0
- data/lib/impala/protocol/impala_internal_service_types.rb +362 -0
- data/lib/impala/protocol/impala_plan_service.rb +310 -0
- data/lib/impala/protocol/impala_plan_service_constants.rb +12 -0
- data/lib/impala/protocol/impala_plan_service_types.rb +36 -0
- data/lib/impala/protocol/impala_service.rb +260 -0
- data/lib/impala/protocol/impala_service_constants.rb +12 -0
- data/lib/impala/protocol/impala_service_types.rb +46 -0
- data/lib/impala/protocol/java_constants_constants.rb +42 -0
- data/lib/impala/protocol/java_constants_types.rb +14 -0
- data/lib/impala/protocol/opcodes_constants.rb +12 -0
- data/lib/impala/protocol/opcodes_types.rb +309 -0
- data/lib/impala/protocol/partitions_constants.rb +12 -0
- data/lib/impala/protocol/partitions_types.rb +44 -0
- data/lib/impala/protocol/plan_nodes_constants.rb +12 -0
- data/lib/impala/protocol/plan_nodes_types.rb +345 -0
- data/lib/impala/protocol/planner_constants.rb +12 -0
- data/lib/impala/protocol/planner_types.rb +78 -0
- data/lib/impala/protocol/runtime_profile_constants.rb +12 -0
- data/lib/impala/protocol/runtime_profile_types.rb +97 -0
- data/lib/impala/protocol/state_store_service.rb +244 -0
- data/lib/impala/protocol/state_store_service_constants.rb +12 -0
- data/lib/impala/protocol/state_store_service_types.rb +185 -0
- data/lib/impala/protocol/state_store_subscriber_service.rb +82 -0
- data/lib/impala/protocol/state_store_subscriber_service_constants.rb +12 -0
- data/lib/impala/protocol/state_store_subscriber_service_types.rb +67 -0
- data/lib/impala/protocol/statestore_types_constants.rb +12 -0
- data/lib/impala/protocol/statestore_types_types.rb +77 -0
- data/lib/impala/protocol/status_constants.rb +12 -0
- data/lib/impala/protocol/status_types.rb +44 -0
- data/lib/impala/protocol/thrift_hive_metastore.rb +4707 -0
- data/lib/impala/protocol/types_constants.rb +12 -0
- data/lib/impala/protocol/types_types.rb +86 -0
- data/lib/impala/version.rb +3 -0
- data/thrift/Data.thrift +52 -0
- data/thrift/DataSinks.thrift +61 -0
- data/thrift/Descriptors.thrift +115 -0
- data/thrift/Exprs.thrift +134 -0
- data/thrift/Frontend.thrift +193 -0
- data/thrift/ImpalaInternalService.thrift +265 -0
- data/thrift/ImpalaPlanService.thrift +44 -0
- data/thrift/ImpalaService.thrift +105 -0
- data/thrift/JavaConstants.thrift +60 -0
- data/thrift/Opcodes.thrift +317 -0
- data/thrift/Partitions.thrift +41 -0
- data/thrift/PlanNodes.thrift +184 -0
- data/thrift/Planner.thrift +72 -0
- data/thrift/RuntimeProfile.thrift +58 -0
- data/thrift/StateStoreService.thrift +121 -0
- data/thrift/StateStoreSubscriberService.thrift +64 -0
- data/thrift/StatestoreTypes.thrift +50 -0
- data/thrift/Status.thrift +31 -0
- data/thrift/Types.thrift +71 -0
- data/thrift/beeswax.thrift +175 -0
- data/thrift/fb303.thrift +112 -0
- data/thrift/hive_metastore.thrift +528 -0
- metadata +206 -0
|
@@ -0,0 +1,44 @@
|
|
|
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 'exprs_types'
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
module Impala
|
|
11
|
+
module Protocol
|
|
12
|
+
module TPartitionType
|
|
13
|
+
UNPARTITIONED = 0
|
|
14
|
+
RANDOM = 1
|
|
15
|
+
HASH_PARTITIONED = 2
|
|
16
|
+
RANGE_PARTITIONED = 3
|
|
17
|
+
VALUE_MAP = { 0 => "UNPARTITIONED", 1 => "RANDOM", 2 => "HASH_PARTITIONED", 3 => "RANGE_PARTITIONED" }
|
|
18
|
+
VALID_VALUES = Set.new([UNPARTITIONED, RANDOM, HASH_PARTITIONED, RANGE_PARTITIONED]).freeze
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
class TDataPartition
|
|
22
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
23
|
+
TYPE = 1
|
|
24
|
+
PARTITIONING_EXPRS = 2
|
|
25
|
+
|
|
26
|
+
FIELDS = {
|
|
27
|
+
TYPE => { :type => ::Thrift::Types::I32, :name => 'type', :enum_class => Impala::Protocol::TPartitionType },
|
|
28
|
+
PARTITIONING_EXPRS => { :type => ::Thrift::Types::LIST, :name => 'partitioning_exprs', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TExpr }, :optional => true }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
def struct_fields; FIELDS; end
|
|
32
|
+
|
|
33
|
+
def validate
|
|
34
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
|
|
35
|
+
unless @type.nil? || Impala::Protocol::TPartitionType::VALID_VALUES.include?(@type)
|
|
36
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
::Thrift::Struct.generate_accessors self
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,345 @@
|
|
|
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 'exprs_types'
|
|
8
|
+
require 'types_types'
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
module Impala
|
|
12
|
+
module Protocol
|
|
13
|
+
module TPlanNodeType
|
|
14
|
+
HDFS_SCAN_NODE = 0
|
|
15
|
+
HBASE_SCAN_NODE = 1
|
|
16
|
+
HASH_JOIN_NODE = 2
|
|
17
|
+
AGGREGATION_NODE = 3
|
|
18
|
+
SORT_NODE = 4
|
|
19
|
+
EXCHANGE_NODE = 5
|
|
20
|
+
MERGE_NODE = 6
|
|
21
|
+
VALUE_MAP = { 0 => "HDFS_SCAN_NODE", 1 => "HBASE_SCAN_NODE", 2 => "HASH_JOIN_NODE", 3 => "AGGREGATION_NODE", 4 => "SORT_NODE", 5 => "EXCHANGE_NODE", 6 => "MERGE_NODE" }
|
|
22
|
+
VALID_VALUES = Set.new([HDFS_SCAN_NODE, HBASE_SCAN_NODE, HASH_JOIN_NODE, AGGREGATION_NODE, SORT_NODE, EXCHANGE_NODE, MERGE_NODE]).freeze
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
module TJoinOp
|
|
26
|
+
INNER_JOIN = 0
|
|
27
|
+
LEFT_OUTER_JOIN = 1
|
|
28
|
+
LEFT_SEMI_JOIN = 2
|
|
29
|
+
RIGHT_OUTER_JOIN = 3
|
|
30
|
+
FULL_OUTER_JOIN = 4
|
|
31
|
+
VALUE_MAP = { 0 => "INNER_JOIN", 1 => "LEFT_OUTER_JOIN", 2 => "LEFT_SEMI_JOIN", 3 => "RIGHT_OUTER_JOIN", 4 => "FULL_OUTER_JOIN" }
|
|
32
|
+
VALID_VALUES = Set.new([INNER_JOIN, LEFT_OUTER_JOIN, LEFT_SEMI_JOIN, RIGHT_OUTER_JOIN, FULL_OUTER_JOIN]).freeze
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
class THdfsFileSplit
|
|
36
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
37
|
+
PATH = 1
|
|
38
|
+
OFFSET = 2
|
|
39
|
+
LENGTH = 3
|
|
40
|
+
PARTITION_ID = 4
|
|
41
|
+
|
|
42
|
+
FIELDS = {
|
|
43
|
+
PATH => { :type => ::Thrift::Types::STRING, :name => 'path' },
|
|
44
|
+
OFFSET => { :type => ::Thrift::Types::I64, :name => 'offset' },
|
|
45
|
+
LENGTH => { :type => ::Thrift::Types::I64, :name => 'length' },
|
|
46
|
+
PARTITION_ID => { :type => ::Thrift::Types::I64, :name => 'partition_id' }
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
def struct_fields; FIELDS; end
|
|
50
|
+
|
|
51
|
+
def validate
|
|
52
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field path is unset!') unless @path
|
|
53
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field offset is unset!') unless @offset
|
|
54
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field length is unset!') unless @length
|
|
55
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partition_id is unset!') unless @partition_id
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
::Thrift::Struct.generate_accessors self
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
class THBaseKeyRange
|
|
62
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
63
|
+
STARTKEY = 1
|
|
64
|
+
STOPKEY = 2
|
|
65
|
+
|
|
66
|
+
FIELDS = {
|
|
67
|
+
STARTKEY => { :type => ::Thrift::Types::STRING, :name => 'startKey', :optional => true },
|
|
68
|
+
STOPKEY => { :type => ::Thrift::Types::STRING, :name => 'stopKey', :optional => true }
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
def struct_fields; FIELDS; end
|
|
72
|
+
|
|
73
|
+
def validate
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
::Thrift::Struct.generate_accessors self
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
class TScanRange
|
|
80
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
81
|
+
HDFS_FILE_SPLIT = 1
|
|
82
|
+
HBASE_KEY_RANGE = 2
|
|
83
|
+
|
|
84
|
+
FIELDS = {
|
|
85
|
+
HDFS_FILE_SPLIT => { :type => ::Thrift::Types::STRUCT, :name => 'hdfs_file_split', :class => Impala::Protocol::THdfsFileSplit, :optional => true },
|
|
86
|
+
HBASE_KEY_RANGE => { :type => ::Thrift::Types::STRUCT, :name => 'hbase_key_range', :class => Impala::Protocol::THBaseKeyRange, :optional => true }
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
def struct_fields; FIELDS; end
|
|
90
|
+
|
|
91
|
+
def validate
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
::Thrift::Struct.generate_accessors self
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
class THdfsScanNode
|
|
98
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
99
|
+
TUPLE_ID = 1
|
|
100
|
+
|
|
101
|
+
FIELDS = {
|
|
102
|
+
TUPLE_ID => { :type => ::Thrift::Types::I32, :name => 'tuple_id' }
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
def struct_fields; FIELDS; end
|
|
106
|
+
|
|
107
|
+
def validate
|
|
108
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tuple_id is unset!') unless @tuple_id
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
::Thrift::Struct.generate_accessors self
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
class THBaseFilter
|
|
115
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
116
|
+
FAMILY = 1
|
|
117
|
+
QUALIFIER = 2
|
|
118
|
+
OP_ORDINAL = 3
|
|
119
|
+
FILTER_CONSTANT = 4
|
|
120
|
+
|
|
121
|
+
FIELDS = {
|
|
122
|
+
FAMILY => { :type => ::Thrift::Types::STRING, :name => 'family' },
|
|
123
|
+
QUALIFIER => { :type => ::Thrift::Types::STRING, :name => 'qualifier' },
|
|
124
|
+
OP_ORDINAL => { :type => ::Thrift::Types::I32, :name => 'op_ordinal' },
|
|
125
|
+
FILTER_CONSTANT => { :type => ::Thrift::Types::STRING, :name => 'filter_constant' }
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
def struct_fields; FIELDS; end
|
|
129
|
+
|
|
130
|
+
def validate
|
|
131
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field family is unset!') unless @family
|
|
132
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field qualifier is unset!') unless @qualifier
|
|
133
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field op_ordinal is unset!') unless @op_ordinal
|
|
134
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field filter_constant is unset!') unless @filter_constant
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
::Thrift::Struct.generate_accessors self
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
class THBaseScanNode
|
|
141
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
142
|
+
TUPLE_ID = 1
|
|
143
|
+
TABLE_NAME = 2
|
|
144
|
+
FILTERS = 3
|
|
145
|
+
|
|
146
|
+
FIELDS = {
|
|
147
|
+
TUPLE_ID => { :type => ::Thrift::Types::I32, :name => 'tuple_id' },
|
|
148
|
+
TABLE_NAME => { :type => ::Thrift::Types::STRING, :name => 'table_name' },
|
|
149
|
+
FILTERS => { :type => ::Thrift::Types::LIST, :name => 'filters', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::THBaseFilter }, :optional => true }
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
def struct_fields; FIELDS; end
|
|
153
|
+
|
|
154
|
+
def validate
|
|
155
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tuple_id is unset!') unless @tuple_id
|
|
156
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field table_name is unset!') unless @table_name
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
::Thrift::Struct.generate_accessors self
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
class TEqJoinCondition
|
|
163
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
164
|
+
LEFT = 1
|
|
165
|
+
RIGHT = 2
|
|
166
|
+
|
|
167
|
+
FIELDS = {
|
|
168
|
+
LEFT => { :type => ::Thrift::Types::STRUCT, :name => 'left', :class => Impala::Protocol::TExpr },
|
|
169
|
+
RIGHT => { :type => ::Thrift::Types::STRUCT, :name => 'right', :class => Impala::Protocol::TExpr }
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
def struct_fields; FIELDS; end
|
|
173
|
+
|
|
174
|
+
def validate
|
|
175
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field left is unset!') unless @left
|
|
176
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field right is unset!') unless @right
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
::Thrift::Struct.generate_accessors self
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
class THashJoinNode
|
|
183
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
184
|
+
JOIN_OP = 1
|
|
185
|
+
EQ_JOIN_CONJUNCTS = 2
|
|
186
|
+
OTHER_JOIN_CONJUNCTS = 3
|
|
187
|
+
|
|
188
|
+
FIELDS = {
|
|
189
|
+
JOIN_OP => { :type => ::Thrift::Types::I32, :name => 'join_op', :enum_class => Impala::Protocol::TJoinOp },
|
|
190
|
+
EQ_JOIN_CONJUNCTS => { :type => ::Thrift::Types::LIST, :name => 'eq_join_conjuncts', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TEqJoinCondition } },
|
|
191
|
+
OTHER_JOIN_CONJUNCTS => { :type => ::Thrift::Types::LIST, :name => 'other_join_conjuncts', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TExpr }, :optional => true }
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
def struct_fields; FIELDS; end
|
|
195
|
+
|
|
196
|
+
def validate
|
|
197
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field join_op is unset!') unless @join_op
|
|
198
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field eq_join_conjuncts is unset!') unless @eq_join_conjuncts
|
|
199
|
+
unless @join_op.nil? || Impala::Protocol::TJoinOp::VALID_VALUES.include?(@join_op)
|
|
200
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field join_op!')
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
::Thrift::Struct.generate_accessors self
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
class TAggregationNode
|
|
208
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
209
|
+
GROUPING_EXPRS = 1
|
|
210
|
+
AGGREGATE_EXPRS = 2
|
|
211
|
+
AGG_TUPLE_ID = 3
|
|
212
|
+
NEED_FINALIZE = 4
|
|
213
|
+
|
|
214
|
+
FIELDS = {
|
|
215
|
+
GROUPING_EXPRS => { :type => ::Thrift::Types::LIST, :name => 'grouping_exprs', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TExpr }, :optional => true },
|
|
216
|
+
AGGREGATE_EXPRS => { :type => ::Thrift::Types::LIST, :name => 'aggregate_exprs', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TExpr } },
|
|
217
|
+
AGG_TUPLE_ID => { :type => ::Thrift::Types::I32, :name => 'agg_tuple_id' },
|
|
218
|
+
NEED_FINALIZE => { :type => ::Thrift::Types::BOOL, :name => 'need_finalize' }
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
def struct_fields; FIELDS; end
|
|
222
|
+
|
|
223
|
+
def validate
|
|
224
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field aggregate_exprs is unset!') unless @aggregate_exprs
|
|
225
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field agg_tuple_id is unset!') unless @agg_tuple_id
|
|
226
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field need_finalize is unset!') if @need_finalize.nil?
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
::Thrift::Struct.generate_accessors self
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
class TSortNode
|
|
233
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
234
|
+
ORDERING_EXPRS = 1
|
|
235
|
+
IS_ASC_ORDER = 2
|
|
236
|
+
USE_TOP_N = 3
|
|
237
|
+
|
|
238
|
+
FIELDS = {
|
|
239
|
+
ORDERING_EXPRS => { :type => ::Thrift::Types::LIST, :name => 'ordering_exprs', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TExpr } },
|
|
240
|
+
IS_ASC_ORDER => { :type => ::Thrift::Types::LIST, :name => 'is_asc_order', :element => { :type => ::Thrift::Types::BOOL } },
|
|
241
|
+
USE_TOP_N => { :type => ::Thrift::Types::BOOL, :name => 'use_top_n' }
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
def struct_fields; FIELDS; end
|
|
245
|
+
|
|
246
|
+
def validate
|
|
247
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field ordering_exprs is unset!') unless @ordering_exprs
|
|
248
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field is_asc_order is unset!') unless @is_asc_order
|
|
249
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field use_top_n is unset!') if @use_top_n.nil?
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
::Thrift::Struct.generate_accessors self
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
class TMergeNode
|
|
256
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
257
|
+
RESULT_EXPR_LISTS = 1
|
|
258
|
+
CONST_EXPR_LISTS = 2
|
|
259
|
+
|
|
260
|
+
FIELDS = {
|
|
261
|
+
RESULT_EXPR_LISTS => { :type => ::Thrift::Types::LIST, :name => 'result_expr_lists', :element => { :type => ::Thrift::Types::LIST, :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TExpr } } },
|
|
262
|
+
CONST_EXPR_LISTS => { :type => ::Thrift::Types::LIST, :name => 'const_expr_lists', :element => { :type => ::Thrift::Types::LIST, :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TExpr } } }
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
def struct_fields; FIELDS; end
|
|
266
|
+
|
|
267
|
+
def validate
|
|
268
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field result_expr_lists is unset!') unless @result_expr_lists
|
|
269
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field const_expr_lists is unset!') unless @const_expr_lists
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
::Thrift::Struct.generate_accessors self
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
class TPlanNode
|
|
276
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
277
|
+
NODE_ID = 1
|
|
278
|
+
NODE_TYPE = 2
|
|
279
|
+
NUM_CHILDREN = 3
|
|
280
|
+
LIMIT = 4
|
|
281
|
+
ROW_TUPLES = 5
|
|
282
|
+
NULLABLE_TUPLES = 6
|
|
283
|
+
CONJUNCTS = 7
|
|
284
|
+
COMPACT_DATA = 8
|
|
285
|
+
HDFS_SCAN_NODE = 9
|
|
286
|
+
HBASE_SCAN_NODE = 10
|
|
287
|
+
HASH_JOIN_NODE = 11
|
|
288
|
+
AGG_NODE = 12
|
|
289
|
+
SORT_NODE = 13
|
|
290
|
+
MERGE_NODE = 14
|
|
291
|
+
|
|
292
|
+
FIELDS = {
|
|
293
|
+
NODE_ID => { :type => ::Thrift::Types::I32, :name => 'node_id' },
|
|
294
|
+
NODE_TYPE => { :type => ::Thrift::Types::I32, :name => 'node_type', :enum_class => Impala::Protocol::TPlanNodeType },
|
|
295
|
+
NUM_CHILDREN => { :type => ::Thrift::Types::I32, :name => 'num_children' },
|
|
296
|
+
LIMIT => { :type => ::Thrift::Types::I64, :name => 'limit' },
|
|
297
|
+
ROW_TUPLES => { :type => ::Thrift::Types::LIST, :name => 'row_tuples', :element => { :type => ::Thrift::Types::I32 } },
|
|
298
|
+
NULLABLE_TUPLES => { :type => ::Thrift::Types::LIST, :name => 'nullable_tuples', :element => { :type => ::Thrift::Types::BOOL } },
|
|
299
|
+
CONJUNCTS => { :type => ::Thrift::Types::LIST, :name => 'conjuncts', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TExpr }, :optional => true },
|
|
300
|
+
COMPACT_DATA => { :type => ::Thrift::Types::BOOL, :name => 'compact_data' },
|
|
301
|
+
HDFS_SCAN_NODE => { :type => ::Thrift::Types::STRUCT, :name => 'hdfs_scan_node', :class => Impala::Protocol::THdfsScanNode, :optional => true },
|
|
302
|
+
HBASE_SCAN_NODE => { :type => ::Thrift::Types::STRUCT, :name => 'hbase_scan_node', :class => Impala::Protocol::THBaseScanNode, :optional => true },
|
|
303
|
+
HASH_JOIN_NODE => { :type => ::Thrift::Types::STRUCT, :name => 'hash_join_node', :class => Impala::Protocol::THashJoinNode, :optional => true },
|
|
304
|
+
AGG_NODE => { :type => ::Thrift::Types::STRUCT, :name => 'agg_node', :class => Impala::Protocol::TAggregationNode, :optional => true },
|
|
305
|
+
SORT_NODE => { :type => ::Thrift::Types::STRUCT, :name => 'sort_node', :class => Impala::Protocol::TSortNode, :optional => true },
|
|
306
|
+
MERGE_NODE => { :type => ::Thrift::Types::STRUCT, :name => 'merge_node', :class => Impala::Protocol::TMergeNode, :optional => true }
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
def struct_fields; FIELDS; end
|
|
310
|
+
|
|
311
|
+
def validate
|
|
312
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field node_id is unset!') unless @node_id
|
|
313
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field node_type is unset!') unless @node_type
|
|
314
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field num_children is unset!') unless @num_children
|
|
315
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field limit is unset!') unless @limit
|
|
316
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field row_tuples is unset!') unless @row_tuples
|
|
317
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nullable_tuples is unset!') unless @nullable_tuples
|
|
318
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field compact_data is unset!') if @compact_data.nil?
|
|
319
|
+
unless @node_type.nil? || Impala::Protocol::TPlanNodeType::VALID_VALUES.include?(@node_type)
|
|
320
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field node_type!')
|
|
321
|
+
end
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
::Thrift::Struct.generate_accessors self
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
class TPlan
|
|
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::TPlanNode } }
|
|
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
|
|
@@ -0,0 +1,78 @@
|
|
|
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 'exprs_types'
|
|
9
|
+
require 'data_sinks_types'
|
|
10
|
+
require 'plan_nodes_types'
|
|
11
|
+
require 'partitions_types'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
module Impala
|
|
15
|
+
module Protocol
|
|
16
|
+
class TPlanFragment
|
|
17
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
18
|
+
PLAN = 2
|
|
19
|
+
OUTPUT_EXPRS = 4
|
|
20
|
+
OUTPUT_SINK = 5
|
|
21
|
+
PARTITION = 6
|
|
22
|
+
|
|
23
|
+
FIELDS = {
|
|
24
|
+
PLAN => { :type => ::Thrift::Types::STRUCT, :name => 'plan', :class => Impala::Protocol::TPlan, :optional => true },
|
|
25
|
+
OUTPUT_EXPRS => { :type => ::Thrift::Types::LIST, :name => 'output_exprs', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TExpr }, :optional => true },
|
|
26
|
+
OUTPUT_SINK => { :type => ::Thrift::Types::STRUCT, :name => 'output_sink', :class => Impala::Protocol::TDataSink, :optional => true },
|
|
27
|
+
PARTITION => { :type => ::Thrift::Types::STRUCT, :name => 'partition', :class => Impala::Protocol::TDataPartition }
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
def struct_fields; FIELDS; end
|
|
31
|
+
|
|
32
|
+
def validate
|
|
33
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partition is unset!') unless @partition
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
::Thrift::Struct.generate_accessors self
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
class TScanRangeLocation
|
|
40
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
41
|
+
SERVER = 1
|
|
42
|
+
VOLUME_ID = 2
|
|
43
|
+
|
|
44
|
+
FIELDS = {
|
|
45
|
+
SERVER => { :type => ::Thrift::Types::STRUCT, :name => 'server', :class => Impala::Protocol::THostPort },
|
|
46
|
+
VOLUME_ID => { :type => ::Thrift::Types::I32, :name => 'volume_id', :default => -1, :optional => true }
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
def struct_fields; FIELDS; end
|
|
50
|
+
|
|
51
|
+
def validate
|
|
52
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field server is unset!') unless @server
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
::Thrift::Struct.generate_accessors self
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
class TScanRangeLocations
|
|
59
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
60
|
+
SCAN_RANGE = 1
|
|
61
|
+
LOCATIONS = 2
|
|
62
|
+
|
|
63
|
+
FIELDS = {
|
|
64
|
+
SCAN_RANGE => { :type => ::Thrift::Types::STRUCT, :name => 'scan_range', :class => Impala::Protocol::TScanRange },
|
|
65
|
+
LOCATIONS => { :type => ::Thrift::Types::LIST, :name => 'locations', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TScanRangeLocation } }
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
def struct_fields; FIELDS; end
|
|
69
|
+
|
|
70
|
+
def validate
|
|
71
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field scan_range is unset!') unless @scan_range
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
::Thrift::Struct.generate_accessors self
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
end
|
|
78
|
+
end
|