From 7c58a9a280a1df92ab1361b814d1a049554c09f7 Mon Sep 17 00:00:00 2001 From: slzhou Date: Mon, 8 Jan 2024 08:21:27 +0800 Subject: [PATCH] fix: disable sort by row id when num of tables is 1 --- source/libs/executor/src/scanoperator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index b3e6c64953..76d63e8896 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -3425,7 +3425,7 @@ int32_t startDurationForGroupTableMergeScan(SOperatorInfo* pOperator) { pInfo->sortBufSize = 2048 * pInfo->bufPageSize; int32_t numOfBufPage = pInfo->sortBufSize / pInfo->bufPageSize; - if (pInfo->bSortRowId) { + if (pInfo->bSortRowId && numOfTable != 1) { pInfo->pSortHandle = tsortCreateSortHandle(pInfo->pSortInfo, SORT_BLOCK_TS_MERGE, pInfo->bufPageSize, numOfBufPage, pInfo->pSortInputBlock, pTaskInfo->id.str, 0, 0, 0); int32_t memSize = 512 * 1024 * 1024;