From ff9eb115c778f5bda981d33a6093b725b179eaf2 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Mon, 26 Oct 2020 23:31:50 +0000 Subject: [PATCH] TD-1732 --- 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 e12a3a65bf..12d3b7dfd3 100644 --- a/src/client/src/tscFunctionImpl.c +++ b/src/client/src/tscFunctionImpl.c @@ -2463,8 +2463,8 @@ static void percentile_function(SQLFunctionCtx *pCtx) { if (pCtx->preAggVals.isSet) { double tmin = 0.0, tmax = 0.0; if (pCtx->inputType >= TSDB_DATA_TYPE_TINYINT && pCtx->inputType <= TSDB_DATA_TYPE_BIGINT) { - tmin = GET_INT64_VAL(&pCtx->preAggVals.statis.min); - tmax = GET_INT64_VAL(&pCtx->preAggVals.statis.max); + tmin = (double)GET_INT64_VAL(&pCtx->preAggVals.statis.min); + tmax = (double)GET_INT64_VAL(&pCtx->preAggVals.statis.max); } else if (pCtx->inputType == TSDB_DATA_TYPE_DOUBLE || pCtx->inputType == TSDB_DATA_TYPE_FLOAT) { tmin = GET_DOUBLE_VAL(&pCtx->preAggVals.statis.min); tmax = GET_DOUBLE_VAL(&pCtx->preAggVals.statis.max); -- GitLab