diff --git a/source/libs/executor/src/mergejoin.c b/source/libs/executor/src/mergejoin.c index 61809b99e0..adf1b4f0d1 100755 --- a/source/libs/executor/src/mergejoin.c +++ b/source/libs/executor/src/mergejoin.c @@ -46,7 +46,7 @@ static FORCE_INLINE bool mJoinBlkReachThreshold(SMJoinOperatorInfo* pInfo, int64 return blkRows >= pInfo->ctx.mergeCtx.blkThreshold; } - return (pInfo->execInfo.resRows + blkRows) >= pInfo->ctx.mergeCtx.limit; + return (pInfo->execInfo.resRows + blkRows) >= pInfo->ctx.mergeCtx.limit || blkRows >= pInfo->ctx.mergeCtx.blkThreshold; }