diff --git a/source/libs/executor/src/tfill.c b/source/libs/executor/src/tfill.c index 68228f26893d3cc44a9596db33c352e92f345908..dd00903ae754c8bf84a06ccd7dc6769e7e1a45c5 100644 --- a/source/libs/executor/src/tfill.c +++ b/source/libs/executor/src/tfill.c @@ -1427,7 +1427,7 @@ static void doDeleteFillResult(SOperatorInfo* pOperator) { streamStateFreeCur(pCur); pCur = streamStateGetAndCheckCur(pOperator->pTaskInfo->streamInfo.pState, &nextKey); } - endTs = nextKey.ts - 1; + endTs = TMAX(ts, nextKey.ts - 1); if (code != TSDB_CODE_SUCCESS) { break; }