You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
A cleanup for MCOL-4064 Make JOIN collation aware
After creating and populating tables with CHAR(5) case insensitive columns, in a set of consequent joins like: select * from t1, t2 where t1.c1=t2.c1; select * from t1, t2 where t1.c1=t2.c2; select * from t1, t2 where t1.c2=t2.c1; select * from t1, t2 where t1.c2=t2.c2; only the first join worked reliably case insensitively. Removing the remaining pieces of the code that used order_swap() to compare short CHAR columns, and using Charset::strnncollsp() instead. This fixes the issue.
This commit is contained in:
@ -2396,12 +2396,12 @@ void TupleBPS::receiveMultiPrimitiveMessages(uint32_t threadID)
|
||||
{
|
||||
if (fColType.colWidth > 8)
|
||||
{
|
||||
lbidList->UpdateMinMax(cpv[i].bigMin, cpv[i].bigMax, cpv[i].LBID, fColType.colDataType,
|
||||
lbidList->UpdateMinMax(cpv[i].bigMin, cpv[i].bigMax, cpv[i].LBID, fColType,
|
||||
cpv[i].valid);
|
||||
}
|
||||
else
|
||||
{
|
||||
lbidList->UpdateMinMax(cpv[i].min, cpv[i].max, cpv[i].LBID, fColType.colDataType,
|
||||
lbidList->UpdateMinMax(cpv[i].min, cpv[i].max, cpv[i].LBID, fColType,
|
||||
cpv[i].valid);
|
||||
}
|
||||
}
|
||||
@ -3289,12 +3289,12 @@ void TupleBPS::addCPPredicates(uint32_t OID, const vector<int128_t>& vals, bool
|
||||
if (!isSmallSideWideDecimal)
|
||||
{
|
||||
runtimeCPFlags[j] = ll.checkRangeOverlap(min, max, (int64_t) vals[0], (int64_t) vals[1],
|
||||
colType.colDataType) && runtimeCPFlags[j];
|
||||
colType) && runtimeCPFlags[j];
|
||||
}
|
||||
else
|
||||
{
|
||||
runtimeCPFlags[j] = ll.checkRangeOverlap((int128_t) min, (int128_t) max, vals[0], vals[1],
|
||||
colType.colDataType) && runtimeCPFlags[j];
|
||||
colType) && runtimeCPFlags[j];
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -3306,12 +3306,12 @@ void TupleBPS::addCPPredicates(uint32_t OID, const vector<int128_t>& vals, bool
|
||||
if (!isSmallSideWideDecimal)
|
||||
{
|
||||
intersection = intersection ||
|
||||
ll.checkSingleValue(min, max, (int64_t) vals[k], colType.colDataType);
|
||||
ll.checkSingleValue(min, max, (int64_t) vals[k], colType);
|
||||
}
|
||||
else
|
||||
{
|
||||
intersection = intersection ||
|
||||
ll.checkSingleValue((int128_t) min, (int128_t) max, vals[k], colType.colDataType);
|
||||
ll.checkSingleValue((int128_t) min, (int128_t) max, vals[k], colType);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3331,14 +3331,14 @@ void TupleBPS::addCPPredicates(uint32_t OID, const vector<int128_t>& vals, bool
|
||||
{
|
||||
if (isRange)
|
||||
runtimeCPFlags[j] = ll.checkRangeOverlap(bigMin, bigMax, vals[0], vals[1],
|
||||
colType.colDataType) && runtimeCPFlags[j];
|
||||
colType) && runtimeCPFlags[j];
|
||||
else
|
||||
{
|
||||
intersection = false;
|
||||
|
||||
for (k = 0; k < vals.size(); k++)
|
||||
intersection = intersection ||
|
||||
ll.checkSingleValue(bigMin, bigMax, vals[k], colType.colDataType);
|
||||
ll.checkSingleValue(bigMin, bigMax, vals[k], colType);
|
||||
|
||||
runtimeCPFlags[j] = intersection && runtimeCPFlags[j];
|
||||
}
|
||||
|
Reference in New Issue
Block a user