1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Hex double convertion

This commit is contained in:
Leonid Fedorov
2022-02-24 10:05:49 +03:00
parent dc4f6865d1
commit 5a577553f7

View File

@ -95,7 +95,7 @@ string Func_hex::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
if ((val <= (double)numeric_limits<int64_t>::min()) || (val >= (double)numeric_limits<int64_t>::max()))
dec = ~(int64_t)0;
else
dec = (uint64_t)(val + (val > 0 ? 0.5 : -0.5));
dec = static_cast<uint64_t>(static_cast<int64_t>(val + (val > 0 ? 0.5 : -0.5)));
retval = helpers::convNumToStr(dec, ans, 16);
break;