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

Function InitializeGpParallelDSMEntry

src/backend/executor/execParallel.c:1614–1670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1612}
1613
1614bool
1615InitializeGpParallelDSMEntry(PlanState *planstate, ParallelContext *pctx)
1616{
1617 if (planstate == NULL)
1618 return false;
1619
1620 switch (nodeTag(planstate))
1621 {
1622 case T_MotionState:
1623 /*
1624 * If we walk to MotionStateNode with Recv Motion Type, we should return directly.
1625 * So that we can only Initialize Parallel Entry for current Slice.
1626 */
1627 if (((MotionState *) planstate)->mstype == MOTIONSTATE_RECV)
1628 return false;
1629 break;
1630 case T_SeqScanState:
1631 if (planstate->plan->parallel_aware)
1632 ExecSeqScanInitializeDSM((SeqScanState *) planstate,
1633 pctx);
1634 break;
1635 case T_IndexScanState:
1636 if (planstate->plan->parallel_aware)
1637 ExecIndexScanInitializeDSM((IndexScanState *) planstate,
1638 pctx);
1639 break;
1640 case T_IndexOnlyScanState:
1641 if (planstate->plan->parallel_aware)
1642 ExecIndexOnlyScanInitializeDSM((IndexOnlyScanState *) planstate,
1643 pctx);
1644 break;
1645 case T_BitmapHeapScanState:
1646 if (planstate->plan->parallel_aware)
1647 ExecBitmapHeapInitializeDSM((BitmapHeapScanState *) planstate,
1648 pctx);
1649 break;
1650 case T_AppendState:
1651 if (planstate->plan->parallel_aware)
1652 ExecAppendInitializeDSM((AppendState *) planstate,
1653 pctx);
1654 break;
1655 case T_HashJoinState:
1656 if (planstate->plan->parallel_aware)
1657 ExecHashJoinInitializeDSM((HashJoinState *) planstate, pctx);
1658 break;
1659 case T_HashState:
1660 ExecHashInitializeDSM((HashState *) planstate, pctx);
1661 break;
1662 case T_SortState:
1663 ExecSortInitializeDSM((SortState *) planstate, pctx);
1664 break;
1665 default:
1666 break;
1667 }
1668
1669 return planstate_tree_walker(planstate, InitializeGpParallelDSMEntry, pctx);
1670}

Callers 1

GpInsertParallelDSMHashFunction · 0.85

Calls 9

ExecSeqScanInitializeDSMFunction · 0.85
ExecAppendInitializeDSMFunction · 0.85
ExecHashInitializeDSMFunction · 0.85
ExecSortInitializeDSMFunction · 0.85
planstate_tree_walkerFunction · 0.85

Tested by

no test coverage detected