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-265 Add support for TIMESTAMP data type
This commit is contained in:
@ -112,6 +112,20 @@ public:
|
||||
{
|
||||
fConstval = constval;
|
||||
}
|
||||
/**
|
||||
* accessor
|
||||
*/
|
||||
inline const std::string& timeZone() const
|
||||
{
|
||||
return fTimeZone;
|
||||
}
|
||||
/**
|
||||
* mutator
|
||||
*/
|
||||
inline void timeZone(const std::string& timeZone)
|
||||
{
|
||||
fTimeZone = timeZone;
|
||||
}
|
||||
/**
|
||||
* accessor
|
||||
*/
|
||||
@ -192,6 +206,7 @@ private:
|
||||
std::string fConstval;
|
||||
int fType;
|
||||
std::string fData;
|
||||
std::string fTimeZone;
|
||||
|
||||
/***********************************************************
|
||||
* F&E framework *
|
||||
@ -315,6 +330,21 @@ public:
|
||||
|
||||
return fResult.intVal;
|
||||
}
|
||||
/**
|
||||
* F&E
|
||||
*/
|
||||
virtual int64_t getTimestampIntVal(rowgroup::Row& row, bool& isNull)
|
||||
{
|
||||
isNull = isNull || (fType == NULLDATA);
|
||||
|
||||
if (!fResult.valueConverted)
|
||||
{
|
||||
fResult.intVal = dataconvert::DataConvert::stringToTimestamp(fResult.strVal, fTimeZone);
|
||||
fResult.valueConverted = true;
|
||||
}
|
||||
|
||||
return fResult.intVal;
|
||||
}
|
||||
/**
|
||||
* F&E
|
||||
*/
|
||||
|
Reference in New Issue
Block a user