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
fix: MCOL-5755: incorrect handling of BLOB (and TEXT) in GROUP BY
BLOB fields did not work as grouping keys at all, they were assigned value NULL for any value, be it NULL or not. The fix is in the rowaggregation.cpp in the initMapping(), a switch/case branch was added to handle BLOB field copying there. Also, TEXT columns did not distinguish between NULL and empty string in the grouping algorithm, now they do. The fix is in the equals() function, now we specifically check for isNull() equality between values.
This commit is contained in:
committed by
Sergey Zefirov
parent
f5089c7d80
commit
6e995e2e80
@ -977,8 +977,14 @@ bool Row::equals(const Row& r2, uint32_t lastCol) const
|
||||
cscDataType columnType = getColType(col);
|
||||
if (UNLIKELY(typeHasCollation(columnType)))
|
||||
{
|
||||
auto c1 = getConstString(col);
|
||||
auto c2 = r2.getConstString(col);
|
||||
if (c1.isNull() != c2.isNull())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
datatypes::Charset cs(getCharset(col));
|
||||
if (cs.strnncollsp(getConstString(col), r2.getConstString(col)))
|
||||
if (cs.strnncollsp(c1, c2))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user