From 43cce095d0d278375b7408e6db1940b0a256cf5a Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 8 Feb 2023 14:26:04 +0800 Subject: [PATCH] fix(query): set correct group table size. --- source/libs/executor/src/executil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index 92d52fbb0a..96b73b1269 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -1831,9 +1831,9 @@ int32_t tableListGetGroupList(const STableListInfo* pTableList, int32_t ordinalG int32_t offset = pTableList->groupOffset[ordinalGroupIndex]; if (ordinalGroupIndex < total - 1) { - *size = pTableList->groupOffset[offset + 1] - pTableList->groupOffset[offset]; + *size = pTableList->groupOffset[ordinalGroupIndex + 1] - offset; } else { - *size = total - pTableList->groupOffset[offset] - 1; + *size = total - offset; } *pKeyInfo = taosArrayGet(pTableList->pTableList, offset);