fix(query): add rows info if blocks exist.

This commit is contained in:
Haojun Liao 2023-12-15 15:04:55 +08:00
parent 0449b5f1bd
commit 4758f95708
1 changed files with 1 additions and 1 deletions

View File

@ -5649,7 +5649,7 @@ int32_t blockDistFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) {
len += x;
}
if (num > 0) {
if (pData->blockRowsHisto[i] > 0) {
double v = pData->blockRowsHisto[i] * 100.0 / pData->numOfBlocks;
len += sprintf(st + VARSTR_HEADER_SIZE + len, " %d (%.2f%c)", pData->blockRowsHisto[i], v, '%');
}