diff --git a/src/query/src/qAggMain.c b/src/query/src/qAggMain.c index 150c58ed4d0bf2e0ed5e8d8a03771278288f652b..5044320cc7c0417236190c1f46b4a7100f0fd74c 100644 --- a/src/query/src/qAggMain.c +++ b/src/query/src/qAggMain.c @@ -3945,7 +3945,7 @@ static void rate_finalizer(SQLFunctionCtx *pCtx) { return; } - *(double*) pCtx->pOutput = do_calc_rate(pRateInfo, TSDB_TICK_PER_SECOND(pCtx->param[0].i64)); + *(double*) pCtx->pOutput = do_calc_rate(pRateInfo, (double) TSDB_TICK_PER_SECOND(pCtx->param[0].i64)); // cannot set the numOfIteratedElems again since it is set during previous iteration pResInfo->numOfRes = 1;