1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +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

@@ -87,6 +87,7 @@ void GroupConcatInfo::prepGroupConcat(JobInfo& jobInfo)
groupConcat->fSize = gcc->resultType().colWidth;
groupConcat->fRm = jobInfo.rm;
groupConcat->fSessionMemLimit = jobInfo.umMemLimit;
groupConcat->fTimeZone = jobInfo.timeZone;
int key = -1;
const vector<SRCP>& cols = rcp->columnVec();
@@ -396,6 +397,7 @@ void GroupConcator::initialize(const rowgroup::SP_GroupConcat& gcc)
// too high(3MB) to allocate it for every instance.
fGroupConcatLen = gcc->fSize;
fCurrentLength -= strlen(gcc->fSeparator.c_str());
fTimeZone = gcc->fTimeZone;
fConstCols = gcc->fConstCols;
fConstantLen = strlen(gcc->fSeparator.c_str());
@@ -510,6 +512,12 @@ void GroupConcator::outputRow(std::ostringstream& oss, const rowgroup::Row& row)
break;
}
case CalpontSystemCatalog::TIMESTAMP:
{
oss << DataConvert::timestampToString(row.getUintField(*i), fTimeZone);
break;
}
case CalpontSystemCatalog::TIME:
{
oss << DataConvert::timeToString(row.getUintField(*i));
@@ -643,6 +651,7 @@ int64_t GroupConcator::lengthEstimate(const rowgroup::Row& row)
}
case CalpontSystemCatalog::DATETIME:
case CalpontSystemCatalog::TIMESTAMP:
{
fieldLen = 19; // YYYY-MM-DD HH24:MI:SS
// Decimal point and milliseconds