1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +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

@ -125,6 +125,9 @@ string name(CalpontSystemCatalog::ColType& ct)
case CalpontSystemCatalog::DATETIME:
return "DATETIME";
case CalpontSystemCatalog::TIME:
return "TIME";
case CalpontSystemCatalog::DECIMAL:
return "DECIMAL";
@ -201,6 +204,7 @@ bool CP_type(CalpontSystemCatalog::ColType& ct)
ct.colDataType == CalpontSystemCatalog::BIGINT ||
ct.colDataType == CalpontSystemCatalog::DATE ||
ct.colDataType == CalpontSystemCatalog::DATETIME ||
ct.colDataType == CalpontSystemCatalog::TIME ||
ct.colDataType == CalpontSystemCatalog::DECIMAL ||
ct.colDataType == CalpontSystemCatalog::UTINYINT ||
ct.colDataType == CalpontSystemCatalog::USMALLINT ||
@ -261,6 +265,9 @@ const string format(int64_t v, CalpontSystemCatalog::ColType& ct)
oss << DataConvert::datetimeToString(v);
break;
case CalpontSystemCatalog::TIME:
oss << DataConvert::timeToString(v);
case CalpontSystemCatalog::CHAR:
case CalpontSystemCatalog::VARCHAR:
{
@ -387,6 +394,10 @@ const int64_t IDB_format(char* str, CalpontSystemCatalog::ColType& ct, uint8_t&
v = boost::any_cast<uint64_t>(anyVal);
break;
case CalpontSystemCatalog::TIME:
v = boost::any_cast<int64_t>(anyVal);
break;
case CalpontSystemCatalog::DECIMAL:
case CalpontSystemCatalog::UDECIMAL:
if (ct.colWidth == execplan::CalpontSystemCatalog::ONE_BYTE)