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

Function ExecHashJoinInitializeWorker

src/backend/executor/nodeHashjoin.c:2154–2178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2152}
2153
2154void
2155ExecHashJoinInitializeWorker(HashJoinState *state,
2156 ParallelWorkerContext *pwcxt)
2157{
2158 HashState *hashNode;
2159 EState *estate = state->js.ps.state;
2160 int plan_node_id = state->js.ps.plan->plan_node_id;
2161 ParallelHashJoinState *pstate =
2162 shm_toc_lookup(pwcxt->toc, plan_node_id, false);
2163
2164 /* Attach to the space for shared temporary files. */
2165 SharedFileSetAttach(&pstate->fileset, pwcxt->seg);
2166
2167 /* Attach to the shared state in the hash node. */
2168 hashNode = (HashState *) innerPlanState(state);
2169 hashNode->parallel_state = pstate;
2170 if (estate->useMppParallelMode)
2171 state->worker_id = pwcxt->worker_id;
2172 else
2173 {
2174 Assert(ParallelWorkerNumber >= 0);
2175 state->worker_id = ParallelWorkerNumber + 1;
2176 ExecSetExecProcNode(&state->js.ps, ExecParallelHashJoin);
2177 }
2178}
2179
2180/*
2181 * Find "inner var = outer var" in hj->hashclauses and create runtime filter

Callers 2

Calls 3

shm_toc_lookupFunction · 0.85
SharedFileSetAttachFunction · 0.85
ExecSetExecProcNodeFunction · 0.85

Tested by

no test coverage detected