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

Function ExecSeqScanInitializeWorker

src/backend/executor/nodeSeqscan.c:383–407  ·  view source on GitHub ↗

---------------------------------------------------------------- * ExecSeqScanInitializeWorker * * Copy relevant information from TOC into planstate. * ---------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

381 * ----------------------------------------------------------------
382 */
383void
384ExecSeqScanInitializeWorker(SeqScanState *node,
385 ParallelWorkerContext *pwcxt)
386{
387 ParallelTableScanDesc pscan;
388 TableScanDesc scandesc;
389 EState *estate = node->ss.ps.state;
390
391 pscan = shm_toc_lookup(pwcxt->toc, node->ss.ps.plan->plan_node_id, false);
392 if (node->ss.ss_currentRelation->rd_tableam->scan_begin_extractcolumns)
393 {
394 /* try parallel mode for AOCO extract columns */
395 scandesc = table_beginscan_es(node->ss.ss_currentRelation,
396 estate->es_snapshot,
397 0, NULL,
398 pscan,
399 &node->ss.ps);
400 }
401 else
402 {
403 /* normal parallel mode */
404 scandesc = table_beginscan_parallel(node->ss.ss_currentRelation, pscan);
405 }
406 node->ss.ss_currentScanDesc = scandesc;
407}
408
409/*
410 * Returns true if the element may be in the bloom filter.

Callers 2

Calls 3

shm_toc_lookupFunction · 0.85
table_beginscan_esFunction · 0.85
table_beginscan_parallelFunction · 0.85

Tested by

no test coverage detected