提交 33b428a4 编写于 作者: Y yihaoDeng

fix compile error in windows

上级 0a0e68e2
...@@ -4401,8 +4401,8 @@ static void freeTableBlockDist(STableBlockDist *pTableBlockDist) { ...@@ -4401,8 +4401,8 @@ static void freeTableBlockDist(STableBlockDist *pTableBlockDist) {
} }
} }
static int32_t getPercentileFromSortedArray(const SArray* pArray, float rate) { static int32_t getPercentileFromSortedArray(const SArray* pArray, float rate) {
size_t len = taosArrayGetSize(pArray); int32_t len = taosArrayGetSize(pArray);
if (len == 0) { if (len <= 0) {
return 0; return 0;
} }
assert(rate >= 0 && rate <= 1.0); assert(rate >= 0 && rate <= 1.0);
...@@ -4431,7 +4431,7 @@ static void generateBlockDistResult(STableBlockDist *pTableBlockDist) { ...@@ -4431,7 +4431,7 @@ static void generateBlockDistResult(STableBlockDist *pTableBlockDist) {
max = MAX(max, rows); max = MAX(max, rows);
totalRows += rows; totalRows += rows;
} }
avg = totalBlocks > 0 ? (int32_t)(((totalRows * 1.0)/totalBlocks)) : 0; avg = totalBlocks > 0 ? (int64_t)(totalRows/totalBlocks) : 0;
taosArraySort(blockInfos, compareBlockInfo); taosArraySort(blockInfos, compareBlockInfo);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册