From e9f30db0ab64b2d150e2d97a2da5f9ed7929bef1 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Sat, 8 Oct 2022 18:28:09 +0800 Subject: [PATCH] fix(query): fix infinite interpolation results generated when sliding window is smaller than interval window in descending time order --- source/libs/executor/src/tfill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/executor/src/tfill.c b/source/libs/executor/src/tfill.c index 10a65065fc..34997a5dd8 100644 --- a/source/libs/executor/src/tfill.c +++ b/source/libs/executor/src/tfill.c @@ -583,7 +583,7 @@ int64_t getNumOfResultsAfterFillGap(SFillInfo* pFillInfo, TSKEY ekey, int32_t ma numOfRes += 1; assert(numOfRes >= numOfRows); } else { // reach the end of data - if ((ekey1 <= pFillInfo->currentKey && FILL_IS_ASC_FILL(pFillInfo)) || + if ((ekey1 < pFillInfo->currentKey && FILL_IS_ASC_FILL(pFillInfo)) || (ekey1 >= pFillInfo->currentKey && !FILL_IS_ASC_FILL(pFillInfo))) { return 0; } -- GitLab