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
Reformat all code to coding standard
This commit is contained in:
@ -40,128 +40,152 @@ namespace funcexp
|
||||
{
|
||||
CalpontSystemCatalog::ColType Func_coalesce::operationType( FunctionParm& fp, CalpontSystemCatalog::ColType& resultType )
|
||||
{
|
||||
return resultType;
|
||||
return resultType;
|
||||
}
|
||||
|
||||
int64_t Func_coalesce::getIntVal(rowgroup::Row& row,
|
||||
FunctionParm& parm,
|
||||
bool& isNull,
|
||||
CalpontSystemCatalog::ColType& op_ct)
|
||||
FunctionParm& parm,
|
||||
bool& isNull,
|
||||
CalpontSystemCatalog::ColType& op_ct)
|
||||
{
|
||||
int64_t val = 0;
|
||||
for (uint32_t i = 0; i < parm.size(); i++)
|
||||
{
|
||||
val = parm[i]->data()->getIntVal(row, isNull);
|
||||
if (isNull)
|
||||
{
|
||||
isNull = false;
|
||||
continue;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
isNull = true;
|
||||
return val;
|
||||
int64_t val = 0;
|
||||
|
||||
for (uint32_t i = 0; i < parm.size(); i++)
|
||||
{
|
||||
val = parm[i]->data()->getIntVal(row, isNull);
|
||||
|
||||
if (isNull)
|
||||
{
|
||||
isNull = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
isNull = true;
|
||||
return val;
|
||||
}
|
||||
|
||||
string Func_coalesce::getStrVal(rowgroup::Row& row,
|
||||
FunctionParm& parm,
|
||||
bool& isNull,
|
||||
CalpontSystemCatalog::ColType& ct)
|
||||
FunctionParm& parm,
|
||||
bool& isNull,
|
||||
CalpontSystemCatalog::ColType& ct)
|
||||
{
|
||||
string val;
|
||||
for (uint32_t i = 0; i < parm.size(); i++)
|
||||
{
|
||||
val = parm[i]->data()->getStrVal(row, isNull);
|
||||
if (isNull)
|
||||
{
|
||||
isNull = false;
|
||||
continue;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
isNull = true;
|
||||
return "";
|
||||
string val;
|
||||
|
||||
for (uint32_t i = 0; i < parm.size(); i++)
|
||||
{
|
||||
val = parm[i]->data()->getStrVal(row, isNull);
|
||||
|
||||
if (isNull)
|
||||
{
|
||||
isNull = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
isNull = true;
|
||||
return "";
|
||||
}
|
||||
|
||||
int32_t Func_coalesce::getDateIntVal(rowgroup::Row& row,
|
||||
FunctionParm& parm,
|
||||
bool& isNull,
|
||||
CalpontSystemCatalog::ColType& ct)
|
||||
FunctionParm& parm,
|
||||
bool& isNull,
|
||||
CalpontSystemCatalog::ColType& ct)
|
||||
{
|
||||
int64_t val = 0;
|
||||
for (uint32_t i = 0; i < parm.size(); i++)
|
||||
{
|
||||
val = parm[i]->data()->getDateIntVal(row, isNull);
|
||||
if (isNull)
|
||||
{
|
||||
isNull = false;
|
||||
continue;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
isNull = true;
|
||||
return val;
|
||||
int64_t val = 0;
|
||||
|
||||
for (uint32_t i = 0; i < parm.size(); i++)
|
||||
{
|
||||
val = parm[i]->data()->getDateIntVal(row, isNull);
|
||||
|
||||
if (isNull)
|
||||
{
|
||||
isNull = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
isNull = true;
|
||||
return val;
|
||||
}
|
||||
|
||||
int64_t Func_coalesce::getDatetimeIntVal(rowgroup::Row& row,
|
||||
FunctionParm& parm,
|
||||
bool& isNull,
|
||||
CalpontSystemCatalog::ColType& ct)
|
||||
FunctionParm& parm,
|
||||
bool& isNull,
|
||||
CalpontSystemCatalog::ColType& ct)
|
||||
{
|
||||
int64_t val = 0;
|
||||
for (uint32_t i = 0; i < parm.size(); i++)
|
||||
{
|
||||
val = parm[i]->data()->getDatetimeIntVal(row, isNull);
|
||||
if (isNull)
|
||||
{
|
||||
isNull = false;
|
||||
continue;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
isNull = true;
|
||||
return val;
|
||||
int64_t val = 0;
|
||||
|
||||
for (uint32_t i = 0; i < parm.size(); i++)
|
||||
{
|
||||
val = parm[i]->data()->getDatetimeIntVal(row, isNull);
|
||||
|
||||
if (isNull)
|
||||
{
|
||||
isNull = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
isNull = true;
|
||||
return val;
|
||||
}
|
||||
|
||||
double Func_coalesce::getDoubleVal(rowgroup::Row& row,
|
||||
FunctionParm& parm,
|
||||
bool& isNull,
|
||||
execplan::CalpontSystemCatalog::ColType& ct)
|
||||
FunctionParm& parm,
|
||||
bool& isNull,
|
||||
execplan::CalpontSystemCatalog::ColType& ct)
|
||||
{
|
||||
double d = 0.0;
|
||||
for (uint32_t i = 0; i < parm.size(); i++)
|
||||
{
|
||||
d = parm[i]->data()->getDoubleVal(row, isNull);
|
||||
if (isNull)
|
||||
{
|
||||
isNull = false;
|
||||
continue;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
isNull = true;
|
||||
return d;
|
||||
double d = 0.0;
|
||||
|
||||
for (uint32_t i = 0; i < parm.size(); i++)
|
||||
{
|
||||
d = parm[i]->data()->getDoubleVal(row, isNull);
|
||||
|
||||
if (isNull)
|
||||
{
|
||||
isNull = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
isNull = true;
|
||||
return d;
|
||||
}
|
||||
|
||||
|
||||
execplan::IDB_Decimal Func_coalesce::getDecimalVal(rowgroup::Row& row,
|
||||
FunctionParm& parm,
|
||||
bool& isNull,
|
||||
execplan::CalpontSystemCatalog::ColType& ct)
|
||||
FunctionParm& parm,
|
||||
bool& isNull,
|
||||
execplan::CalpontSystemCatalog::ColType& ct)
|
||||
{
|
||||
IDB_Decimal d;
|
||||
for (uint32_t i = 0; i < parm.size(); i++)
|
||||
{
|
||||
d = parm[i]->data()->getDecimalVal(row, isNull);
|
||||
if (isNull)
|
||||
{
|
||||
isNull = false;
|
||||
continue;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
isNull = true;
|
||||
return d;
|
||||
IDB_Decimal d;
|
||||
|
||||
for (uint32_t i = 0; i < parm.size(); i++)
|
||||
{
|
||||
d = parm[i]->data()->getDecimalVal(row, isNull);
|
||||
|
||||
if (isNull)
|
||||
{
|
||||
isNull = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
isNull = true;
|
||||
return d;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user