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
feat(TNS, sorting, distinct): TNS now accounts data used by RGDatas and distinct maps.
This commit is contained in:
@ -737,7 +737,8 @@ IdbOrderBy::IdbOrderBy()
|
||||
|
||||
IdbOrderBy::~IdbOrderBy()
|
||||
{
|
||||
if (fRm)
|
||||
// returnRGDataMemory2RM() returns all memory before the dtor is called.
|
||||
if (fRm && fMemSize > 0)
|
||||
fRm->returnMemory(fMemSize, fSessionMemLimit);
|
||||
|
||||
// delete compare objects
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <unordered_set>
|
||||
|
||||
#include "countingallocator.h"
|
||||
#include "resourcemanager.h"
|
||||
#include "rowgroup.h"
|
||||
#include "hasher.h"
|
||||
// #include "stlpoolallocator.h"
|
||||
@ -433,6 +434,20 @@ class IdbOrderBy : public IdbCompare
|
||||
{
|
||||
return *fOrderByQueue;
|
||||
}
|
||||
void returnAllRGDataMemory2RM()
|
||||
{
|
||||
while (!fOrderByQueue->empty())
|
||||
{
|
||||
fOrderByQueue->pop();
|
||||
}
|
||||
fRm->returnMemory(fMemSize, fSessionMemLimit);
|
||||
fMemSize = 0;
|
||||
}
|
||||
void returnRGDataMemory2RM(const size_t rgDataSize)
|
||||
{
|
||||
fRm->returnMemory(rgDataSize, fSessionMemLimit);
|
||||
fMemSize -= rgDataSize;
|
||||
}
|
||||
CompareRule& getRule()
|
||||
{
|
||||
return fRule;
|
||||
|
Reference in New Issue
Block a user