From 1df66b42e42ae14db1db5ea33217c6ecf591cf2d Mon Sep 17 00:00:00 2001 From: Mijamind Date: Wed, 31 May 2023 01:57:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dgrp=5Fcollations=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E8=80=8Cagg->numCols=20>=200=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E4=B8=8B=E6=97=A0=E6=B3=95=E8=BF=9B=E8=A1=8Cnode2string?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=BA=8F=E5=88=97=E5=8C=96=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98,=E7=94=A8=E4=BA=8Endp=E7=AE=97=E5=AD=90=E4=B8=8B?= =?UTF-8?q?=E6=8E=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contrib/ndpplugin/ndpam.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/contrib/ndpplugin/ndpam.cpp b/contrib/ndpplugin/ndpam.cpp index 4a6dc60e4..514d67328 100644 --- a/contrib/ndpplugin/ndpam.cpp +++ b/contrib/ndpplugin/ndpam.cpp @@ -837,6 +837,16 @@ NdpRetCode NdpScanChannel::SendIo(NdpIoSlot* req, NdpScanDesc ndpScan) NdpAdminRequest* NdpScanChannel::ConstructPlanReq(NdpScanDesc ndpScan) { + if (IsA(ndpScan->cond->plan, Agg)) { + Agg* agg = (Agg*)ndpScan->cond->plan; + if (agg->grp_collations == NULL && agg->numCols > 0) { + agg->grp_collations = (unsigned int*)palloc(sizeof(unsigned int) * agg->numCols); + for (int i = 0; i < agg->numCols; i++) { + agg->grp_collations[i] = InvalidOid; + } + } + } + char* str = nodeToString(ndpScan->cond->plan); int len = strlen(str) + 1; if (len == 1) {