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

Function make_tablefunction

src/backend/optimizer/plan/createplan.c:6904–6928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6902}
6903
6904static TableFunctionScan *
6905make_tablefunction(List *qptlist, List *qpqual, Plan *subplan,
6906 Index scanrelid, RangeTblFunction *function)
6907{
6908 TableFunctionScan *node = makeNode(TableFunctionScan);
6909 Plan *plan = &node->scan.plan;
6910
6911 copy_plan_costsize(plan, subplan); /* only care about copying size */
6912
6913 /* FIXME: fix costing */
6914 plan->startup_cost = subplan->startup_cost;
6915 plan->total_cost = subplan->total_cost;
6916 plan->total_cost += 2 * plan->plan_rows;
6917
6918 plan->qual = qpqual;
6919 plan->targetlist = qptlist;
6920 plan->righttree = NULL;
6921
6922 /* Fill in information for the subplan */
6923 plan->lefttree = subplan;
6924 node->scan.scanrelid = scanrelid;
6925 node->function = function;
6926
6927 return node;
6928}
6929
6930static TableFuncScan *
6931make_tablefuncscan(List *qptlist,

Callers 1

Calls 1

copy_plan_costsizeFunction · 0.85

Tested by

no test coverage detected