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

@ -507,6 +507,12 @@ void GroupConcator::outputRow(std::ostringstream& oss, const rowgroup::Row& row)
break;
}
case CalpontSystemCatalog::TIME:
{
oss << DataConvert::timeToString(row.getUintField(*i));
break;
}
default:
{
break;
@ -640,6 +646,24 @@ int64_t GroupConcator::lengthEstimate(const rowgroup::Row& row)
case CalpontSystemCatalog::DATETIME:
{
fieldLen = 19; // YYYY-MM-DD HH24:MI:SS
// Decimal point and milliseconds
uint64_t colPrecision = row.getPrecision(*i);
if (colPrecision > 0 && colPrecision < 7)
{
fieldLen += colPrecision + 1;
}
break;
}
case CalpontSystemCatalog::TIME:
{
fieldLen = 10; // -HHH:MI:SS
// Decimal point and milliseconds
uint64_t colPrecision = row.getPrecision(*i);
if (colPrecision > 0 && colPrecision < 7)
{
fieldLen += colPrecision + 1;
}
break;
}