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
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
@ -586,7 +586,16 @@ void AggregateColumn::evaluate(Row& row, bool& isNull)
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::VARBINARY:
|
||||
case CalpontSystemCatalog::BLOB: isNull = true; break;
|
||||
case CalpontSystemCatalog::BLOB:
|
||||
{
|
||||
auto const str = row.getConstString(fInputIndex);
|
||||
fResult.strVal.dropString();
|
||||
if (!str.isNull())
|
||||
fResult.strVal.assign((const uint8_t*)str.str(), str.length());
|
||||
|
||||
isNull = isNull || fResult.strVal.isNull();
|
||||
}
|
||||
break;
|
||||
|
||||
default: // treat as int64
|
||||
if (row.equals<8>(BIGINTNULL, fInputIndex))
|
||||
|
Reference in New Issue
Block a user