You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2026-01-06 08:21:10 +03:00
MCOL-265 Add support for TIMESTAMP data type
This commit is contained in:
@@ -76,7 +76,8 @@ const long long infinidb_precision[19] =
|
||||
//------------------------------------------------------------------------------
|
||||
XMLJob::XMLJob( ) : fDebugLevel( DEBUG_0 ),
|
||||
fDeleteTempFile(false),
|
||||
fValidateColList(true)
|
||||
fValidateColList(true),
|
||||
fTimeZone("SYSTEM")
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1128,6 +1129,22 @@ void XMLJob::fillInXMLDataNotNullDefault(
|
||||
break;
|
||||
}
|
||||
|
||||
case execplan::CalpontSystemCatalog::TIMESTAMP:
|
||||
{
|
||||
int convertStatus;
|
||||
int64_t dt =
|
||||
dataconvert::DataConvert::convertColumnTimestamp(
|
||||
col_defaultValue.c_str(),
|
||||
dataconvert::CALPONTDATETIME_ENUM, convertStatus,
|
||||
col_defaultValue.length(), fTimeZone );
|
||||
|
||||
if (convertStatus != 0)
|
||||
bDefaultConvertError = true;
|
||||
|
||||
col.fDefaultInt = dt;
|
||||
break;
|
||||
}
|
||||
|
||||
case execplan::CalpontSystemCatalog::TIME:
|
||||
{
|
||||
int convertStatus;
|
||||
|
||||
@@ -123,6 +123,14 @@ public:
|
||||
*/
|
||||
EXPORT bool processNode( xmlNode* pParentNode );
|
||||
|
||||
/**
|
||||
* @brief Set timezone
|
||||
*/
|
||||
void setTimeZone(const std::string& timeZone)
|
||||
{
|
||||
fTimeZone = timeZone;
|
||||
}
|
||||
|
||||
private:
|
||||
void setJobData( xmlNode* pNode,
|
||||
const xmlTag tag,
|
||||
@@ -154,6 +162,7 @@ private:
|
||||
JobColList fDefaultColumns; // temporary list of default cols
|
||||
// for table node being processed
|
||||
bool fValidateColList; // Validate all cols have XML tag
|
||||
std::string fTimeZone; // Timezone used for TIMESTAMP datatype
|
||||
};
|
||||
|
||||
} //end of namespace
|
||||
|
||||
Reference in New Issue
Block a user