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

Function ExecRestrPos

src/backend/executor/execAmi.c:479–523  ·  view source on GitHub ↗

* ExecRestrPos * * restores the scan position previously saved with ExecMarkPos() * * NOTE: the semantics of this are that the first ExecProcNode following * the restore operation will yield the same tuple as the first one following * the mark operation. It is unspecified what happens to the plan node's * result TupleTableSlot. (In most cases the result slot is unchanged by * a restore,

Source from the content-addressed store, hash-verified

477 * returned TupleTableSlot after doing a restore.
478 */
479void
480ExecRestrPos(PlanState *node)
481{
482 switch (nodeTag(node))
483 {
484 case T_IndexScanState:
485 ExecIndexRestrPos((IndexScanState *) node);
486 break;
487
488 case T_IndexOnlyScanState:
489 ExecIndexOnlyRestrPos((IndexOnlyScanState *) node);
490 break;
491
492 case T_CustomScanState:
493 ExecCustomRestrPos((CustomScanState *) node);
494 break;
495
496 case T_MaterialState:
497 ExecMaterialRestrPos((MaterialState *) node);
498 break;
499
500 case T_SortState:
501 ExecSortRestrPos((SortState *) node);
502 break;
503
504 case T_ResultState:
505 ExecResultRestrPos((ResultState *) node);
506 break;
507
508 case T_MotionState:
509 ereport(ERROR, (
510 errcode(ERRCODE_INTERNAL_ERROR),
511 errmsg("unsupported call to restore position of Motion operator")
512 ));
513 break;
514
515 case T_ForeignScanState:
516 elog(ERROR, "Restoring scan position is not yet supported for foreign relation scan");
517 break;
518
519 default:
520 elog(ERROR, "unrecognized node type: %d", (int) nodeTag(node));
521 break;
522 }
523}
524
525/*
526 * ExecSupportsMarkRestore - does a Path support mark/restore?

Callers 2

ExecMergeJoin_gutsFunction · 0.85
ExecResultRestrPosFunction · 0.85

Calls 8

ExecIndexRestrPosFunction · 0.85
ExecIndexOnlyRestrPosFunction · 0.85
ExecCustomRestrPosFunction · 0.85
ExecMaterialRestrPosFunction · 0.85
ExecSortRestrPosFunction · 0.85
ExecResultRestrPosFunction · 0.85
errcodeFunction · 0.50
errmsgFunction · 0.50

Tested by

no test coverage detected