mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 18:12:02 +00:00
dbms: addition to prev. revision [#CONV-2944].
This commit is contained in:
parent
a74b574004
commit
a8cf550864
@ -51,6 +51,8 @@ static void numWidthVector(const std::vector<T> & a, std::vector<UInt64> & c)
|
||||
for (size_t i = 0; i < size; ++i)
|
||||
if (a[i] >= 0)
|
||||
c[i] = a[i] ? 1 + log10(a[i]) : 1;
|
||||
else if (std::tr1::is_signed<T>::value && a[i] == std::numeric_limits<T>::min())
|
||||
c[i] = 2 + log10(std::numeric_limits<T>::max());
|
||||
else
|
||||
c[i] = 2 + log10(-a[i]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user