From cbb8fd609bb4b788284f92556ef53cb92ac163a0 Mon Sep 17 00:00:00 2001 From: wusong Date: Wed, 27 Apr 2022 20:15:23 +0800 Subject: [PATCH] =?UTF-8?q?fix=20#I51OZS=20=E4=BF=AE=E5=A4=8D=E5=9C=A8?= =?UTF-8?q?=E6=89=A9=E5=B1=95=E4=B8=AD=E6=97=A0=E6=B3=95=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E5=B7=B2=E5=88=9B=E5=BB=BA=E5=87=BD=E6=95=B0=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8Csort=5Fcandidate=5Ffunc=5Flist=20=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/backend/parser/parse_func.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/common/backend/parser/parse_func.cpp b/src/common/backend/parser/parse_func.cpp index b2c595164..1e7e48f85 100644 --- a/src/common/backend/parser/parse_func.cpp +++ b/src/common/backend/parser/parse_func.cpp @@ -1454,7 +1454,14 @@ FuncCandidateList sort_candidate_func_list(FuncCandidateList oldCandidates) } candidates[smallestIndex] = NULL; } - + + for (int i = 0; i < size; i++) { + if (candidates[i] != NULL) { + lastCandidate->next = candidates[i]; + lastCandidate = lastCandidate->next; + } + } + lastCandidate->next = NULL; pfree(candidates); return sortedCandidates; }