diff --git a/ydb/library/yql/providers/dq/common/yql_dq_settings.cpp b/ydb/library/yql/providers/dq/common/yql_dq_settings.cpp index 8ea030222958..df42c3137fb1 100644 --- a/ydb/library/yql/providers/dq/common/yql_dq_settings.cpp +++ b/ydb/library/yql/providers/dq/common/yql_dq_settings.cpp @@ -95,6 +95,8 @@ TDqConfiguration::TDqConfiguration() { EnableDqReplicate = true; } }); + + REGISTER_SETTING(*this, _MaxAttachmentsSize); } } // namespace NYql diff --git a/ydb/library/yql/providers/dq/common/yql_dq_settings.h b/ydb/library/yql/providers/dq/common/yql_dq_settings.h index c3cd9772bf0c..b26332217b39 100644 --- a/ydb/library/yql/providers/dq/common/yql_dq_settings.h +++ b/ydb/library/yql/providers/dq/common/yql_dq_settings.h @@ -58,7 +58,7 @@ struct TDqSettings { static constexpr ESpillingEngine SpillingEngine = ESpillingEngine::Disable; static constexpr ui32 CostBasedOptimizationLevel = 0; static constexpr ui32 MaxDPccpDPTableSize = 16400U; - + static constexpr ui64 MaxAttachmentsSize = 2_GB; }; using TPtr = std::shared_ptr; @@ -130,6 +130,8 @@ struct TDqSettings { NCommon::TConfSetting DisableLLVMForBlockStages; NCommon::TConfSetting SplitStageOnDqReplicate; + NCommon::TConfSetting _MaxAttachmentsSize; + // This options will be passed to executor_actor and worker_actor template void Save(TProtoConfig& config) { diff --git a/ydb/library/yql/providers/dq/provider/exec/yql_dq_exectransformer.cpp b/ydb/library/yql/providers/dq/provider/exec/yql_dq_exectransformer.cpp index 3849ba0b1766..f8d44a82f4cb 100644 --- a/ydb/library/yql/providers/dq/provider/exec/yql_dq_exectransformer.cpp +++ b/ydb/library/yql/providers/dq/provider/exec/yql_dq_exectransformer.cpp @@ -718,7 +718,7 @@ class TDqExecTransformer: public TExecTransformerBase, TCounters sizeSum += f.GetSize(); } - i64 dataLimit = static_cast(4_GB); + i64 dataLimit = static_cast(State->Settings->_MaxAttachmentsSize.Get().GetOrElse(TDqSettings::TDefault::MaxAttachmentsSize)); if (sizeSum > dataLimit) { YQL_CLOG(WARN, ProviderDq) << "Too much data: " << sizeSum << " > " << dataLimit; fallbackFlag = true;