| 2152 | } |
| 2153 | |
| 2154 | void |
| 2155 | ExecHashJoinInitializeWorker(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 |
no test coverage detected