forked from Hacker0912/quickstep-datalog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWorkOrder.proto
338 lines (304 loc) · 9.09 KB
/
WorkOrder.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
syntax = "proto2";
package quickstep.serialization;
import "relational_operators/SortMergeRunOperator.proto";
// Next tag: 27.
enum WorkOrderType {
AGGREGATION = 1;
BUILD_AGGREGATION_EXISTENCE_MAP = 23;
BUILD_HASH = 2;
BUILD_LIP_FILTER = 3;
CREATE_INDEX = 4; // Placeholder.
CREATE_TABLE = 5; // Placeholder.
DELETE = 6;
DESTROY_AGGREGATION_STATE = 22;
DESTROY_HASH = 7;
DROP_TABLE = 8;
FINALIZE_AGGREGATION = 9;
HASH_JOIN = 10;
INITIALIZE_AGGREGATION = 25;
INSERT = 11;
NESTED_LOOP_JOIN = 12;
SAMPLE = 13;
SAVE_BLOCKS = 14;
SELECT = 15;
SORT_MERGE_RUN = 16;
SORT_RUN_GENERATION = 17;
TABLE_EXPORT_TO_STRING = 26;
TABLE_GENERATOR = 18;
TEXT_SCAN = 19;
UNION_ALL = 24;
UPDATE = 20;
WINDOW_AGGREGATION = 21;
}
message WorkOrder {
required WorkOrderType work_order_type = 1;
required uint64 query_id = 2;
// The convention for extension numbering is that extensions for a particular
// WorkOrderID should begin from (operator_type * 16).
extensions 16 to max;
}
// Next tag: 21.
message AggregationWorkOrder {
extend WorkOrder {
// All required.
optional uint32 aggr_state_index = 16;
optional uint64 partition_id = 20;
optional fixed64 block_id = 17;
optional int32 lip_deployment_index = 18;
repeated uint32 lip_filter_indexes = 19;
}
}
message BuildAggregationExistenceMapWorkOrder {
extend WorkOrder {
optional int32 relation_id = 368;
optional fixed64 build_block_id = 369;
optional int32 build_attribute = 370;
optional uint32 aggr_state_index = 371;
optional uint64 partition_id = 372;
}
}
// Next tag: 41.
message BuildHashWorkOrder {
extend WorkOrder {
// All required.
optional int32 relation_id = 32;
repeated int32 join_key_attributes = 33;
optional bool any_join_key_attributes_nullable = 34;
optional uint32 join_hash_table_index = 35;
optional uint64 partition_id = 38;
optional fixed64 block_id = 36;
optional int32 lip_deployment_index = 37;
repeated uint32 lip_filter_indexes = 39;
optional uint32 build_predicate_index = 40;
}
}
// Next tag: 54.
message BuildLIPFilterWorkOrder {
extend WorkOrder {
// All required.
optional int32 relation_id = 48;
optional uint64 partition_id = 53;
optional fixed64 build_block_id = 49;
optional int32 build_side_predicate_index = 50;
optional int32 lip_deployment_index = 51;
repeated uint32 lip_filter_indexes = 52;
}
}
message DeleteWorkOrder {
extend WorkOrder {
// All required.
optional uint64 operator_index = 96;
optional int32 relation_id = 97;
optional int32 predicate_index = 98;
optional fixed64 block_id = 99;
optional uint64 partition_id = 100;
}
}
message DestroyAggregationStateWorkOrder {
extend WorkOrder {
optional uint32 aggr_state_index = 352;
optional uint64 partition_id = 353;
}
}
message DestroyHashWorkOrder {
extend WorkOrder {
// All required.
optional uint32 join_hash_table_index = 112;
optional uint64 partition_id = 113;
}
}
message DropTableWorkOrder {
extend WorkOrder {
// If set, CatalogDatabaseCache will drop the relation.
optional int32 relation_id = 128;
// Optional, and maybe empty.
repeated fixed64 block_ids = 129;
}
}
// Next tag: 148.
message FinalizeAggregationWorkOrder {
extend WorkOrder {
// All required.
optional uint32 aggr_state_index = 144;
optional uint64 partition_id = 146;
optional uint64 state_partition_id = 147;
optional int32 insert_destination_index = 145;
}
}
// Next tag: 174.
message HashJoinWorkOrder {
enum HashJoinWorkOrderType {
HASH_ANTI_JOIN = 0;
HASH_INNER_JOIN = 1;
HASH_OUTER_JOIN = 2;
HASH_SEMI_JOIN = 3;
}
extend WorkOrder {
// All required.
optional HashJoinWorkOrderType hash_join_work_order_type = 160;
optional int32 build_relation_id = 161;
optional int32 probe_relation_id = 162;
repeated int32 join_key_attributes = 163;
optional bool any_join_key_attributes_nullable = 164;
optional int32 insert_destination_index = 165;
optional uint32 join_hash_table_index = 166;
optional uint64 partition_id = 172;
optional int32 selection_index = 167;
optional fixed64 block_id = 168;
// Used by all but HashOuterJoinWorkOrder.
optional int32 residual_predicate_index = 169;
// Used by HashOuterJoinWorkOrder only.
repeated bool is_selection_on_build = 170;
optional int32 lip_deployment_index = 171;
repeated uint32 lip_filter_indexes = 173;
}
}
message InitializeAggregationWorkOrder {
extend WorkOrder {
// All required.
optional uint32 aggr_state_index = 400;
optional uint64 partition_id = 401;
optional uint64 state_partition_id = 402;
}
}
message InsertWorkOrder {
extend WorkOrder {
// All required.
optional int32 insert_destination_index = 176;
repeated uint32 tuple_indexes = 177;
}
}
// Next tag: 201.
message NestedLoopsJoinWorkOrder {
extend WorkOrder {
// All required.
optional uint64 nested_loops_join_index = 200;
optional int32 left_relation_id = 192;
optional int32 right_relation_id = 193;
optional uint64 partition_id = 199;
optional fixed64 left_block_id = 194;
optional fixed64 right_block_id = 195;
optional int32 insert_destination_index = 196;
optional int32 join_predicate_index = 197;
optional int32 selection_index = 198;
}
}
message SampleWorkOrder {
extend WorkOrder {
// All required.
optional int32 relation_id = 208;
optional fixed64 block_id = 209;
optional bool is_block_sample = 210;
optional int32 percentage = 211;
optional int32 insert_destination_index = 212;
}
}
message SaveBlocksWorkOrder {
extend WorkOrder {
// All required.
optional fixed64 block_id = 224;
optional bool force = 225;
optional uint64 partition_id = 226;
}
}
// Next tag: 250.
message SelectWorkOrder {
extend WorkOrder {
// All required.
optional int32 relation_id = 240;
optional int32 insert_destination_index = 241;
optional int32 predicate_index = 242;
optional uint64 partition_id = 249;
optional fixed64 block_id = 243;
optional bool simple_projection = 244;
// When 'simple_projection' is true.
repeated int32 simple_selection = 245;
// Otherwise.
optional int32 selection_index = 246;
optional int32 lip_deployment_index = 247;
repeated uint32 lip_filter_indexes = 248;
}
}
message SortMergeRunWorkOrder {
extend WorkOrder {
// All required.
optional uint64 operator_index = 256;
optional uint64 sort_config_index = 257;
repeated Run runs = 258;
optional uint64 top_k = 259;
optional uint64 merge_level = 260;
optional int32 relation_id = 261;
optional int32 insert_destination_index = 262;
}
}
message SortRunGenerationWorkOrder {
extend WorkOrder {
// All required.
optional uint64 sort_config_index = 272;
optional int32 relation_id = 273;
optional int32 insert_destination_index = 274;
optional fixed64 block_id = 275;
}
}
message TableGeneratorWorkOrder {
extend WorkOrder {
// All required.
optional int32 generator_function_index = 288;
optional int32 insert_destination_index = 289;
}
}
message TextScanWorkOrder {
extend WorkOrder {
// All required.
optional string filename = 304;
optional uint64 text_offset = 305;
optional uint64 text_segment_size = 306;
optional uint32 field_terminator = 307; // For one-byte char.
optional bool process_escape_sequences = 308;
optional int32 insert_destination_index = 309;
}
}
message UnionAllWorkOrder {
extend WorkOrder {
optional int32 relation_id = 384;
optional int32 insert_destination_index = 385;
optional fixed64 block_id = 386;
repeated int32 select_attribute_id = 387;
}
}
message UpdateWorkOrder {
extend WorkOrder {
// All required.
optional uint64 operator_index = 320;
optional int32 relation_id = 321;
optional int32 insert_destination_index = 322;
optional int32 predicate_index = 323;
optional uint32 update_group_index = 324;
optional fixed64 block_id = 325;
optional uint64 partition_id = 326;
}
}
message WindowAggregationWorkOrder {
extend WorkOrder {
// All required
optional uint32 window_aggr_state_index = 336;
repeated fixed64 block_ids = 337;
optional int32 insert_destination_index = 338;
}
}