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

MCOL-265 Add support for TIMESTAMP data type

This commit is contained in:
Gagan Goel
2019-03-17 14:14:03 -04:00
parent 8a7ccd7d93
commit e89d1ac3cf
167 changed files with 4346 additions and 250 deletions

View File

@ -158,6 +158,19 @@ int64_t Func_floor::getIntVal(Row& row,
}
break;
case execplan::CalpontSystemCatalog::TIMESTAMP:
{
string str =
DataConvert::timestampToString1(parm[0]->data()->getTimestampIntVal(row, isNull), fTimeZone);
// strip off micro seconds
str = str.substr(0, 14);
if (!isNull)
ret = atoll(str.c_str());
}
break;
case execplan::CalpontSystemCatalog::TIME:
{
string str =
@ -262,6 +275,19 @@ uint64_t Func_floor::getUintVal(Row& row,
}
break;
case execplan::CalpontSystemCatalog::TIMESTAMP:
{
string str =
DataConvert::timestampToString1(parm[0]->data()->getTimestampIntVal(row, isNull), fTimeZone);
// strip off micro seconds
str = str.substr(0, 14);
if (!isNull)
ret = strtoull(str.c_str(), NULL, 10);
}
break;
case execplan::CalpontSystemCatalog::TIME:
{
string str =