From bd71cb887086b43e345336e7db885963c93ae078 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Mon, 17 Apr 2023 16:09:54 +0800 Subject: [PATCH] fix: group cache save issue --- source/libs/executor/src/executil.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index 27ac8e4076..bbda0d2513 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -492,6 +492,8 @@ int32_t getColInfoResultForGroupby(void* metaHandle, SNodeList* group, STableLis if (lastTableList && (0 == memcmp(context.digest, lastMd5.digest, sizeof(lastMd5.digest)) && (taosArrayGetSize(pTableListInfo->pTableList) == taosArrayGetSize(lastTableList)))) { pTableListInfo->pTableList = taosArrayDup(lastTableList, NULL); goto end; + } else { + qError("group not hit, last:%p, lastSize:%d, newSize:%d", lastTableList, (int32_t)taosArrayGetSize(lastTableList), (int32_t)taosArrayGetSize(pTableListInfo->pTableList)); } pUidTagList = taosArrayInit(8, sizeof(STUidTagInfo)); @@ -620,11 +622,9 @@ int32_t getColInfoResultForGroupby(void* metaHandle, SNodeList* group, STableLis info->groupId = calcGroupId(keyBuf, len); } - if (memcmp(context.digest, lastMd5.digest, sizeof(lastMd5.digest))) { - memcpy(&lastMd5.digest, &context.digest, sizeof(context.digest)); - taosArrayDestroy(lastTableList); - lastTableList = taosArrayDup(pTableListInfo->pTableList, NULL); - } + memcpy(&lastMd5.digest, &context.digest, sizeof(context.digest)); + taosArrayDestroy(lastTableList); + lastTableList = taosArrayDup(pTableListInfo->pTableList, NULL); // int64_t st2 = taosGetTimestampUs(); // qDebug("calculate tag block rows:%d, cost:%ld us", rows, st2-st1); -- GitLab