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
perf(primproc) MCOL-5601: Initilize two fields once in ctor instead of calling makeConfig
std::string fTmpDir = config::Config::makeConfig()->getTempFileDir(config::Config::TempDirPurpose::Aggregates); std::string fCompStr = config::Config::makeConfig()->getConfig("RowAggregation", "Compression");
This commit is contained in:
committed by
Leonid Fedorov
parent
9d5ad925eb
commit
4d7a6a0be5
@ -675,19 +675,16 @@ void RowAggregation::initialize(bool hasGroupConcat)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
config::Config* config = config::Config::makeConfig();
|
auto* compressor = compress::getCompressInterfaceByName(fCompStr);
|
||||||
string tmpDir = config->getTempFileDir(config::Config::TempDirPurpose::Aggregates);
|
|
||||||
string compStr = config->getConfig("RowAggregation", "Compression");
|
|
||||||
auto* compressor = compress::getCompressInterfaceByName(compStr);
|
|
||||||
|
|
||||||
if (fKeyOnHeap)
|
if (fKeyOnHeap)
|
||||||
{
|
{
|
||||||
fRowAggStorage.reset(new RowAggStorage(tmpDir, fRowGroupOut, &fKeyRG, fAggMapKeyCount, fRm,
|
fRowAggStorage.reset(new RowAggStorage(fTmpDir, fRowGroupOut, &fKeyRG, fAggMapKeyCount, fRm,
|
||||||
fSessionMemLimit, disk_agg, allow_gen, compressor));
|
fSessionMemLimit, disk_agg, allow_gen, compressor));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fRowAggStorage.reset(new RowAggStorage(tmpDir, fRowGroupOut, fAggMapKeyCount, fRm, fSessionMemLimit,
|
fRowAggStorage.reset(new RowAggStorage(fTmpDir, fRowGroupOut, fAggMapKeyCount, fRm, fSessionMemLimit,
|
||||||
disk_agg, allow_gen, compressor));
|
disk_agg, allow_gen, compressor));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -768,19 +765,16 @@ void RowAggregation::aggReset()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
config::Config* config = config::Config::makeConfig();
|
auto* compressor = compress::getCompressInterfaceByName(fCompStr);
|
||||||
string tmpDir = config->getTempFileDir(config::Config::TempDirPurpose::Aggregates);
|
|
||||||
string compStr = config->getConfig("RowAggregation", "Compression");
|
|
||||||
auto* compressor = compress::getCompressInterfaceByName(compStr);
|
|
||||||
|
|
||||||
if (fKeyOnHeap)
|
if (fKeyOnHeap)
|
||||||
{
|
{
|
||||||
fRowAggStorage.reset(new RowAggStorage(tmpDir, fRowGroupOut, &fKeyRG, fAggMapKeyCount, fRm,
|
fRowAggStorage.reset(new RowAggStorage(fTmpDir, fRowGroupOut, &fKeyRG, fAggMapKeyCount, fRm,
|
||||||
fSessionMemLimit, disk_agg, allow_gen, compressor));
|
fSessionMemLimit, disk_agg, allow_gen, compressor));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fRowAggStorage.reset(new RowAggStorage(tmpDir, fRowGroupOut, fAggMapKeyCount, fRm, fSessionMemLimit,
|
fRowAggStorage.reset(new RowAggStorage(fTmpDir, fRowGroupOut, fAggMapKeyCount, fRm, fSessionMemLimit,
|
||||||
disk_agg, allow_gen, compressor));
|
disk_agg, allow_gen, compressor));
|
||||||
}
|
}
|
||||||
fRowGroupOut->getRow(0, &fRow);
|
fRowGroupOut->getRow(0, &fRow);
|
||||||
|
@ -635,6 +635,10 @@ class RowAggregation : public messageqcpp::Serializeable
|
|||||||
boost::shared_ptr<int64_t> fSessionMemLimit;
|
boost::shared_ptr<int64_t> fSessionMemLimit;
|
||||||
std::unique_ptr<RGData> fCurRGData;
|
std::unique_ptr<RGData> fCurRGData;
|
||||||
bool fRollupFlag = false;
|
bool fRollupFlag = false;
|
||||||
|
|
||||||
|
std::string fTmpDir = config::Config::makeConfig()->getTempFileDir(config::Config::TempDirPurpose::Aggregates);
|
||||||
|
std::string fCompStr = config::Config::makeConfig()->getConfig("RowAggregation", "Compression");
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user