1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-4361 Replace pow(10.0, (double)scale) expressions with a static dictionary lookup.

This commit is contained in:
Alexander Barkov
2021-04-09 12:14:41 +04:00
parent fd720bfd7d
commit 362bfcd15e
13 changed files with 153 additions and 132 deletions

View File

@ -1519,7 +1519,7 @@ double Func_cast_decimal::getDoubleVal(Row& row,
return static_cast<double>(decimal);
}
return (double) decimal.value / helpers::powerOf10_c[decimal.scale];
return decimal.decimal64ToXFloat<double>();
}
@ -1631,7 +1631,7 @@ double Func_cast_double::getDoubleVal(Row& row,
}
else
{
dblval = (double)(decimal.value / pow((double)10, decimal.scale));
dblval = decimal.decimal64ToXFloat<double>();
}
}
break;