1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Revert "Merge pull request #2022 from mariadb-corporation/bar-develop-MCOL-4791"

This reverts commit 4016e25e5b, reversing
changes made to 85435f6b1e.
This commit is contained in:
Gagan Goel
2021-07-13 11:06:56 +00:00
parent 90e5218c71
commit b3a560300c
22 changed files with 318 additions and 227 deletions

View File

@ -108,44 +108,6 @@ namespace
namespace execplan
{
ColumnCommandDataType::ColumnCommandDataType(const CalpontSystemCatalog::DataType &rhs,
bool fudge)
:DataType(rhs),
mIsDict(false)
{
if (!fudge)
return;
//If this is a dictionary column, fudge the numbers...
if (colDataType == CalpontSystemCatalog::VARCHAR )
colWidth++;
//If this is a dictionary column, fudge the numbers...
if ((colDataType == CalpontSystemCatalog::VARBINARY)
|| (colDataType == CalpontSystemCatalog::BLOB)
|| (colDataType == CalpontSystemCatalog::TEXT))
{
colWidth = 8;
mIsDict = true;
}
// TODO MCOL-641
else if (colWidth > 8
&& colDataType != CalpontSystemCatalog::DECIMAL
&& colDataType != CalpontSystemCatalog::UDECIMAL)
{
colWidth = 8;
mIsDict = true;
}
//Round colWidth up
if (colWidth == 3)
colWidth = 4;
else if (colWidth == 5 || colWidth == 6 || colWidth == 7)
colWidth = 8;
}
const SOP opeq(new Operator("="));
const string colDataTypeToString(CalpontSystemCatalog::ColDataType cdt)
@ -6128,34 +6090,43 @@ CalpontSystemCatalog::ColType::ColType() :
constraintType(NO_CONSTRAINT),
defaultValue(""),
colPosition(-1),
compressionType(NO_COMPRESSION),
columnOID(0),
autoincrement(0),
nextvalue(0)
nextvalue(0),
cs(NULL)
{
charsetNumber = default_charset_info->number;
}
CalpontSystemCatalog::ColType::ColType(const ColType& rhs)
:DataType(rhs)
:TypeHolderStd(rhs)
{
constraintType = rhs.constraintType;
ddn = rhs.ddn;
defaultValue = rhs.defaultValue;
colPosition = rhs.colPosition;
compressionType = rhs.compressionType;
columnOID = rhs.columnOID;
autoincrement = rhs.autoincrement;
nextvalue = rhs.nextvalue;
charsetNumber = rhs.charsetNumber;
cs = rhs.cs;
}
CalpontSystemCatalog::ColType& CalpontSystemCatalog::ColType::operator=(const ColType& rhs)
{
DataType::operator=(rhs);
TypeHolderStd::operator=(rhs);
constraintType = rhs.constraintType;
ddn = rhs.ddn;
defaultValue = rhs.defaultValue;
colPosition = rhs.colPosition;
compressionType = rhs.compressionType;
columnOID = rhs.columnOID;
autoincrement = rhs.autoincrement;
nextvalue = rhs.nextvalue;
charsetNumber = rhs.charsetNumber;
cs = rhs.cs;
return *this;
}
@ -6163,11 +6134,11 @@ CalpontSystemCatalog::ColType& CalpontSystemCatalog::ColType::operator=(const Co
CHARSET_INFO* CalpontSystemCatalog::DataType::getCharset()
CHARSET_INFO* CalpontSystemCatalog::ColType::getCharset()
{
if (!mCharset)
mCharset= & datatypes::Charset(charsetNumber).getCharset();
return mCharset;
if (!cs)
cs= & datatypes::Charset(charsetNumber).getCharset();
return cs;
}
const string CalpontSystemCatalog::ColType::toString() const