mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Highlight potential bugs in code
This commit is contained in:
parent
6c5aab28e8
commit
6e93d936d3
@ -274,12 +274,14 @@ inline bool greaterOp<DB::UInt64, DB::Float32>(DB::UInt64 u, DB::Float32 f)
|
|||||||
template <>
|
template <>
|
||||||
inline bool greaterOp<DB::Float64, DB::UInt128>(DB::Float64 f, DB::UInt128 u)
|
inline bool greaterOp<DB::Float64, DB::UInt128>(DB::Float64 f, DB::UInt128 u)
|
||||||
{
|
{
|
||||||
|
/// TODO: This is wrong.
|
||||||
return u.low == 0 && greaterOp(f, u.high);
|
return u.low == 0 && greaterOp(f, u.high);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
inline bool greaterOp<DB::UInt128, DB::Float64>(DB::UInt128 u, DB::Float64 f)
|
inline bool greaterOp<DB::UInt128, DB::Float64>(DB::UInt128 u, DB::Float64 f)
|
||||||
{
|
{
|
||||||
|
/// TODO: This is wrong.
|
||||||
return u.low != 0 || greaterOp(u.high, f);
|
return u.low != 0 || greaterOp(u.high, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -360,6 +362,7 @@ inline bool NO_SANITIZE_UNDEFINED equalsOp<DB::Int64, DB::Float32>(DB::Int64 u,
|
|||||||
template <>
|
template <>
|
||||||
inline bool NO_SANITIZE_UNDEFINED equalsOp<DB::UInt128, DB::Float64>(DB::UInt128 u, DB::Float64 f)
|
inline bool NO_SANITIZE_UNDEFINED equalsOp<DB::UInt128, DB::Float64>(DB::UInt128 u, DB::Float64 f)
|
||||||
{
|
{
|
||||||
|
/// TODO: This is wrong.
|
||||||
return u.low == 0 && equalsOp(static_cast<UInt64>(u.high), f);
|
return u.low == 0 && equalsOp(static_cast<UInt64>(u.high), f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user