From 8b549b4efff1aaa0db9db8ea76782dbf52b6f87c Mon Sep 17 00:00:00 2001 From: hjxilinx Date: Sat, 30 Nov 2019 16:58:10 +0800 Subject: [PATCH] fix bug issue #804 --- src/client/src/tscFunctionImpl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/src/tscFunctionImpl.c b/src/client/src/tscFunctionImpl.c index be3dce9c0e..2d913b2f20 100644 --- a/src/client/src/tscFunctionImpl.c +++ b/src/client/src/tscFunctionImpl.c @@ -1043,10 +1043,10 @@ static bool max_func_setup(SQLFunctionCtx *pCtx) { *((int32_t *)pCtx->aOutputBuf) = INT32_MIN; break; case TSDB_DATA_TYPE_FLOAT: - *((float *)pCtx->aOutputBuf) = -FLT_MIN; + *((float *)pCtx->aOutputBuf) = -FLT_MAX; break; case TSDB_DATA_TYPE_DOUBLE: - *((double *)pCtx->aOutputBuf) = -DBL_MIN; + *((double *)pCtx->aOutputBuf) = -DBL_MAX; break; case TSDB_DATA_TYPE_BIGINT: *((int64_t *)pCtx->aOutputBuf) = INT64_MIN; -- GitLab