feat: support total vgroups count for table
This commit is contained in:
parent
6b5cd86d79
commit
b68e440cc2
|
@ -292,6 +292,7 @@ typedef struct STableBlockDistInfo {
|
|||
uint16_t numOfFiles;
|
||||
uint32_t numOfTables;
|
||||
uint32_t numOfBlocks;
|
||||
uint32_t numOfVgroups;
|
||||
uint64_t totalSize;
|
||||
uint64_t totalRows;
|
||||
int32_t maxRows;
|
||||
|
|
|
@ -4271,6 +4271,7 @@ int32_t tsdbGetFileBlocksDistInfo(STsdbReader* pReader, STableBlockDistInfo* pTa
|
|||
int32_t code = TSDB_CODE_SUCCESS;
|
||||
pTableBlockInfo->totalSize = 0;
|
||||
pTableBlockInfo->totalRows = 0;
|
||||
pTableBlockInfo->numOfVgroups = 1;
|
||||
|
||||
// find the start data block in file
|
||||
SReaderStatus* pStatus = &pReader->status;
|
||||
|
|
|
@ -5192,6 +5192,7 @@ int32_t blockDistFunction(SqlFunctionCtx* pCtx) {
|
|||
pDistInfo->numOfBlocks += p1.numOfBlocks;
|
||||
pDistInfo->numOfTables += p1.numOfTables;
|
||||
pDistInfo->numOfInmemRows += p1.numOfInmemRows;
|
||||
pDistInfo->numOfVgroups += p1.numOfVgroups;
|
||||
pDistInfo->totalSize += p1.totalSize;
|
||||
pDistInfo->totalRows += p1.totalRows;
|
||||
pDistInfo->numOfFiles += p1.numOfFiles;
|
||||
|
@ -5317,7 +5318,7 @@ int32_t blockDistFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) {
|
|||
colDataAppend(pColInfo, row++, st, false);
|
||||
|
||||
len = sprintf(st + VARSTR_HEADER_SIZE, "Total_Tables=[%d] Total_Files=[%d] Total_Vgroups=[%d]", pData->numOfTables,
|
||||
pData->numOfFiles, 0);
|
||||
pData->numOfFiles, pData->numOfVgroups);
|
||||
|
||||
varDataSetLen(st, len);
|
||||
colDataAppend(pColInfo, row++, st, false);
|
||||
|
|
Loading…
Reference in New Issue