From 55c7770d84024557dbdcf11a7af057421e7f780a Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Tue, 15 Oct 2024 16:11:33 +0800 Subject: [PATCH] fix: param start and every calculation errors --- source/libs/executor/src/forecastoperator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/executor/src/forecastoperator.c b/source/libs/executor/src/forecastoperator.c index 243330a151..00956c56a3 100644 --- a/source/libs/executor/src/forecastoperator.c +++ b/source/libs/executor/src/forecastoperator.c @@ -155,7 +155,7 @@ static int32_t forecastCloseBuf(SForecastSupp* pSupp) { if (code != 0) return code; int32_t len = strlen(pSupp->algoOpt); - int64_t every = (pSupp->maxTs - pSupp->minTs) / (pSupp->numOfRows + 1); + int64_t every = (pSupp->maxTs - pSupp->minTs) / (pSupp->numOfRows - 1); int64_t start = pSupp->maxTs + every; bool hasStart = taosAnalGetOptInt(pSupp->algoOpt, "start", &start); if (!hasStart) {