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

@ -119,7 +119,8 @@ AggregateColumn::AggregateColumn( const AggregateColumn& rhs, const uint32_t ses
fTableAlias(rhs.tableAlias()),
fAsc(rhs.asc()),
fData(rhs.data()),
fConstCol(rhs.fConstCol)
fConstCol(rhs.fConstCol),
fTimeZone(rhs.timeZone())
{
fAlias = rhs.alias();
fAggParms = rhs.fAggParms;
@ -186,6 +187,7 @@ void AggregateColumn::serialize(messageqcpp::ByteStream& b) const
(*rcit)->serialize(b);
b << fData;
b << fTimeZone;
//b << fAlias;
b << fTableAlias;
b << static_cast<const ByteStream::doublebyte>(fAsc);
@ -238,6 +240,7 @@ void AggregateColumn::unserialize(messageqcpp::ByteStream& b)
}
b >> fData;
b >> fTimeZone;
//b >> fAlias;
b >> fTableAlias;
b >> reinterpret_cast< ByteStream::doublebyte&>(fAsc);
@ -292,6 +295,9 @@ bool AggregateColumn::operator==(const AggregateColumn& t) const
*(fConstCol.get()) != t.fConstCol.get()))
return false;
if (fTimeZone != t.fTimeZone)
return false;
return true;
}
@ -343,6 +349,14 @@ void AggregateColumn::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))
isNull = true;