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

feat(): use CountingAllocator for DISTINCT

This commit is contained in:
drrtuy
2025-02-21 17:02:42 +00:00
parent 7ad4022d96
commit 0bfe10a7d0
3 changed files with 14 additions and 6 deletions

View File

@ -747,13 +747,14 @@ IdbOrderBy::~IdbOrderBy()
delete *i++;
}
// INV fRm is not NULL here
void IdbOrderBy::initialize(const RowGroup& rg)
{
// initialize rows
IdbCompare::initialize(rg);
auto newSize = rg.getSizeWithStrings(fRowsPerRG);
if (fRm && !fRm->getMemory(newSize, fSessionMemLimit))
if (!fRm->getMemory(newSize, fSessionMemLimit))
{
cerr << IDBErrorInfo::instance()->errorMsg(fErrorCode) << " @" << __FILE__ << ":" << __LINE__;
throw IDBExcept(fErrorCode);
@ -773,7 +774,8 @@ void IdbOrderBy::initialize(const RowGroup& rg)
if (fDistinct)
{
fDistinctMap.reset(new DistinctMap_t(10, Hasher(this, getKeyLength()), Eq(this, getKeyLength())));
auto alloc = fRm->getAllocator<rowgroup::Row::Pointer>();
fDistinctMap.reset(new DistinctMap_t(10, Hasher(this, getKeyLength()), Eq(this, getKeyLength()), alloc));
}
}