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

MCOL-641 Followup on functions commit.

This commit is contained in:
Roman Nozdrin
2020-05-08 09:50:15 +00:00
parent cfe35b5c7f
commit 3d94ec1568
3 changed files with 20 additions and 3 deletions

View File

@ -151,6 +151,24 @@ int64_t Func_floor::getIntVal(Row& row,
}
break;
// floor(decimal(X,Y)) leads to this path if X, Y allows to
// downcast to INT otherwise Func_floor::getDecimalVal() is called
case CalpontSystemCatalog::DECIMAL:
case CalpontSystemCatalog::UDECIMAL:
{
IDB_Decimal tmp = getDecimalVal(row, parm, isNull, op_ct);
if (op_ct.colWidth == datatypes::MAXDECIMALWIDTH)
{
ret = datatypes::Decimal::getInt64FromWideDecimal(tmp.s128Value);
}
else
{
ret = tmp.value;
}
break;
}
default:
{
std::ostringstream oss;