1
0
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:
David Hall
2019-02-25 14:54:46 -06:00
parent ab931e7c51
commit a2aa4b8479
67 changed files with 2391 additions and 1018 deletions

View File

@@ -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: