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

MCOL-3536 Collation

This commit is contained in:
David Hall
2020-05-28 15:38:43 -05:00
parent 8250d4fc69
commit 516a3fa37e
2 changed files with 9 additions and 9 deletions

View File

@ -546,7 +546,7 @@ Row::Row(const Row& r) : columnCount(r.columnCount), baseRid(r.baseRid),
offsets(r.offsets), colWidths(r.colWidths), types(r.types),
charsetNumbers(r.charsetNumbers), charsets(r.charsets),
data(r.data), scale(r.scale), precision(r.precision), strings(r.strings),
useStringTable(r.useStringTable), hasStrings(r.hasStrings), hasLongStringField(r.hasLongStringField),
useStringTable(r.useStringTable), hasCollation(r.hasCollation), hasLongStringField(r.hasLongStringField),
sTableThreshold(r.sTableThreshold), forceInline(r.forceInline), userDataStore(NULL)
{ }
@ -568,7 +568,7 @@ Row& Row::operator=(const Row& r)
precision = r.precision;
strings = r.strings;
useStringTable = r.useStringTable;
hasStrings = r.hasStrings;
hasCollation = r.hasCollation;
hasLongStringField = r.hasLongStringField;
sTableThreshold = r.sTableThreshold;
forceInline = r.forceInline;
@ -1101,10 +1101,10 @@ bool Row::equals(const Row& r2, uint32_t lastCol) const
return true;
// If there are no strings in the row, then we can just memcmp the whole row.
// hasStrings is true if there is any column of type CHAR, VARCHAR or TEXT
// hasCollation is true if there is any column of type CHAR, VARCHAR or TEXT
// useStringTable is true if any field declared > max inline field size, including BLOB
// For memcmp to be correct, both must be false.
if (!hasStrings && !useStringTable && !r2.hasStrings && !r2.useStringTable)
if (!hasCollation && !useStringTable && !r2.hasCollation && !r2.useStringTable)
return !(memcmp(&data[offsets[0]], &r2.data[offsets[0]], offsets[lastCol + 1] - offsets[0]));
// There are strings involved, so we need to check each column
@ -1214,7 +1214,7 @@ RowGroup::RowGroup(uint32_t colCount,
type == execplan::CalpontSystemCatalog::VARCHAR ||
type == execplan::CalpontSystemCatalog::TEXT)
{
hasStrings = true;
hasCollation = true;
}
}
@ -1261,7 +1261,7 @@ RowGroup& RowGroup::operator=(const RowGroup& r)
rgData = r.rgData;
strings = r.strings;
useStringTable = r.useStringTable;
hasStrings = r.hasStrings;
hasCollation = r.hasCollation;
hasLongStringField = r.hasLongStringField;
sTableThreshold = r.sTableThreshold;
forceInline = r.forceInline;

View File

@ -478,7 +478,7 @@ private:
StringStore* strings;
bool useStringTable;
bool hasStrings;
bool hasCollation;
bool hasLongStringField;
uint32_t sTableThreshold;
boost::shared_array<bool> forceInline;
@ -1373,7 +1373,7 @@ private:
RGData* rgData;
StringStore* strings; // note, strings and data belong to rgData
bool useStringTable;
bool hasStrings;
bool hasCollation;
bool hasLongStringField;
uint32_t sTableThreshold;
boost::shared_array<bool> forceInline;
@ -1523,7 +1523,7 @@ void RowGroup::initRow(Row* r, bool forceInlineData) const
r->hasLongStringField = hasLongStringField;
r->sTableThreshold = sTableThreshold;
r->forceInline = forceInline;
r->hasStrings = hasStrings;
r->hasCollation = hasCollation;
}
inline uint32_t RowGroup::getRowSize() const