From bf077578e80f3b841dcec631c4918dfd67f5851b Mon Sep 17 00:00:00 2001 From: dapan1121 <89396746@qq.com> Date: Thu, 18 Feb 2021 10:13:41 +0800 Subject: [PATCH] fix bug --- src/query/src/qAggMain.c | 2 +- src/query/src/qExecutor.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/query/src/qAggMain.c b/src/query/src/qAggMain.c index fb8b2394f2..fe0fc666d7 100644 --- a/src/query/src/qAggMain.c +++ b/src/query/src/qAggMain.c @@ -2488,7 +2488,7 @@ static void buildTopBotStruct(STopBotInfo *pTopBotInfo, SQLFunctionCtx *pCtx) { static bool top_bottom_function_setup(SQLFunctionCtx *pCtx) { if (!function_setup(pCtx)) { - return false; + //return false; } STopBotInfo *pInfo = getTopBotOutputInfo(pCtx); diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 72ae0d566c..7d4f60d4ef 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -3786,7 +3786,7 @@ void setResultRowOutputBufInitCtx(SQueryRuntimeEnv *pRuntimeEnv, SResultRow *pRe pCtx->ptsOutputBuf = pRuntimeEnv->pCtx[0].pOutput; } - if (!pCtx->resultInfo->initialized) { + if (!pCtx->resultInfo->initialized || functionId == TSDB_FUNC_TOP || functionId == TSDB_FUNC_BOTTOM) { aAggs[functionId].init(pCtx); } } -- GitLab