MCPcopy Create free account
hub / github.com/apache/cloudberry / ExecInitInterpreter

Function ExecInitInterpreter

src/backend/executor/execExprInterp.c:2367–2391  ·  view source on GitHub ↗

* Do one-time initialization of interpretation machinery. */

Source from the content-addressed store, hash-verified

2365 * Do one-time initialization of interpretation machinery.
2366 */
2367static void
2368ExecInitInterpreter(void)
2369{
2370#if defined(EEO_USE_COMPUTED_GOTO)
2371 /* Set up externally-visible pointer to dispatch table */
2372 if (dispatch_table == NULL)
2373 {
2374 dispatch_table = (const void **)
2375 DatumGetPointer(ExecInterpExpr(NULL, NULL, NULL));
2376
2377 /* build reverse lookup table */
2378 for (int i = 0; i < EEOP_LAST; i++)
2379 {
2380 reverse_dispatch_table[i].opcode = dispatch_table[i];
2381 reverse_dispatch_table[i].op = (ExprEvalOp) i;
2382 }
2383
2384 /* make it bsearch()able */
2385 qsort(reverse_dispatch_table,
2386 EEOP_LAST /* nmembers */ ,
2387 sizeof(ExprEvalOpLookup),
2388 dispatch_compare_ptr);
2389 }
2390#endif
2391}
2392
2393/*
2394 * Function to return the opcode of an expression step.

Callers 1

ExecReadyInterpretedExprFunction · 0.85

Calls 1

ExecInterpExprFunction · 0.85

Tested by

no test coverage detected