From 13db0579e087c442f9b1c469bd57bdfa9047d647 Mon Sep 17 00:00:00 2001 From: dapan1121 <89396746@qq.com> Date: Fri, 5 Feb 2021 13:56:37 +0800 Subject: [PATCH] fix bug --- src/query/src/qAggMain.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/query/src/qAggMain.c b/src/query/src/qAggMain.c index d43b5f45e8..ed66047bbe 100644 --- a/src/query/src/qAggMain.c +++ b/src/query/src/qAggMain.c @@ -1569,8 +1569,10 @@ static void stddev_dst_function(SQLFunctionCtx *pCtx) { avg = p->avg; } else { // todo opt performance by using iterator since the timestamp lsit is matched with the output result SResPair* p = bsearch(&pCtx->startTs, resList->pData, len, sizeof(SResPair), tsCompare); - assert(p != NULL); - + if (p == NULL) { + return; + } + avg = p->avg; } -- GitLab