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

Function EstimateGpParallelDSMEntrySize

src/backend/executor/execParallel.c:1503–1560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1501}
1502
1503bool
1504EstimateGpParallelDSMEntrySize(PlanState *planstate, ParallelContext *pctx)
1505{
1506 if (planstate == NULL)
1507 return false;
1508
1509 switch (nodeTag(planstate))
1510 {
1511 case T_MotionState:
1512 /*
1513 * If we walk to MotionStateNode with Recv Motion Type, we should return directly.
1514 * So that we can only Initialize Parallel Entry for current Slice.
1515 */
1516 if (((MotionState *) planstate)->mstype == MOTIONSTATE_RECV)
1517 return false;
1518 break;
1519 case T_SeqScanState:
1520 if (planstate->plan->parallel_aware)
1521 ExecSeqScanEstimate((SeqScanState *) planstate,
1522 pctx);
1523 break;
1524 case T_IndexScanState:
1525 if (planstate->plan->parallel_aware)
1526 ExecIndexScanEstimate((IndexScanState *) planstate,
1527 pctx);
1528 break;
1529 case T_IndexOnlyScanState:
1530 if (planstate->plan->parallel_aware)
1531 ExecIndexOnlyScanEstimate((IndexOnlyScanState *) planstate,
1532 pctx);
1533 break;
1534 case T_BitmapHeapScanState:
1535 if (planstate->plan->parallel_aware)
1536 ExecBitmapHeapEstimate((BitmapHeapScanState *) planstate,
1537 pctx);
1538 break;
1539 case T_AppendState:
1540 if (planstate->plan->parallel_aware)
1541 ExecAppendEstimate((AppendState*) planstate, pctx);
1542 break;
1543 case T_HashJoinState:
1544 if (planstate->plan->parallel_aware)
1545 ExecHashJoinEstimate((HashJoinState *) planstate,
1546 pctx);
1547 break;
1548 case T_HashState:
1549 ExecHashEstimate((HashState *) planstate, pctx);
1550 break;
1551 case T_SortState:
1552 ExecSortEstimate((SortState *) planstate, pctx);
1553 break;
1554 default:
1555 break;
1556
1557 }
1558
1559 return planstate_tree_walker(planstate, EstimateGpParallelDSMEntrySize, pctx);
1560}

Callers 1

GpInsertParallelDSMHashFunction · 0.85

Calls 9

ExecSeqScanEstimateFunction · 0.85
ExecIndexScanEstimateFunction · 0.85
ExecBitmapHeapEstimateFunction · 0.85
ExecAppendEstimateFunction · 0.85
ExecHashJoinEstimateFunction · 0.85
ExecHashEstimateFunction · 0.85
ExecSortEstimateFunction · 0.85
planstate_tree_walkerFunction · 0.85

Tested by

no test coverage detected