summaryrefslogtreecommitdiffstats
path: root/yql/essentials/minikql/computation/mkql_computation_node.cpp
diff options
context:
space:
mode:
authorvvvv <[email protected]>2025-10-09 12:25:18 +0300
committervvvv <[email protected]>2025-10-09 12:57:17 +0300
commitcb77d014972b2cdb27d2e6d979fc3a2772b27ad4 (patch)
tree7f3bcd8ce71c6bd0f3ccc11e31b9f665475b819e /yql/essentials/minikql/computation/mkql_computation_node.cpp
parentd58a8990d353b051c27e1069141117fdfde64358 (diff)
YQL-20086 minikql
commit_hash:e96f7390db5fcbe7e9f64f898141a263ad522daa
Diffstat (limited to 'yql/essentials/minikql/computation/mkql_computation_node.cpp')
-rw-r--r--yql/essentials/minikql/computation/mkql_computation_node.cpp45
1 files changed, 24 insertions, 21 deletions
diff --git a/yql/essentials/minikql/computation/mkql_computation_node.cpp b/yql/essentials/minikql/computation/mkql_computation_node.cpp
index a8c898d82dd..e7e351cc979 100644
--- a/yql/essentials/minikql/computation/mkql_computation_node.cpp
+++ b/yql/essentials/minikql/computation/mkql_computation_node.cpp
@@ -45,10 +45,10 @@ TDatumProvider MakeDatumProvider(const IComputationNode* node, TComputationConte
}
TComputationContext::TComputationContext(const THolderFactory& holderFactory,
- const NUdf::IValueBuilder* builder,
- const TComputationOptsFull& opts,
- const TComputationMutables& mutables,
- arrow::MemoryPool& arrowMemoryPool)
+ const NUdf::IValueBuilder* builder,
+ const TComputationOptsFull& opts,
+ const TComputationMutables& mutables,
+ arrow::MemoryPool& arrowMemoryPool)
: TComputationContextLLVM{holderFactory, opts.Stats, std::make_unique<NUdf::TUnboxedValue[]>(mutables.CurValueIndex), builder}
, RandomProvider(opts.RandomProvider)
, TimeProvider(opts.TimeProvider)
@@ -65,7 +65,7 @@ TComputationContext::TComputationContext(const THolderFactory& holderFactory,
std::fill_n(MutableValues.get(), mutables.CurValueIndex, NUdf::TUnboxedValue(NUdf::TUnboxedValuePod::Invalid()));
for (const auto& [mutableIdx, fieldIdx, used] : mutables.WideFieldInitialize) {
- for (ui32 i: used) {
+ for (ui32 i : used) {
WideFields[fieldIdx + i] = &MutableValues[mutableIdx + i];
}
}
@@ -77,11 +77,12 @@ TComputationContext::TComputationContext(const THolderFactory& holderFactory,
TComputationContext::~TComputationContext() {
#ifndef NDEBUG
if (RssCounter) {
- RssLogger_->Log(RssLoggerComponent_, NUdf::ELogLevel::Info, TStringBuilder()
- << "UsageOnFinish: graph=" << HolderFactory.GetPagePool().GetUsed()
- << ", rss=" << TRusage::Get().MaxRss
- << ", peakAlloc=" << HolderFactory.GetPagePool().GetPeakAllocated()
- << ", adjustor=" << UsageAdjustor);
+ RssLogger_->Log(
+ RssLoggerComponent_,
+ NUdf::ELogLevel::Info,
+ TStringBuilder() << "UsageOnFinish: graph=" << HolderFactory.GetPagePool().GetUsed()
+ << ", rss=" << TRusage::Get().MaxRss << ", peakAlloc="
+ << HolderFactory.GetPagePool().GetPeakAllocated() << ", adjustor=" << UsageAdjustor);
}
#endif
}
@@ -98,8 +99,8 @@ void TComputationContext::UpdateUsageAdjustor(ui64 memLimit) {
#ifndef NDEBUG
// Print first time and then each 30 seconds
- bool printUsage = LastPrintUsage_ == TInstant::Zero()
- || TInstant::Now() > TDuration::Seconds(30).ToDeadLine(LastPrintUsage_);
+ bool printUsage = LastPrintUsage_ == TInstant::Zero() ||
+ TInstant::Now() > TDuration::Seconds(30).ToDeadLine(LastPrintUsage_);
#endif
if (auto peakAlloc = HolderFactory.GetPagePool().GetPeakAllocated()) {
@@ -114,21 +115,23 @@ void TComputationContext::UpdateUsageAdjustor(ui64 memLimit) {
#ifndef NDEBUG
if (printUsage) {
- RssLogger_->Log(RssLoggerComponent_, NUdf::ELogLevel::Info, TStringBuilder()
- << "Usage: graph=" << HolderFactory.GetPagePool().GetUsed()
- << ", rss=" << rss
- << ", peakAlloc=" << HolderFactory.GetPagePool().GetPeakAllocated()
- << ", adjustor=" << UsageAdjustor);
+ RssLogger_->Log(
+ RssLoggerComponent_,
+ NUdf::ELogLevel::Info,
+ TStringBuilder() << "Usage: graph=" << HolderFactory.GetPagePool().GetUsed()
+ << ", rss=" << rss << ", peakAlloc="
+ << HolderFactory.GetPagePool().GetPeakAllocated() << ", adjustor=" << UsageAdjustor);
LastPrintUsage_ = TInstant::Now();
}
#endif
}
-class TSimpleSecureParamsProvider : public NUdf::ISecureParamsProvider {
+class TSimpleSecureParamsProvider: public NUdf::ISecureParamsProvider {
public:
TSimpleSecureParamsProvider(const THashMap<TString, TString>& secureParams)
: SecureParams_(secureParams)
- {}
+ {
+ }
bool GetSecureParam(NUdf::TStringRef key, NUdf::TStringRef& value) const override {
auto found = SecureParams_.FindPtr(TStringBuf(key));
@@ -148,5 +151,5 @@ std::unique_ptr<NUdf::ISecureParamsProvider> MakeSimpleSecureParamsProvider(cons
return std::make_unique<TSimpleSecureParamsProvider>(secureParams);
}
-}
-}
+} // namespace NMiniKQL
+} // namespace NKikimr