Workaround for single connect-by cases

Offering: openGaussDev

More detail: If no rownum or level qual is present, do not create connect-by-level filter.

Signed-off-by:peijisheng peijisheng@huawei.com

Match-id-400310ecf9513b47303f71f69da642d4b44d762b
This commit is contained in:
openGaussDev
2022-03-04 12:56:56 +08:00
committed by yanghao
parent fd2bf6d4a6
commit b93d4de9ed
3 changed files with 32 additions and 24 deletions

View File

@ -383,7 +383,7 @@ bool CheckCycleExeception(StartWithOpState *node, TupleTableSlot *slot)
Assert (IsA(rustate, RecursiveUnionState));
if (IsConnectByLevelStartWithPlan(swplan)) {
if (IsConnectByLevelStartWithPlan(swplan) || node->sw_keyAttnum == 0) {
/* for connect by level case, we do not do cycle check */
return false;
}