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

Function ExecParallelGetReceiver

src/backend/executor/execParallel.c:1216–1227  ·  view source on GitHub ↗

* Create a DestReceiver to write tuples we produce to the shm_mq designated * for that purpose. */

Source from the content-addressed store, hash-verified

1214 * for that purpose.
1215 */
1216static DestReceiver *
1217ExecParallelGetReceiver(dsm_segment *seg, shm_toc *toc)
1218{
1219 char *mqspace;
1220 shm_mq *mq;
1221
1222 mqspace = shm_toc_lookup(toc, PARALLEL_KEY_TUPLE_QUEUE, false);
1223 mqspace += ParallelWorkerNumber * PARALLEL_TUPLE_QUEUE_SIZE;
1224 mq = (shm_mq *) mqspace;
1225 shm_mq_set_sender(mq, MyProc);
1226 return CreateTupleQueueDestReceiver(shm_mq_attach(mq, seg, NULL));
1227}
1228
1229/*
1230 * Create a QueryDesc for the PlannedStmt we are to execute, and return it.

Callers 1

ParallelQueryMainFunction · 0.85

Calls 4

shm_toc_lookupFunction · 0.85
shm_mq_set_senderFunction · 0.85
shm_mq_attachFunction · 0.85

Tested by

no test coverage detected