1/*
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 *
6 * Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
7 */
8
9/*
10 * opt_prelude
11 * M. Kersten
12 * These definitions are handy to have around in the optimizer
13 */
14#include "monetdb_config.h"
15#include "opt_prelude.h"
16#include "optimizer_private.h"
17
18/* ! please keep this list sorted for easier maintenance ! */
19str abortRef;
20str actionRef;
21str affectedRowsRef;
22str aggrRef;
23str alarmRef;
24str algebraRef;
25str alter_add_range_partitionRef;
26str alter_add_tableRef;
27str alter_add_value_partitionRef;
28str alter_constraintRef;
29str alter_del_tableRef;
30str alter_functionRef;
31str alter_indexRef;
32str alter_roleRef;
33str alter_schemaRef;
34str alter_seqRef;
35str alter_set_tableRef;
36str alter_tableRef;
37str alter_triggerRef;
38str alter_typeRef;
39str alter_userRef;
40str alter_viewRef;
41str andRef;
42str antijoinRef;
43str appendidxRef;
44str appendRef;
45str arrayRef;
46str assertRef;
47str attachRef;
48str avgRef;
49str bandjoinRef;
50str basketRef;
51str batalgebraRef;
52str batcalcRef;
53str batcapiRef;
54str batmalRef;
55str batmmathRef;
56str batmtimeRef;
57str batpyapi3Ref;
58str batpyapiRef;
59str batrapiRef;
60str batRef;
61str batsqlRef;
62str batstrRef;
63str batxmlRef;
64str bbpRef;
65str betweenRef;
66str binddbatRef;
67str bindidxRef;
68str bindRef;
69str blockRef;
70str bpmRef;
71str bstreamRef;
72str calcRef;
73str capiRef;
74str catalogRef;
75str clear_tableRef;
76str closeRef;
77str columnBindRef;
78str columnRef;
79str comment_onRef;
80str commitRef;
81str connectRef;
82str contextRef;
83str copy_fromRef;
84str copyRef;
85str count_no_nilRef;
86str countRef;
87str create_constraintRef;
88str create_functionRef;
89str create_indexRef;
90str createRef;
91str create_roleRef;
92str create_schemaRef;
93str create_seqRef;
94str create_tableRef;
95str create_triggerRef;
96str create_typeRef;
97str create_userRef;
98str create_viewRef;
99str crossRef;
100str cume_distRef;
101str dataflowRef;
102str dateRef;
103str dblRef;
104str defineRef;
105str deleteRef;
106str deltaRef;
107str dense_rankRef;
108str diffcandRef;
109str differenceRef;
110str disconnectRef;
111str divRef;
112str drop_constraintRef;
113str drop_functionRef;
114str drop_indexRef;
115str drop_roleRef;
116str drop_schemaRef;
117str drop_seqRef;
118str drop_tableRef;
119str drop_triggerRef;
120str drop_typeRef;
121str drop_userRef;
122str drop_viewRef;
123str emptybindidxRef;
124str emptybindRef;
125str eqRef;
126str evalRef;
127str execRef;
128str expandRef;
129str exportOperationRef;
130str export_tableRef;
131str fetchRef;
132str findRef;
133str finishRef;
134str firstnRef;
135str first_valueRef;
136str generatorRef;
137str getRef;
138str getTraceRef;
139str grant_functionRef;
140str grantRef;
141str grant_rolesRef;
142str groupbyRef;
143str group_concatRef;
144str groupdoneRef;
145str groupRef;
146str hashRef;
147str hgeRef;
148str identityRef;
149str ifthenelseRef;
150str ilikeRef;
151str ilikeselectRef;
152str ilikethetaselectRef;
153str inplaceRef;
154str intersectcandRef;
155str intersectRef;
156str intRef;
157str ioRef;
158str iteratorRef;
159str jitRef;
160str joinRef;
161str jsonRef;
162str lagRef;
163str languageRef;
164str last_valueRef;
165str leadRef;
166str leftjoinRef;
167str likeRef;
168str likeselectRef;
169str likethetaselectRef;
170str listRef;
171str lockRef;
172str lookupRef;
173str malRef;
174str manifoldRef;
175str mapiRef;
176str markRef;
177str matRef;
178str max_no_nilRef;
179str maxRef;
180str mdbRef;
181str mergecandRef;
182str mergepackRef;
183str min_no_nilRef;
184str minRef;
185str minusRef;
186str mirrorRef;
187str mitosisRef;
188str mkeyRef;
189str mmathRef;
190str mtimeRef;
191str mulRef;
192str multicolumnRef;
193str multiplexRef;
194str mvcRef;
195str newRef;
196str nextRef;
197str not_ilikeRef;
198str not_likeRef;
199str notRef;
200str not_uniqueRef;
201str nth_valueRef;
202str ntileRef;
203str oidRef;
204str oltpRef;
205str openRef;
206str optimizerRef;
207str pack2Ref;
208str packIncrementRef;
209str packRef;
210str parametersRef;
211str partitionRef;
212str passRef;
213str pcreRef;
214str percent_rankRef;
215str pinRef;
216str plusRef;
217str postludeRef;
218str preludeRef;
219str printRef;
220str prodRef;
221str profilerRef;
222str projectdeltaRef;
223str projectionpathRef;
224str projectionRef;
225str projectRef;
226str putRef;
227str pyapi3mapRef;
228str pyapi3Ref;
229str pyapimapRef;
230str pyapiRef;
231str querylogRef;
232str queryRef;
233str raiseRef;
234str rangejoinRef;
235str rankRef;
236str rapiRef;
237str reconnectRef;
238str refineRef;
239str registerRef;
240str register_supervisorRef;
241str releaseRef;
242str remapRef;
243str remoteRef;
244str rename_columnRef;
245str rename_schemaRef;
246str rename_tableRef;
247str rename_userRef;
248str replaceRef;
249str replicatorRef;
250str resultSetRef;
251str reuseRef;
252str revoke_functionRef;
253str revokeRef;
254str revoke_rolesRef;
255str rollbackRef;
256str row_numberRef;
257str rpcRef;
258str rsColumnRef;
259str sampleRef;
260str schedulerRef;
261str selectNotNilRef;
262str selectRef;
263str semaRef;
264str semijoinRef;
265str seriesRef;
266str setAccessRef;
267str setVariableRef;
268str setWriteModeRef;
269str singleRef;
270str sinkRef;
271str sliceRef;
272str sortRef;
273str sqlcatalogRef;
274str sqlRef;
275str startRef;
276str starttraceRef;
277str stoptraceRef;
278str streamsRef;
279str strRef;
280str subavgRef;
281str subcountRef;
282str subdeltaRef;
283str subeval_aggrRef;
284str subgroupdoneRef;
285str subgroupRef;
286str subinterRef;
287str submaxRef;
288str submedianRef;
289str subminRef;
290str subprodRef;
291str subsliceRef;
292str subsumRef;
293str subuniformRef;
294str sumRef;
295str takeRef;
296str thetajoinRef;
297str thetaselectRef;
298str tidRef;
299str timestampRef;
300str transaction_abortRef;
301str transaction_beginRef;
302str transaction_commitRef;
303str transactionRef;
304str transaction_releaseRef;
305str transaction_rollbackRef;
306str uniqueRef;
307str unlockRef;
308str unpackRef;
309str unpinRef;
310str updateRef;
311str userRef;
312str vectorRef;
313str window_boundRef;
314str wlcRef;
315str wlrRef;
316str zero_or_oneRef;
317/* ! please keep this list sorted for easier maintenance ! */
318
319void optimizerInit(void)
320{
321/* ! please keep this list sorted for easier maintenance ! */
322 abortRef = putName("abort");
323 actionRef = putName("action");
324 affectedRowsRef = putName("affectedRows");
325 aggrRef = putName("aggr");
326 alarmRef = putName("alarm");
327 algebraRef = putName("algebra");
328 alter_add_range_partitionRef = putName("alter_add_range_partition");
329 alter_add_tableRef = putName("alter_add_table");
330 alter_add_value_partitionRef = putName("alter_add_value_partition");
331 alter_constraintRef = putName("alter_constraint");
332 alter_del_tableRef = putName("alter_del_table");
333 alter_functionRef = putName("alter_function");
334 alter_indexRef = putName("alter_index");
335 alter_roleRef = putName("alter_role");
336 alter_schemaRef = putName("alter_schema");
337 alter_seqRef = putName("alter_seq");
338 alter_set_tableRef = putName("alter_set_table");
339 alter_tableRef = putName("alter_table");
340 alter_triggerRef = putName("alter_trigger");
341 alter_typeRef = putName("alter_type");
342 alter_userRef = putName("alter_user");
343 alter_viewRef = putName("alter_view");
344 andRef = putName("and");
345 antijoinRef = putName("antijoin");
346 appendidxRef = putName("append_idxbat");
347 appendRef = putName("append");
348 arrayRef = putName("array");
349 assertRef = putName("assert");
350 attachRef = putName("attach");
351 avgRef = putName("avg");
352 bandjoinRef = putName("bandjoin");
353 basketRef = putName("basket");
354 batalgebraRef = putName("batalgebra");
355 batcalcRef = putName("batcalc");
356 batcapiRef = putName("batcapi");
357 batmalRef = putName("batmal");
358 batmmathRef = putName("batmmath");
359 batmtimeRef = putName("batmtime");
360 batpyapi3Ref = putName("batpyapi3");
361 batpyapiRef = putName("batpyapi");
362 batrapiRef = putName("batrapi");
363 batRef = putName("bat");
364 batsqlRef = putName("batsql");
365 batstrRef = putName("batstr");
366 batxmlRef = putName("batxml");
367 bbpRef = putName("bbp");
368 betweenRef = putName("between");
369 binddbatRef = putName("bind_dbat");
370 bindidxRef = putName("bind_idxbat");
371 bindRef = putName("bind");
372 blockRef = putName("block");
373 bpmRef = putName("bpm");
374 bstreamRef = putName("bstream");
375 calcRef = putName("calc");
376 capiRef = putName("capi");
377 catalogRef = putName("catalog");
378 clear_tableRef = putName("clear_table");
379 closeRef = putName("close");
380 columnBindRef = putName("columnBind");
381 columnRef = putName("column");
382 comment_onRef = putName("comment_on");
383 commitRef = putName("commit");
384 connectRef = putName("connect");
385 contextRef = putName("context");
386 copy_fromRef = putName("copy_from");
387 copyRef = putName("copy");
388 count_no_nilRef = putName("count_no_nil");
389 countRef = putName("count");
390 create_constraintRef = putName("create_constraint");
391 create_functionRef = putName("create_function");
392 create_indexRef = putName("create_index");
393 createRef = putName("create");
394 create_roleRef = putName("create_role");
395 create_schemaRef = putName("create_schema");
396 create_seqRef = putName("create_seq");
397 create_tableRef = putName("create_table");
398 create_triggerRef = putName("create_trigger");
399 create_typeRef = putName("create_type");
400 create_userRef = putName("create_user");
401 create_viewRef = putName("create_view");
402 crossRef = putName("crossproduct");
403 cume_distRef = putName("cume_dist");
404 dataflowRef = putName("dataflow");
405 dateRef = putName("date");
406 dblRef = putName("dbl");
407 defineRef = putName("define");
408 deleteRef = putName("delete");
409 deltaRef = putName("delta");
410 dense_rankRef = putName("dense_rank");
411 diffcandRef= putName("diffcand");
412 differenceRef = putName("difference");
413 disconnectRef= putName("disconnect");
414 divRef = putName("/");
415 drop_constraintRef = putName("drop_constraint");
416 drop_functionRef = putName("drop_function");
417 drop_indexRef = putName("drop_index");
418 drop_roleRef = putName("drop_role");
419 drop_schemaRef = putName("drop_schema");
420 drop_seqRef = putName("drop_seq");
421 drop_tableRef = putName("drop_table");
422 drop_triggerRef = putName("drop_trigger");
423 drop_typeRef = putName("drop_type");
424 drop_userRef = putName("drop_user");
425 drop_viewRef = putName("drop_view");
426 emptybindidxRef = putName("emptybindidx");
427 emptybindRef = putName("emptybind");
428 eqRef = putName("==");
429 evalRef = putName("eval");
430 execRef = putName("exec");
431 expandRef = putName("expand");
432 exportOperationRef = putName("exportOperation");
433 export_tableRef = putName("export_table");
434 fetchRef = putName("fetch");
435 findRef = putName("find");
436 finishRef = putName("finish");
437 firstnRef = putName("firstn");
438 first_valueRef = putName("first_value");
439 generatorRef = putName("generator");
440 getRef = putName("get");
441 getTraceRef = putName("getTrace");
442 grant_functionRef = putName("grant_function");
443 grantRef = putName("grant");
444 grant_rolesRef = putName("grant_roles");
445 groupbyRef = putName("groupby");
446 group_concatRef = putName("group_concat");
447 groupdoneRef = putName("groupdone");
448 groupRef = putName("group");
449 hashRef = putName("hash");
450 hgeRef = putName("hge");
451 identityRef = putName("identity");
452 ifthenelseRef = putName("ifthenelse");
453 ilikeRef = putName("ilike");
454 ilikeselectRef = putName("ilikeselect");
455 ilikethetaselectRef = putName("ilikethetaselect");
456 inplaceRef = putName("inplace");
457 intersectcandRef= putName("intersectcand");
458 intersectRef = putName("intersect");
459 intRef = putName("int");
460 ioRef = putName("io");
461 iteratorRef = putName("iterator");
462 jitRef = putName("jit");
463 joinRef = putName("join");
464 jsonRef = putName("json");
465 lagRef = putName("lag");
466 languageRef= putName("language");
467 last_valueRef = putName("last_value");
468 leadRef = putName("lead");
469 leftjoinRef = putName("leftjoin");
470 likeRef = putName("like");
471 likeselectRef = putName("likeselect");
472 likethetaselectRef = putName("likethetaselect");
473 listRef = putName("list");
474 lockRef = putName("lock");
475 lookupRef = putName("lookup");
476 malRef = putName("mal");
477 manifoldRef = putName("manifold");
478 mapiRef = putName("mapi");
479 markRef = putName("mark");
480 matRef = putName("mat");
481 max_no_nilRef = putName("max_no_nil");
482 maxRef = putName("max");
483 mdbRef = putName("mdb");
484 mergecandRef= putName("mergecand");
485 mergepackRef= putName("mergepack");
486 min_no_nilRef = putName("min_no_nil");
487 minRef = putName("min");
488 minusRef = putName("-");
489 mirrorRef = putName("mirror");
490 mitosisRef = putName("mitosis");
491 mkeyRef = putName("mkey");
492 mmathRef = putName("mmath");
493 mtimeRef = putName("mtime");
494 mulRef = putName("*");
495 multicolumnRef = putName("multicolumn");
496 multiplexRef = putName("multiplex");
497 mvcRef = putName("mvc");
498 newRef = putName("new");
499 nextRef = putName("next");
500 not_ilikeRef = putName("not_ilike");
501 not_likeRef = putName("not_like");
502 notRef = putName("not");
503 not_uniqueRef= putName("not_unique");
504 nth_valueRef = putName("nth_value");
505 ntileRef = putName("ntile");
506 oidRef = putName("oid");
507 oltpRef = putName("oltp");
508 openRef = putName("open");
509 optimizerRef = putName("optimizer");
510 pack2Ref = putName("pack2");
511 packIncrementRef = putName("packIncrement");
512 packRef = putName("pack");
513 parametersRef = putName("parameters");
514 partitionRef = putName("partition");
515 passRef = putName("pass");
516 pcreRef = putName("pcre");
517 percent_rankRef = putName("percent_rank");
518 pinRef = putName("pin");
519 plusRef = putName("+");
520 postludeRef = putName("postlude");
521 preludeRef = putName("prelude");
522 printRef = putName("print");
523 prodRef = putName("prod");
524 profilerRef = putName("profiler");
525 projectdeltaRef = putName("projectdelta");
526 projectionpathRef = putName("projectionpath");
527 projectionRef = putName("projection");
528 projectRef = putName("project");
529 putRef = putName("put");
530 pyapi3mapRef = putName("batpyapi3map");
531 pyapi3Ref = putName("pyapi3");
532 pyapimapRef = putName("batpyapimap");
533 pyapiRef = putName("pyapi");
534 querylogRef = putName("querylog");
535 queryRef = putName("query");
536 raiseRef = putName("raise");
537 rangejoinRef = putName("rangejoin");
538 rankRef = putName("rank");
539 rapiRef = putName("rapi");
540 reconnectRef = putName("reconnect");
541 refineRef = putName("refine");
542 registerRef = putName("register");
543 register_supervisorRef = putName("register_supervisor");
544 releaseRef = putName("release");
545 remapRef = putName("remap");
546 remoteRef = putName("remote");
547 rename_columnRef = putName("rename_column");
548 rename_schemaRef = putName("rename_schema");
549 rename_tableRef = putName("rename_table");
550 rename_userRef = putName("rename_user");
551 replaceRef = putName("replace");
552 replicatorRef = putName("replicator");
553 resultSetRef = putName("resultSet");
554 reuseRef = putName("reuse");
555 revoke_functionRef = putName("revoke_function");
556 revokeRef = putName("revoke");
557 revoke_rolesRef = putName("revoke_roles");
558 rollbackRef = putName("rollback");
559 row_numberRef = putName("row_number");
560 rpcRef = putName("rpc");
561 rsColumnRef = putName("rsColumn");
562 sampleRef= putName("sample");
563 schedulerRef = putName("scheduler");
564 selectNotNilRef = putName("selectNotNil");
565 selectRef = putName("select");
566 semaRef = putName("sema");
567 semijoinRef = putName("semijoin");
568 seriesRef = putName("series");
569 setAccessRef = putName("setAccess");
570 setVariableRef = putName("setVariable");
571 setWriteModeRef= putName("setWriteMode");
572 singleRef = putName("single");
573 sinkRef = putName("sink");
574 sliceRef = putName("slice");
575 sortRef = putName("sort");
576 sqlcatalogRef = putName("sqlcatalog");
577 sqlRef = putName("sql");
578 startRef = putName("start");
579 starttraceRef = putName("starttrace");
580 stoptraceRef = putName("stoptrace");
581 streamsRef = putName("streams");
582 strRef = putName("str");
583 subavgRef = putName("subavg");
584 subcountRef = putName("subcount");
585 subdeltaRef = putName("subdelta");
586 subeval_aggrRef = putName("subeval_aggr");
587 subgroupdoneRef= putName("subgroupdone");
588 subgroupRef = putName("subgroup");
589 subinterRef = putName("subinterRef");
590 submaxRef = putName("submax");
591 submedianRef = putName("submedian");
592 subminRef = putName("submin");
593 subprodRef = putName("subprod");
594 subsliceRef = putName("subslice");
595 subsumRef = putName("subsum");
596 subuniformRef= putName("subuniform");
597 sumRef = putName("sum");
598 takeRef= putName("take");
599 thetajoinRef = putName("thetajoin");
600 thetaselectRef = putName("thetaselect");
601 tidRef = putName("tid");
602 timestampRef = putName("timestamp");
603 transaction_abortRef= putName("transaction_abort");
604 transaction_beginRef= putName("transaction_begin");
605 transaction_commitRef= putName("transaction_commit");
606 transactionRef= putName("transaction");
607 transaction_releaseRef= putName("transaction_release");
608 transaction_rollbackRef= putName("transaction_rollback");
609 uniqueRef= putName("unique");
610 unlockRef= putName("unlock");
611 unpackRef = putName("unpack");
612 unpinRef = putName("unpin");
613 updateRef = putName("update");
614 userRef = putName("user");
615 vectorRef = putName("vector");
616 window_boundRef = putName("window_bound");
617 wlcRef = putName("wlc");
618 wlrRef = putName("wlr");
619 zero_or_oneRef = putName("zero_or_one");
620/* ! please keep this list sorted for easier maintenance ! */
621}
622