fix: param start and every calculation errors

This commit is contained in:
Shengliang Guan 2024-10-15 16:11:33 +08:00
parent adbea71230
commit 55c7770d84
1 changed files with 1 additions and 1 deletions

View File

@ -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) {