From 33b428a4ca230db3d1975dae91d1fc15d98fdc60 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 20 Jan 2021 00:40:09 +0000 Subject: [PATCH] fix compile error in windows --- src/query/src/qExecutor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 90e4ca8139..b9eaa7f7c4 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -4401,8 +4401,8 @@ static void freeTableBlockDist(STableBlockDist *pTableBlockDist) { } } static int32_t getPercentileFromSortedArray(const SArray* pArray, float rate) { - size_t len = taosArrayGetSize(pArray); - if (len == 0) { + int32_t len = taosArrayGetSize(pArray); + if (len <= 0) { return 0; } assert(rate >= 0 && rate <= 1.0); @@ -4431,7 +4431,7 @@ static void generateBlockDistResult(STableBlockDist *pTableBlockDist) { max = MAX(max, rows); totalRows += rows; } - avg = totalBlocks > 0 ? (int32_t)(((totalRows * 1.0)/totalBlocks)) : 0; + avg = totalBlocks > 0 ? (int64_t)(totalRows/totalBlocks) : 0; taosArraySort(blockInfos, compareBlockInfo); -- GitLab