You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-4394 __float128 related code had been moved into a separate file
Trim to double and to long double conversions for Decimal
This commit is contained in:
@ -1881,9 +1881,11 @@ double Func_cast_decimal::getDoubleVal(Row& row,
|
||||
isNull,
|
||||
operationColType);
|
||||
|
||||
// WIP MCOL-641 This could deliver wrong result b/c wide DECIMAL might have
|
||||
// p <= INT64MAXPRECISION
|
||||
if (decimal.precision > datatypes::INT64MAXPRECISION)
|
||||
{
|
||||
return datatypes::Decimal::getDoubleFromWideDecimal(decimal.s128Value, decimal.scale);
|
||||
return static_cast<double>(decimal);
|
||||
}
|
||||
|
||||
return (double) decimal.value / helpers::powerOf10_c[decimal.scale];
|
||||
@ -1994,7 +1996,7 @@ double Func_cast_double::getDoubleVal(Row& row,
|
||||
|
||||
if (parm[0]->data()->resultType().colWidth == datatypes::MAXDECIMALWIDTH)
|
||||
{
|
||||
dblval = datatypes::Decimal::getDoubleFromWideDecimal(decimal.s128Value, decimal.scale);
|
||||
dblval = static_cast<double>(decimal);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user