From 0ecd1fd646bb72c3c8703c3554f36a3a51bd1b3a Mon Sep 17 00:00:00 2001 From: lichuang Date: Fri, 30 Jul 2021 14:36:33 +0800 Subject: [PATCH] [TD-5631]add smallblock stat --- src/query/src/qAggMain.c | 1 + src/query/src/qUtil.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/query/src/qAggMain.c b/src/query/src/qAggMain.c index c8bf8def03..40f168d2ea 100644 --- a/src/query/src/qAggMain.c +++ b/src/query/src/qAggMain.c @@ -3996,6 +3996,7 @@ static void mergeTableBlockDist(SResultRowCellInfo* pResInfo, const STableBlockD pDist->numOfTables += pSrc->numOfTables; pDist->numOfRowsInMemTable += pSrc->numOfRowsInMemTable; + pDist->numOfSmallBlocks += pSrc->numOfSmallBlocks; pDist->numOfFiles += pSrc->numOfFiles; pDist->totalSize += pSrc->totalSize; pDist->totalRows += pSrc->totalRows; diff --git a/src/query/src/qUtil.c b/src/query/src/qUtil.c index 04a7079128..a3d2e424d2 100644 --- a/src/query/src/qUtil.c +++ b/src/query/src/qUtil.c @@ -583,6 +583,7 @@ void blockDistInfoToBinary(STableBlockDist* pDist, struct SBufferWriter* bw) { tbufWriteInt32(bw, pDist->maxRows); tbufWriteInt32(bw, pDist->minRows); tbufWriteUint32(bw, pDist->numOfRowsInMemTable); + tbufWriteUint32(bw, pDist->numOfSmallBlocks); tbufWriteUint64(bw, taosArrayGetSize(pDist->dataBlockInfos)); // compress the binary string @@ -621,6 +622,7 @@ void blockDistInfoFromBinary(const char* data, int32_t len, STableBlockDist* pDi pDist->maxRows = tbufReadInt32(&br); pDist->minRows = tbufReadInt32(&br); pDist->numOfRowsInMemTable = tbufReadUint32(&br); + pDist->numOfSmallBlocks = tbufReadUint32(&br); int64_t numSteps = tbufReadUint64(&br); bool comp = tbufReadUint8(&br); -- GitLab