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