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
feat(): use CountingAllocator for DISTINCT
This commit is contained in:
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user