1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

clang format apply

This commit is contained in:
Leonid Fedorov
2022-01-21 16:43:49 +00:00
parent 6b6411229f
commit 04752ec546
1376 changed files with 393460 additions and 412662 deletions

View File

@ -17,10 +17,10 @@
MA 02110-1301, USA. */
/****************************************************************************
* $Id: func_abs.cpp 3495 2013-01-21 14:09:51Z rdempsey $
*
*
****************************************************************************/
* $Id: func_abs.cpp 3495 2013-01-21 14:09:51Z rdempsey $
*
*
****************************************************************************/
#include <cstdlib>
#include <string>
@ -36,61 +36,47 @@ using namespace rowgroup;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_abs::operationType(FunctionParm& fp, CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType Func_abs::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
// operation type is not used by this functor
return fp[0]->data()->resultType();
}
int64_t Func_abs::getIntVal(Row& row,
FunctionParm& parm,
bool& isNull,
CalpontSystemCatalog::ColType&)
int64_t Func_abs::getIntVal(Row& row, FunctionParm& parm, bool& isNull, CalpontSystemCatalog::ColType&)
{
// null value is indicated by isNull
return llabs(parm[0]->data()->getIntVal(row, isNull));
// null value is indicated by isNull
return llabs(parm[0]->data()->getIntVal(row, isNull));
}
uint64_t Func_abs::getUintVal(Row& row,
FunctionParm& parm,
bool& isNull,
CalpontSystemCatalog::ColType&)
uint64_t Func_abs::getUintVal(Row& row, FunctionParm& parm, bool& isNull, CalpontSystemCatalog::ColType&)
{
// null value is indicated by isNull
return parm[0]->data()->getIntVal(row, isNull);
// null value is indicated by isNull
return parm[0]->data()->getIntVal(row, isNull);
}
IDB_Decimal Func_abs::getDecimalVal(Row& row,
FunctionParm& parm,
bool& isNull,
IDB_Decimal Func_abs::getDecimalVal(Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType&)
{
IDB_Decimal d = parm[0]->data()->getDecimalVal(row, isNull);
IDB_Decimal d = parm[0]->data()->getDecimalVal(row, isNull);
if (parm[0]->data()->resultType().isWideDecimalType())
d.s128Value = (d.s128Value < 0) ? -d.s128Value : d.s128Value;
else
d.value = llabs(d.value);
return d;
if (parm[0]->data()->resultType().isWideDecimalType())
d.s128Value = (d.s128Value < 0) ? -d.s128Value : d.s128Value;
else
d.value = llabs(d.value);
return d;
}
double Func_abs::getDoubleVal(Row& row,
FunctionParm& parm,
bool& isNull,
CalpontSystemCatalog::ColType&)
double Func_abs::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull, CalpontSystemCatalog::ColType&)
{
return fabs(parm[0]->data()->getDoubleVal(row, isNull));
return fabs(parm[0]->data()->getDoubleVal(row, isNull));
}
long double Func_abs::getLongDoubleVal(Row& row,
FunctionParm& parm,
bool& isNull,
CalpontSystemCatalog::ColType&)
long double Func_abs::getLongDoubleVal(Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType&)
{
return fabsl(parm[0]->data()->getLongDoubleVal(row, isNull));
return fabsl(parm[0]->data()->getLongDoubleVal(row, isNull));
}
} // namespace funcexp
} // namespace funcexp
// vim:ts=4 sw=4: