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

MCOL-392 Add initial TIME datatype support

This commit is contained in:
Andrew Hutchings
2018-04-23 19:20:31 +01:00
parent b584a7f555
commit 3c1ebd8b94
109 changed files with 2241 additions and 47 deletions

View File

@ -66,6 +66,7 @@ inline uint64_t simple_case_cmp(Row& row,
case execplan::CalpontSystemCatalog::BIGINT:
case execplan::CalpontSystemCatalog::DATE:
case execplan::CalpontSystemCatalog::DATETIME:
case execplan::CalpontSystemCatalog::TIME:
{
int64_t ev = parm[n]->data()->getIntVal(row, isNull);
@ -503,6 +504,19 @@ int64_t Func_simple_case::getDatetimeIntVal(rowgroup::Row& row,
}
int64_t Func_simple_case::getTimeIntVal(rowgroup::Row& row,
FunctionParm& parm,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
{
uint64_t i = simple_case_cmp(row, parm, isNull, op_ct);
if (isNull)
return joblist::TIMENULL;
return parm[i + 1]->data()->getTimeIntVal(row, isNull);
}
// searched CASE:
// SELECT CASE
@ -629,5 +643,18 @@ int64_t Func_searched_case::getDatetimeIntVal(rowgroup::Row& row,
}
int64_t Func_searched_case::getTimeIntVal(rowgroup::Row& row,
FunctionParm& parm,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
{
uint64_t i = simple_case_cmp(row, parm, isNull, op_ct);
if (isNull)
return joblist::TIMENULL;
return parm[i + 1]->data()->getTimeIntVal(row, isNull);
}
} // namespace funcexp
// vim:ts=4 sw=4: