From f8df9d40ce90038dd31b4609b7a9e22fdacc519d Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 9 Jul 2021 09:25:32 +0800 Subject: [PATCH] [TD-5134] fix runtime error --- src/query/src/qExecutor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 0c7fbf4dc8..4ed7e19fb3 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -939,7 +939,9 @@ static TSKEY getStartTsKey(SQueryAttr* pQueryAttr, STimeWindow* win, const TSKEY static void setArithParams(SArithmeticSupport* sas, SExprInfo *pExprInfo, SSDataBlock* pSDataBlock) { sas->numOfCols = (int32_t) pSDataBlock->info.numOfCols; sas->pExprInfo = pExprInfo; - + if (sas->colList != NULL) { + return; + } sas->colList = calloc(1, pSDataBlock->info.numOfCols*sizeof(SColumnInfo)); for(int32_t i = 0; i < sas->numOfCols; ++i) { SColumnInfoData* pColData = taosArrayGet(pSDataBlock->pDataBlock, i); @@ -992,7 +994,6 @@ static void doSetInputDataBlock(SOperatorInfo* pOperator, SQLFunctionCtx* pCtx, setBlockStatisInfo(&pCtx[i], pBlock, &pOperator->pExpr[i].base.colInfo); if (pCtx[i].functionId == TSDB_FUNC_ARITHM) { - pCtx[i].param[1].pz = (char*) &Operator->pRuntimeEnv->sasArray[i]; setArithParams((SArithmeticSupport*)pCtx[i].param[1].pz, &pOperator->pExpr[i], pBlock); } else { SColIndex* pCol = &pOperator->pExpr[i].base.colInfo; -- GitLab