diff --git a/utils/rowgroup/rowaggregation.cpp b/utils/rowgroup/rowaggregation.cpp index 4540a497f..8e8c471fe 100644 --- a/utils/rowgroup/rowaggregation.cpp +++ b/utils/rowgroup/rowaggregation.cpp @@ -675,19 +675,16 @@ void RowAggregation::initialize(bool hasGroupConcat) } } - config::Config* config = config::Config::makeConfig(); - string tmpDir = config->getTempFileDir(config::Config::TempDirPurpose::Aggregates); - string compStr = config->getConfig("RowAggregation", "Compression"); - auto* compressor = compress::getCompressInterfaceByName(compStr); + auto* compressor = compress::getCompressInterfaceByName(fCompStr); 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)); } else { - fRowAggStorage.reset(new RowAggStorage(tmpDir, fRowGroupOut, fAggMapKeyCount, fRm, fSessionMemLimit, + fRowAggStorage.reset(new RowAggStorage(fTmpDir, fRowGroupOut, fAggMapKeyCount, fRm, fSessionMemLimit, disk_agg, allow_gen, compressor)); } @@ -768,19 +765,16 @@ void RowAggregation::aggReset() } } - config::Config* config = config::Config::makeConfig(); - string tmpDir = config->getTempFileDir(config::Config::TempDirPurpose::Aggregates); - string compStr = config->getConfig("RowAggregation", "Compression"); - auto* compressor = compress::getCompressInterfaceByName(compStr); + auto* compressor = compress::getCompressInterfaceByName(fCompStr); 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)); } else { - fRowAggStorage.reset(new RowAggStorage(tmpDir, fRowGroupOut, fAggMapKeyCount, fRm, fSessionMemLimit, + fRowAggStorage.reset(new RowAggStorage(fTmpDir, fRowGroupOut, fAggMapKeyCount, fRm, fSessionMemLimit, disk_agg, allow_gen, compressor)); } fRowGroupOut->getRow(0, &fRow); diff --git a/utils/rowgroup/rowaggregation.h b/utils/rowgroup/rowaggregation.h index 6317fc0ab..65d4ead3a 100644 --- a/utils/rowgroup/rowaggregation.h +++ b/utils/rowgroup/rowaggregation.h @@ -633,6 +633,10 @@ class RowAggregation : public messageqcpp::Serializeable boost::shared_ptr fSessionMemLimit; std::unique_ptr fCurRGData; bool fRollupFlag = false; + + std::string fTmpDir = config::Config::makeConfig()->getTempFileDir(config::Config::TempDirPurpose::Aggregates); + std::string fCompStr = config::Config::makeConfig()->getConfig("RowAggregation", "Compression"); + }; //------------------------------------------------------------------------------