1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +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

@ -61,6 +61,9 @@ bool boolVal(SPTP& parm, Row& row)
case CalpontSystemCatalog::UDOUBLE:
ret = (parm->data()->getDoubleVal(row, isNull) != 0);
case CalpontSystemCatalog::LONGDOUBLE:
ret = (parm->data()->getLongDoubleVal(row, isNull) != 0);
case CalpontSystemCatalog::DECIMAL:
case CalpontSystemCatalog::UDECIMAL:
ret = (parm->data()->getDecimalVal(row, isNull).value != 0);
@ -188,6 +191,21 @@ double Func_if::getDoubleVal(Row& row,
}
}
long double Func_if::getLongDoubleVal(Row& row,
FunctionParm& parm,
bool& isNull,
CalpontSystemCatalog::ColType&)
{
if (boolVal(parm[0], row))
{
return parm[1]->data()->getLongDoubleVal(row, isNull);
}
else
{
return parm[2]->data()->getLongDoubleVal(row, isNull);
}
}
int32_t Func_if::getDateIntVal(Row& row,
FunctionParm& parm,