You've already forked mariadb-columnstore-engine
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:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user