From 4b9190ab38c93122fdebdc7083c9c00f848c5c43 Mon Sep 17 00:00:00 2001 From: wpan Date: Fri, 9 Jul 2021 14:06:49 +0800 Subject: [PATCH] fix interval issue --- src/query/src/qExecutor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 557d38d7f1..b04db7ca1d 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -1304,7 +1304,8 @@ static void hashIntervalAgg(SOperatorInfo* pOperatorInfo, SResultRowInfo* pResul j++; } - for(; pResultRowInfo->pResult[j] != pResultRowInfo->current; ++j) { + SResultRow* current = pResultRowInfo->current; + for(; pResultRowInfo->pResult[j] != current && j < pResultRowInfo->size; ++j) { SResultRow* pRes = pResultRowInfo->pResult[j]; if (pRes->closed) { assert(resultRowInterpolated(pRes, RESULT_ROW_START_INTERP) && resultRowInterpolated(pRes, RESULT_ROW_END_INTERP));