From a07fd6c17573e4eb063b0f29e770f196c279b2d3 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 16 Nov 2021 09:06:03 +0800 Subject: [PATCH] [TS-405] arith coredump on empty table --- src/query/src/qExecutor.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index b2e63707cb..465d45413a 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -4853,6 +4853,10 @@ static SSDataBlock* doArithmeticOperation(void* param) { } STableQueryInfo* pTableQueryInfo = pRuntimeEnv->pQuery->current; + if (pTableQueryInfo == NULL) { + setQueryStatus(pRuntimeEnv, QUERY_COMPLETED); + break; + } // todo dynamic set tags setTagValue(pOperator, pTableQueryInfo->pTable, pInfo->pCtx, pOperator->numOfOutput); -- GitLab