From 0d6450de273eaafeec8677d4e6679cad5e0f3b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=B2=B2=E9=B9=8F?= Date: Sat, 17 Oct 2020 10:25:47 +0800 Subject: [PATCH] =?UTF-8?q?update=20src/gausskernel/optimizer/plan/createp?= =?UTF-8?q?lan.cpp.=20=E4=BF=AE=E6=94=B9create=5Fappend=5Fplan=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E4=B8=AD=E5=AF=B9=20path=E4=B8=BAsubquery=E4=B8=94bes?= =?UTF-8?q?tpath->subpaths=E4=B8=BA=E7=A9=BA=20=E7=9A=84=E6=83=85=E5=86=B5?= =?UTF-8?q?=E7=9A=84=E5=A4=84=E7=90=86=20=E5=8F=82=E8=80=83Gaussdb?= =?UTF-8?q?=E5=92=8CPostgres=E4=B8=AD=E5=A4=84=E7=90=86=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=EF=BC=8C=E5=B0=86=E5=8E=9F=E6=9C=89=E7=9A=84=E6=96=AD=E8=A8=80?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BAif=E5=88=A4=E6=96=AD=E3=80=82=20?= =?UTF-8?q?=E5=BD=93=E5=87=BA=E7=8E=B0=E4=B8=8A=E8=BF=B0=E6=83=85=E5=86=B5?= =?UTF-8?q?=E6=98=AF=E5=88=A4=E6=96=ADsubplan=E4=B8=BAdummy=20plan?= =?UTF-8?q?=EF=BC=8C=E6=98=AF=E5=88=99=E7=BB=A7=E7=BB=AD=E6=89=A7=E8=A1=8C?= =?UTF-8?q?make=5Fsubqueryscan;=E5=8F=8D=E4=B9=8B=E5=88=99=E6=89=A7?= =?UTF-8?q?=E8=A1=8Cmake=5Fresult.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gausskernel/optimizer/plan/createplan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gausskernel/optimizer/plan/createplan.cpp b/src/gausskernel/optimizer/plan/createplan.cpp index 6c7476aa6..890916aa9 100644 --- a/src/gausskernel/optimizer/plan/createplan.cpp +++ b/src/gausskernel/optimizer/plan/createplan.cpp @@ -1072,8 +1072,8 @@ static Plan* create_append_plan(PlannerInfo* root, AppendPath* best_path) * subquery's rangetable so that the executor will apply permissions * checks to those rels at runtime.) */ - if (rel->rtekind == RTE_SUBQUERY) { - Assert(is_dummy_plan(rel->subplan)); + if (rel->rtekind == RTE_SUBQUERY && + (rel->subplan != NULL && is_dummy_plan(rel->subplan) == true)) { return (Plan*)make_subqueryscan(tlist, NIL, rel->relid, rel->subplan); } else { /* Generate a Result plan with constant-FALSE gating qual */