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-3536 collation
This commit is contained in:
@ -505,8 +505,8 @@ Row::Row() : data(NULL), strings(NULL), userDataStore(NULL) { }
|
||||
|
||||
Row::Row(const Row& r) : columnCount(r.columnCount), baseRid(r.baseRid),
|
||||
oldOffsets(r.oldOffsets), stOffsets(r.stOffsets),
|
||||
offsets(r.offsets), colWidths(r.colWidths), types(r.types), data(r.data),
|
||||
scale(r.scale), precision(r.precision), strings(r.strings),
|
||||
offsets(r.offsets), colWidths(r.colWidths), types(r.types), charsetNumbers(r.charsetNumbers),
|
||||
data(r.data), scale(r.scale), precision(r.precision), strings(r.strings),
|
||||
useStringTable(r.useStringTable), hasLongStringField(r.hasLongStringField),
|
||||
sTableThreshold(r.sTableThreshold), forceInline(r.forceInline), userDataStore(NULL)
|
||||
{ }
|
||||
@ -522,6 +522,7 @@ Row& Row::operator=(const Row& r)
|
||||
offsets = r.offsets;
|
||||
colWidths = r.colWidths;
|
||||
types = r.types;
|
||||
charsetNumbers = r.charsetNumbers;
|
||||
data = r.data;
|
||||
scale = r.scale;
|
||||
precision = r.precision;
|
||||
@ -1006,6 +1007,7 @@ RowGroup::RowGroup(uint32_t colCount,
|
||||
const vector<uint32_t>& roids,
|
||||
const vector<uint32_t>& tkeys,
|
||||
const vector<CalpontSystemCatalog::ColDataType>& colTypes,
|
||||
const vector<uint32_t>& csNumbers,
|
||||
const vector<uint32_t>& cscale,
|
||||
const vector<uint32_t>& cprecision,
|
||||
uint32_t stringTableThreshold,
|
||||
@ -1013,7 +1015,7 @@ RowGroup::RowGroup(uint32_t colCount,
|
||||
const vector<bool>& forceInlineData
|
||||
) :
|
||||
columnCount(colCount), data(NULL), oldOffsets(positions), oids(roids), keys(tkeys),
|
||||
types(colTypes), scale(cscale), precision(cprecision), rgData(NULL), strings(NULL),
|
||||
types(colTypes), charsetNumbers(csNumbers), scale(cscale), precision(cprecision), rgData(NULL), strings(NULL),
|
||||
sTableThreshold(stringTableThreshold)
|
||||
{
|
||||
uint32_t i;
|
||||
@ -1047,12 +1049,16 @@ RowGroup::RowGroup(uint32_t colCount,
|
||||
|
||||
useStringTable = (stringTable && hasLongStringField);
|
||||
offsets = (useStringTable ? &stOffsets[0] : &oldOffsets[0]);
|
||||
|
||||
// Set all the charsets to NULL for jit initialization.
|
||||
charsets.insert(charsets.begin(), charsetNumbers.size(), NULL);
|
||||
}
|
||||
|
||||
RowGroup::RowGroup(const RowGroup& r) :
|
||||
columnCount(r.columnCount), data(r.data), oldOffsets(r.oldOffsets),
|
||||
stOffsets(r.stOffsets), colWidths(r.colWidths),
|
||||
oids(r.oids), keys(r.keys), types(r.types), scale(r.scale), precision(r.precision),
|
||||
oids(r.oids), keys(r.keys), types(r.types), charsetNumbers(r.charsetNumbers),
|
||||
charsets(r.charsets), scale(r.scale), precision(r.precision),
|
||||
rgData(r.rgData), strings(r.strings), useStringTable(r.useStringTable),
|
||||
hasLongStringField(r.hasLongStringField), sTableThreshold(r.sTableThreshold),
|
||||
forceInline(r.forceInline)
|
||||
@ -1076,6 +1082,8 @@ RowGroup& RowGroup::operator=(const RowGroup& r)
|
||||
oids = r.oids;
|
||||
keys = r.keys;
|
||||
types = r.types;
|
||||
charsetNumbers = r.charsetNumbers;
|
||||
charsets = r.charsets;
|
||||
data = r.data;
|
||||
scale = r.scale;
|
||||
precision = r.precision;
|
||||
@ -1120,6 +1128,7 @@ void RowGroup::serialize(ByteStream& bs) const
|
||||
serializeInlineVector<uint32_t>(bs, oids);
|
||||
serializeInlineVector<uint32_t>(bs, keys);
|
||||
serializeInlineVector<CalpontSystemCatalog::ColDataType>(bs, types);
|
||||
serializeInlineVector<uint32_t>(bs, charsetNumbers);
|
||||
serializeInlineVector<uint32_t>(bs, scale);
|
||||
serializeInlineVector<uint32_t>(bs, precision);
|
||||
bs << (uint8_t) useStringTable;
|
||||
@ -1139,6 +1148,7 @@ void RowGroup::deserialize(ByteStream& bs)
|
||||
deserializeInlineVector<uint32_t>(bs, oids);
|
||||
deserializeInlineVector<uint32_t>(bs, keys);
|
||||
deserializeInlineVector<CalpontSystemCatalog::ColDataType>(bs, types);
|
||||
deserializeInlineVector<uint32_t>(bs, charsetNumbers);
|
||||
deserializeInlineVector<uint32_t>(bs, scale);
|
||||
deserializeInlineVector<uint32_t>(bs, precision);
|
||||
bs >> tmp8;
|
||||
@ -1156,6 +1166,10 @@ void RowGroup::deserialize(ByteStream& bs)
|
||||
offsets = &stOffsets[0];
|
||||
else if (!useStringTable && !oldOffsets.empty())
|
||||
offsets = &oldOffsets[0];
|
||||
|
||||
// Set all the charsets to NULL for jit initialization.
|
||||
charsets.insert(charsets.begin(), charsetNumbers.size(), NULL);
|
||||
|
||||
}
|
||||
|
||||
void RowGroup::serializeRGData(ByteStream& bs) const
|
||||
@ -1467,6 +1481,15 @@ void RowGroup::addToSysDataList(execplan::CalpontSystemCatalog::NJLSysDataList&
|
||||
}
|
||||
}
|
||||
|
||||
CHARSET_INFO* RowGroup::getCharset(uint32_t col)
|
||||
{
|
||||
if (charsets[col] == NULL)
|
||||
{
|
||||
charsets[col] = get_charset(charsetNumbers[col], MYF(MY_WME));
|
||||
}
|
||||
return charsets[col];
|
||||
}
|
||||
|
||||
void RowGroup::setDBRoot(uint32_t dbroot)
|
||||
{
|
||||
*((uint32_t*) &data[dbRootOffset]) = dbroot;
|
||||
|
Reference in New Issue
Block a user