mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Fix UBSan report in quantileTiming
This commit is contained in:
parent
7180cf2367
commit
d1bba10be0
@ -113,8 +113,8 @@ public:
|
||||
|
||||
if constexpr (std::is_same_v<Data, QuantileTiming<Value>>)
|
||||
{
|
||||
/// QuantileTiming only supports integers.
|
||||
if (isNaN(value) || value > std::numeric_limits<Value>::max() || value < std::numeric_limits<Value>::min())
|
||||
/// QuantileTiming only supports unsigned integers. Too large values are also meaningless.
|
||||
if (isNaN(value) || value > std::numeric_limits<Int64>::max() || value < 0)
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
0
|
@ -0,0 +1 @@
|
||||
SELECT quantileTiming(-0.)(number / 1.1754943508222875e-38) FROM numbers(257);
|
Loading…
Reference in New Issue
Block a user