add openGauss 3.1.0 feature code

This commit is contained in:
yanghao
2022-09-03 16:22:35 +08:00
parent 801d945a3d
commit b919f404e8
2759 changed files with 521358 additions and 366321 deletions

View File

@ -605,6 +605,12 @@ static bool isStoppedByRowNum(RecursiveUnionState* node, TupleTableSlot* slot)
return ret;
}
static void DiscardSWLastTuple(StartWithOpState *node)
{
node->sw_rownum--;
node->sw_numtuples--;
}
TupleTableSlot* GetStartWithSlot(RecursiveUnionState* node, TupleTableSlot* slot)
{
TupleTableSlot* dstSlot = node->swstate->ps.ps_ResultTupleSlot;
@ -625,6 +631,8 @@ TupleTableSlot* GetStartWithSlot(RecursiveUnionState* node, TupleTableSlot* slot
node->swstate->swop_status = isDfsEnabled && isStoppedByRowNum(node, slot) ?
SWOP_ESCAPE :
node->swstate->swop_status;
DiscardSWLastTuple(node->swstate);
return NULL;
}