1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +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

@ -116,6 +116,7 @@ string Func_timediff::getStrVal(rowgroup::Row& row,
isDate1 = true;
break;
case execplan::CalpontSystemCatalog::TIME:
case execplan::CalpontSystemCatalog::DATETIME:
val1 = parm[0]->data()->getDatetimeIntVal(row, isNull);
break;
@ -157,6 +158,7 @@ string Func_timediff::getStrVal(rowgroup::Row& row,
isDate2 = true;
break;
case execplan::CalpontSystemCatalog::TIME:
case execplan::CalpontSystemCatalog::DATETIME:
val2 = parm[1]->data()->getDatetimeIntVal(row, isNull);
break;
@ -213,6 +215,14 @@ int64_t Func_timediff::getDatetimeIntVal(rowgroup::Row& row,
return dataconvert::DataConvert::datetimeToInt(getStrVal(row, parm, isNull, ct));
}
int64_t Func_timediff::getTimeIntVal(rowgroup::Row& row,
FunctionParm& parm,
bool& isNull,
CalpontSystemCatalog::ColType& ct)
{
return dataconvert::DataConvert::timeToInt(getStrVal(row, parm, isNull, ct));
}
int64_t Func_timediff::getIntVal(rowgroup::Row& row,
FunctionParm& parm,
bool& isNull,