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

MCOL-174 Replace custom helpers::power() with standard pow(). helpers::power() breaks with #dec > 9

This commit is contained in:
David Hall
2019-07-31 14:49:31 -05:00
parent 765d1d38d4
commit 81e745256b
8 changed files with 39 additions and 30 deletions

View File

@ -85,7 +85,7 @@ int64_t Func_period_diff::getIntVal(rowgroup::Row& row,
case execplan::CalpontSystemCatalog::UDECIMAL:
{
IDB_Decimal d = parm[0]->data()->getDecimalVal(row, isNull);
period1 = d.value / helpers::power(d.scale);
period1 = d.value / pow(10.0, d.scale);
break;
}
@ -133,7 +133,7 @@ int64_t Func_period_diff::getIntVal(rowgroup::Row& row,
case execplan::CalpontSystemCatalog::UDECIMAL:
{
IDB_Decimal d = parm[1]->data()->getDecimalVal(row, isNull);
period2 = d.value / helpers::power(d.scale);
period2 = d.value / pow(10.0, d.scale);
break;
}