diff --git a/src/query/src/qPercentile.c b/src/query/src/qPercentile.c index 0b39de404db790a27cbaa1c2357e20a86458ed58..4fc4c905941210658c599f201b5898ed4295c309 100644 --- a/src/query/src/qPercentile.c +++ b/src/query/src/qPercentile.c @@ -74,7 +74,7 @@ static int32_t setBoundingBox(MinMaxEntry* range, int16_t type, double minval, d } } else if (IS_UNSIGNED_NUMERIC_TYPE(type)){ range->u64MinVal = (uint64_t) minval; - if (maxval > UINT64_MAX) { + if ((uint64_t)maxval > UINT64_MAX) { range->u64MaxVal = UINT64_MAX; } else { range->u64MaxVal = (uint64_t) maxval;