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
MCOL-392 Fix case
This commit is contained in:
@ -146,7 +146,7 @@ int64_t addTime(Time& dt1, Time& dt2)
|
|||||||
dt.second = 0;
|
dt.second = 0;
|
||||||
dt.msecond = 0;
|
dt.msecond = 0;
|
||||||
|
|
||||||
int64_t hour, min, sec, msec, tmp;
|
int64_t min, sec, msec, tmp;
|
||||||
msec = (signed)(dt1.msecond + dt2.msecond);
|
msec = (signed)(dt1.msecond + dt2.msecond);
|
||||||
dt.msecond = tmp = msec % 1000000;
|
dt.msecond = tmp = msec % 1000000;
|
||||||
|
|
||||||
|
@ -65,8 +65,6 @@ inline uint64_t simple_case_cmp(Row& row,
|
|||||||
case execplan::CalpontSystemCatalog::INT:
|
case execplan::CalpontSystemCatalog::INT:
|
||||||
case execplan::CalpontSystemCatalog::BIGINT:
|
case execplan::CalpontSystemCatalog::BIGINT:
|
||||||
case execplan::CalpontSystemCatalog::DATE:
|
case execplan::CalpontSystemCatalog::DATE:
|
||||||
case execplan::CalpontSystemCatalog::DATETIME:
|
|
||||||
case execplan::CalpontSystemCatalog::TIME:
|
|
||||||
{
|
{
|
||||||
int64_t ev = parm[n]->data()->getIntVal(row, isNull);
|
int64_t ev = parm[n]->data()->getIntVal(row, isNull);
|
||||||
|
|
||||||
@ -87,6 +85,49 @@ inline uint64_t simple_case_cmp(Row& row,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case execplan::CalpontSystemCatalog::DATETIME:
|
||||||
|
{
|
||||||
|
int64_t ev = parm[n]->data()->getDatetimeIntVal(row, isNull);
|
||||||
|
|
||||||
|
if (isNull)
|
||||||
|
break;
|
||||||
|
|
||||||
|
for (i = 1; i <= whereCount; i++)
|
||||||
|
{
|
||||||
|
if (ev == parm[i]->data()->getDatetimeIntVal(row, isNull) && !isNull)
|
||||||
|
{
|
||||||
|
foundIt = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
isNull = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case execplan::CalpontSystemCatalog::TIME:
|
||||||
|
{
|
||||||
|
int64_t ev = parm[n]->data()->getTimeIntVal(row, isNull);
|
||||||
|
|
||||||
|
if (isNull)
|
||||||
|
break;
|
||||||
|
|
||||||
|
for (i = 1; i <= whereCount; i++)
|
||||||
|
{
|
||||||
|
if (ev == parm[i]->data()->getTimeIntVal(row, isNull) && !isNull)
|
||||||
|
{
|
||||||
|
foundIt = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
isNull = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
case execplan::CalpontSystemCatalog::UBIGINT:
|
case execplan::CalpontSystemCatalog::UBIGINT:
|
||||||
case execplan::CalpontSystemCatalog::UINT:
|
case execplan::CalpontSystemCatalog::UINT:
|
||||||
case execplan::CalpontSystemCatalog::UMEDINT:
|
case execplan::CalpontSystemCatalog::UMEDINT:
|
||||||
@ -514,7 +555,7 @@ int64_t Func_simple_case::getTimeIntVal(rowgroup::Row& row,
|
|||||||
if (isNull)
|
if (isNull)
|
||||||
return joblist::TIMENULL;
|
return joblist::TIMENULL;
|
||||||
|
|
||||||
return parm[i + 1]->data()->getTimeIntVal(row, isNull);
|
return parm[i]->data()->getTimeIntVal(row, isNull);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -653,7 +694,7 @@ int64_t Func_searched_case::getTimeIntVal(rowgroup::Row& row,
|
|||||||
if (isNull)
|
if (isNull)
|
||||||
return joblist::TIMENULL;
|
return joblist::TIMENULL;
|
||||||
|
|
||||||
return parm[i + 1]->data()->getTimeIntVal(row, isNull);
|
return parm[i]->data()->getTimeIntVal(row, isNull);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace funcexp
|
} // namespace funcexp
|
||||||
|
Reference in New Issue
Block a user