fix(query): fix apply limit error for doMultiwayMerge operator if

datablocks within same group
This commit is contained in:
Ganlin Zhao 2023-02-24 17:17:55 +08:00
parent 6e39bec448
commit f9f4066f3c
1 changed files with 3 additions and 1 deletions

View File

@ -671,7 +671,9 @@ SSDataBlock* getMultiwaySortedBlockData(SSortHandle* pHandle, SSDataBlock* pData
} }
bool limitReached = applyLimitOffset(&pInfo->limitInfo, p, pTaskInfo); bool limitReached = applyLimitOffset(&pInfo->limitInfo, p, pTaskInfo);
if (limitReached) { // if limit is reached within a group, do not clear limiInfo otherwise the next block
// will be processed.
if (newgroup && limitReached) {
resetLimitInfoForNextGroup(&pInfo->limitInfo); resetLimitInfoForNextGroup(&pInfo->limitInfo);
} }