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

@ -579,6 +579,109 @@ double Func_nullif::getDoubleVal(rowgroup::Row& row,
break;
}
case execplan::CalpontSystemCatalog::LONGDOUBLE:
{
exp2 = (double)parm[1]->data()->getLongDoubleVal(row, isNull);
if (isNull)
{
isNull = false;
return exp1;
}
break;
}
case execplan::CalpontSystemCatalog::DATE:
{
exp2 = parm[1]->data()->getDateIntVal(row, isNull);
if (isNull)
{
isNull = false;
return exp1;
}
break;
}
break;
case execplan::CalpontSystemCatalog::TIME:
case execplan::CalpontSystemCatalog::DATETIME:
{
exp2 = parm[1]->data()->getDatetimeIntVal(row, isNull);
if (isNull)
{
isNull = false;
return exp1;
}
break;
}
default:
{
isNull = true;
}
}
if ( exp1 == exp2 )
{
isNull = true;
return 0;
}
return exp1;
}
long double Func_nullif::getLongDoubleVal(rowgroup::Row& row,
FunctionParm& parm,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
{
long double exp1 = parm[0]->data()->getLongDoubleVal(row, isNull);
long double exp2 = 0;
switch (parm[1]->data()->resultType().colDataType)
{
case execplan::CalpontSystemCatalog::BIGINT:
case execplan::CalpontSystemCatalog::INT:
case execplan::CalpontSystemCatalog::MEDINT:
case execplan::CalpontSystemCatalog::TINYINT:
case execplan::CalpontSystemCatalog::SMALLINT:
case execplan::CalpontSystemCatalog::DOUBLE:
case execplan::CalpontSystemCatalog::FLOAT:
case execplan::CalpontSystemCatalog::DECIMAL:
case execplan::CalpontSystemCatalog::VARCHAR:
case execplan::CalpontSystemCatalog::CHAR:
case execplan::CalpontSystemCatalog::TEXT:
{
exp2 = parm[1]->data()->getDoubleVal(row, isNull);
if (isNull)
{
isNull = false;
return exp1;
}
break;
}
case execplan::CalpontSystemCatalog::LONGDOUBLE:
{
exp2 = parm[1]->data()->getLongDoubleVal(row, isNull);
if (isNull)
{
isNull = false;
return exp1;
}
break;
}
case execplan::CalpontSystemCatalog::DATE:
{
exp2 = parm[1]->data()->getDateIntVal(row, isNull);