You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-4174 Review/refactor frontend/connector code
This commit is contained in:
committed by
Roman Nozdrin
parent
68244ab957
commit
129d5b5a0f
@ -31,6 +31,7 @@ using namespace std;
|
||||
|
||||
#include "messagequeue.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "dataconvert.h"
|
||||
#include "ddlpkg.h"
|
||||
#include "expressionparser.h"
|
||||
#include "calpontselectexecutionplan.h"
|
||||
@ -6091,13 +6092,9 @@ void CalpontSystemCatalog::checkSysCatVer()
|
||||
}
|
||||
|
||||
CalpontSystemCatalog::ColType::ColType() :
|
||||
colWidth(0),
|
||||
constraintType(NO_CONSTRAINT),
|
||||
colDataType(MEDINT),
|
||||
defaultValue(""),
|
||||
colPosition(-1),
|
||||
scale(0),
|
||||
precision(-1),
|
||||
compressionType(NO_COMPRESSION),
|
||||
columnOID(0),
|
||||
autoincrement(0),
|
||||
@ -6108,15 +6105,12 @@ CalpontSystemCatalog::ColType::ColType() :
|
||||
}
|
||||
|
||||
CalpontSystemCatalog::ColType::ColType(const ColType& rhs)
|
||||
:TypeHolderStd(rhs)
|
||||
{
|
||||
colWidth = rhs.colWidth;
|
||||
constraintType = rhs.constraintType;
|
||||
colDataType = rhs.colDataType;
|
||||
ddn = rhs.ddn;
|
||||
defaultValue = rhs.defaultValue;
|
||||
colPosition = rhs.colPosition;
|
||||
scale = rhs.scale;
|
||||
precision = rhs.precision;
|
||||
compressionType = rhs.compressionType;
|
||||
columnOID = rhs.columnOID;
|
||||
autoincrement = rhs.autoincrement;
|
||||
@ -6125,26 +6119,6 @@ CalpontSystemCatalog::ColType::ColType(const ColType& rhs)
|
||||
cs = rhs.cs;
|
||||
}
|
||||
|
||||
CalpontSystemCatalog::ColType& CalpontSystemCatalog::ColType::operator=(const ColType& rhs)
|
||||
{
|
||||
colWidth = rhs.colWidth;
|
||||
constraintType = rhs.constraintType;
|
||||
colDataType = rhs.colDataType;
|
||||
ddn = rhs.ddn;
|
||||
defaultValue = rhs.defaultValue;
|
||||
colPosition = rhs.colPosition;
|
||||
scale = rhs.scale;
|
||||
precision = rhs.precision;
|
||||
compressionType = rhs.compressionType;
|
||||
columnOID = rhs.columnOID;
|
||||
autoincrement = rhs.autoincrement;
|
||||
nextvalue = rhs.nextvalue;
|
||||
charsetNumber = rhs.charsetNumber;
|
||||
cs = rhs.cs;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
CHARSET_INFO* CalpontSystemCatalog::ColType::getCharset()
|
||||
{
|
||||
if (!cs)
|
||||
@ -6170,6 +6144,31 @@ const string CalpontSystemCatalog::ColType::toString() const
|
||||
return output.str();
|
||||
}
|
||||
|
||||
|
||||
boost::any
|
||||
CalpontSystemCatalog::ColType::convertColumnData(const std::string& dataOrig,
|
||||
bool& bSaturate,
|
||||
const std::string& timeZone,
|
||||
bool nulFlag,
|
||||
bool noRoundup,
|
||||
bool isUpdate) const
|
||||
{
|
||||
return dataconvert::DataConvert::convertColumnData(colDataType, *this,
|
||||
dataOrig, bSaturate, timeZone,
|
||||
nulFlag, noRoundup, isUpdate);
|
||||
}
|
||||
|
||||
|
||||
CalpontSystemCatalog::ColType CalpontSystemCatalog::ColType::convertUnionColType(vector<CalpontSystemCatalog::ColType>& types)
|
||||
{
|
||||
idbassert(types.size());
|
||||
CalpontSystemCatalog::ColType unionedType = types[0];
|
||||
for (uint64_t i = 1; i < types.size(); i++)
|
||||
dataconvert::DataConvert::joinColTypeForUnion(unionedType, types[i]);
|
||||
return unionedType;
|
||||
}
|
||||
|
||||
|
||||
//format a session id that includes the module id
|
||||
//we want the top bit clear to use as a syscat flag, then we want 7 bits of module id, then 24 bits of thread id
|
||||
/*static*/
|
||||
|
Reference in New Issue
Block a user