fix: table merge scan use heap sort when there is limit

This commit is contained in:
slzhou 2023-07-25 15:23:00 +08:00
parent ca2ad71bb8
commit f4c28d848b
1 changed files with 1 additions and 1 deletions

View File

@ -2843,7 +2843,7 @@ int32_t startGroupTableMergeScan(SOperatorInfo* pOperator) {
mergeLimit = pInfo->limitInfo.limit.limit + pInfo->limitInfo.limit.offset; mergeLimit = pInfo->limitInfo.limit.limit + pInfo->limitInfo.limit.offset;
} }
size_t szRow = blockDataGetRowSize(pInfo->pResBlock); size_t szRow = blockDataGetRowSize(pInfo->pResBlock);
if (szRow > 1024 && hasLimit) { if (hasLimit) {
pInfo->pSortHandle = tsortCreateSortHandle(pInfo->pSortInfo, SORT_SINGLESOURCE_SORT, -1, -1, pInfo->pSortHandle = tsortCreateSortHandle(pInfo->pSortInfo, SORT_SINGLESOURCE_SORT, -1, -1,
NULL, pTaskInfo->id.str, mergeLimit, szRow+8, tsPQSortMemThreshold * 1024* 1024); NULL, pTaskInfo->id.str, mergeLimit, szRow+8, tsPQSortMemThreshold * 1024* 1024);
} else { } else {