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

@ -235,7 +235,8 @@ WindowFunctionColumn::WindowFunctionColumn( const WindowFunctionColumn& rhs, con
fFunctionParms(rhs.functionParms()),
fPartitions (rhs.partitions()),
fOrderBy (rhs.orderBy()),
udafContext(rhs.getUDAFContext())
udafContext(rhs.getUDAFContext()),
fTimeZone(rhs.timeZone())
{}
const string WindowFunctionColumn::toString() const
@ -288,6 +289,7 @@ void WindowFunctionColumn::serialize(messageqcpp::ByteStream& b) const
fOrderBy.serialize(b);
udafContext.serialize(b);
b << fTimeZone;
}
void WindowFunctionColumn::unserialize(messageqcpp::ByteStream& b)
@ -319,6 +321,7 @@ void WindowFunctionColumn::unserialize(messageqcpp::ByteStream& b)
fOrderBy.unserialize(b);
udafContext.unserialize(b);
b >> fTimeZone;
}
void WindowFunctionColumn::addToPartition(vector<SRCP>& groupByList)
@ -413,6 +416,16 @@ void WindowFunctionColumn::evaluate(Row& row, bool& isNull)
break;
}
case CalpontSystemCatalog::TIMESTAMP:
{
if (row.equals<8>(TIMESTAMPNULL, fInputIndex))
isNull = true;
else
fResult.intVal = row.getUintField<8>(fInputIndex);
break;
}
case CalpontSystemCatalog::TIME:
{
if (row.equals<8>(TIMENULL, fInputIndex))