diff --git a/src/query/src/qAggMain.c b/src/query/src/qAggMain.c index b0f7decfc66bdfad77f143de253ea8a0e4148abf..d328e5422cca0e365c2d606608cf6ee3f685dd5c 100644 --- a/src/query/src/qAggMain.c +++ b/src/query/src/qAggMain.c @@ -764,7 +764,7 @@ static int32_t lastDistFuncRequired(SQLFunctionCtx *pCtx, STimeWindow* w, int32_ if (pInfo->hasResult != DATA_SET_FLAG) { return BLK_DATA_ALL_NEEDED; } else { - return (pInfo->ts > w->ekey) ? BLK_DATA_NO_NEEDED : BLK_DATA_ALL_NEEDED; + return (pInfo->ts >= w->ekey) ? BLK_DATA_NO_NEEDED : BLK_DATA_ALL_NEEDED; } }