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

Function ExecIndexScanInitializeWorker

src/backend/executor/nodeIndexscan.c:1741–1763  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1739 * ----------------------------------------------------------------
1740 */
1741void
1742ExecIndexScanInitializeWorker(IndexScanState *node,
1743 ParallelWorkerContext *pwcxt)
1744{
1745 ParallelIndexScanDesc piscan;
1746
1747 piscan = shm_toc_lookup(pwcxt->toc, node->ss.ps.plan->plan_node_id, false);
1748 node->iss_ScanDesc =
1749 index_beginscan_parallel(node->ss.ss_currentRelation,
1750 node->iss_RelationDesc,
1751 node->iss_NumScanKeys,
1752 node->iss_NumOrderByKeys,
1753 piscan);
1754
1755 /*
1756 * If no run-time keys to calculate or they are ready, go ahead and pass
1757 * the scankeys to the index AM.
1758 */
1759 if (node->iss_NumRuntimeKeys == 0 || node->iss_RuntimeKeysReady)
1760 index_rescan(node->iss_ScanDesc,
1761 node->iss_ScanKeys, node->iss_NumScanKeys,
1762 node->iss_OrderByKeys, node->iss_NumOrderByKeys);
1763}

Callers 2

Calls 3

shm_toc_lookupFunction · 0.85
index_beginscan_parallelFunction · 0.85
index_rescanFunction · 0.85

Tested by

no test coverage detected