diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 869f57f117db9b349b6d28cd819c84aa36f82baf..984061e70ff11fa87d8faae3ffa9c99e759d949b 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -5336,8 +5336,11 @@ static char *getArithemicInputSrc(void *param, const char *name, int32_t colId) } static void doSecondaryArithmeticProcess(SQuery* pQuery) { - SArithmeticSupport arithSup = {0}; + if (pQuery->numOfExpr2 == 0) { + return; + } + SArithmeticSupport arithSup = {0}; tFilePage **data = calloc(pQuery->numOfExpr2, POINTER_BYTES); for (int32_t i = 0; i < pQuery->numOfExpr2; ++i) { int32_t bytes = pQuery->pExpr2[i].bytes;