You've already forked mariadb-columnstore-engine
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:
@ -820,7 +820,6 @@ int fetchNextRow(uchar* buf, cal_table_info& ti, cal_connection_info* ci, bool h
|
||||
dataconvert::DataConvert::decimalToString(dec,
|
||||
(unsigned)colType.scale, buf,
|
||||
sizeof(buf), colType.colDataType);
|
||||
std::cout << buf << std::endl;
|
||||
|
||||
Field_new_decimal* f2 = (Field_new_decimal*)*f;
|
||||
f2->store(buf, strlen(buf), f2->charset());
|
||||
|
@ -70,8 +70,8 @@ int64_t Func_ceil::getIntVal(Row& row,
|
||||
}
|
||||
break;
|
||||
|
||||
// ceil(decimal(38,38)) leads to this path
|
||||
// otherwise Func_ceil::getDecimalVal() is called
|
||||
// ceil(decimal(X,Y)) leads to this path if X, Y allows to
|
||||
// downcast to INT otherwise Func_ceil::getDecimalVal() is called
|
||||
case execplan::CalpontSystemCatalog::DECIMAL:
|
||||
case execplan::CalpontSystemCatalog::UDECIMAL:
|
||||
{
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user