You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-12-24 14:20:59 +03:00
MCOL-1822 Intermediate checkin. DISTINCT not working.
This commit is contained in:
@@ -81,6 +81,38 @@ double Func_exp::getDoubleVal(Row& row,
|
||||
return ret;
|
||||
}
|
||||
|
||||
long double Func_exp::getLongDoubleVal(Row& row,
|
||||
FunctionParm& parm,
|
||||
bool& isNull,
|
||||
CalpontSystemCatalog::ColType&)
|
||||
{
|
||||
// null value is indicated by isNull
|
||||
long double x = parm[0]->data()->getLongDoubleVal(row, isNull);
|
||||
long double ret = 0.0;
|
||||
|
||||
if (!isNull)
|
||||
{
|
||||
errno = 0;
|
||||
ret = expl(x);
|
||||
|
||||
if (errno == ERANGE) // display NULL for out range value
|
||||
{
|
||||
if (x > 0)
|
||||
{
|
||||
isNull = true;
|
||||
Message::Args args;
|
||||
args.add("exp");
|
||||
args.add((double)x);
|
||||
unsigned errcode = ERR_FUNC_OUT_OF_RANGE_RESULT;
|
||||
throw IDBExcept(IDBErrorInfo::instance()->errorMsg(errcode, args), errcode);
|
||||
}
|
||||
else
|
||||
ret = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // namespace funcexp
|
||||
// vim:ts=4 sw=4:
|
||||
|
||||
Reference in New Issue
Block a user