From e9f7572a5491a0fc823a45ba5aeb91ae7f4d35e2 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Thu, 15 Dec 2022 14:52:53 +0800 Subject: [PATCH] fix(query): avg sum operation check range --- source/libs/function/src/detail/tavgfunction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/function/src/detail/tavgfunction.c b/source/libs/function/src/detail/tavgfunction.c index f3bfa39798..e31db0f360 100644 --- a/source/libs/function/src/detail/tavgfunction.c +++ b/source/libs/function/src/detail/tavgfunction.c @@ -55,7 +55,7 @@ } // define unsigned number sum with check overflow -#define CHECK_OVERFLOW_SUM_UNSIGNED (out, val) \ +#define CHECK_OVERFLOW_SUM_UNSIGNED(out, val) \ if (out->sum.overflow) { \ out->sum.dsum += val; \ } else if (UINT64_MAX - out->sum.usum <= val) { \