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

Function postgresRecheckForeignScan

contrib/postgres_fdw/postgres_fdw.c:2344–2366  ·  view source on GitHub ↗

* postgresRecheckForeignScan * Execute a local join execution plan for a foreign join */

Source from the content-addressed store, hash-verified

2342 * Execute a local join execution plan for a foreign join
2343 */
2344static bool
2345postgresRecheckForeignScan(ForeignScanState *node, TupleTableSlot *slot)
2346{
2347 Index scanrelid = ((Scan *) node->ss.ps.plan)->scanrelid;
2348 PlanState *outerPlan = outerPlanState(node);
2349 TupleTableSlot *result;
2350
2351 /* For base foreign relations, it suffices to set fdw_recheck_quals */
2352 if (scanrelid > 0)
2353 return true;
2354
2355 Assert(outerPlan != NULL);
2356
2357 /* Execute a local join execution plan */
2358 result = ExecProcNode(outerPlan);
2359 if (TupIsNull(result))
2360 return false;
2361
2362 /* Store result in the given slot */
2363 ExecCopySlot(slot, result);
2364
2365 return true;
2366}
2367
2368/*
2369 * find_modifytable_subplan

Callers

nothing calls this directly

Calls 2

ExecProcNodeFunction · 0.85
ExecCopySlotFunction · 0.85

Tested by

no test coverage detected