@@ -59,7 +59,7 @@ constexpr ui32 MAX_NON_PARALLEL_TASKS_EXECUTION_LIMIT = 4;
5959
6060TKqpPlanner::TKqpPlanner (TKqpTasksGraph& graph, ui64 txId, const TActorId& executer, const IKqpGateway::TKqpSnapshot& snapshot,
6161 const TString& database, const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, TInstant deadline,
62- const Ydb::Table::QueryStatsCollection::Mode& statsMode,
62+ const Ydb::Table::QueryStatsCollection::Mode& statsMode, bool withSpilling,
6363 const TMaybe<NKikimrKqp::TRlPath>& rlPath, NWilson::TSpan& executerSpan,
6464 TVector<NKikimrKqp::TKqpNodeResources>&& resourcesSnapshot,
6565 const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& executerRetriesConfig,
@@ -72,6 +72,7 @@ TKqpPlanner::TKqpPlanner(TKqpTasksGraph& graph, ui64 txId, const TActorId& execu
7272 , UserToken(userToken)
7373 , Deadline(deadline)
7474 , StatsMode(statsMode)
75+ , WithSpilling(withSpilling)
7576 , RlPath(rlPath)
7677 , ResourcesSnapshot(std::move(resourcesSnapshot))
7778 , ExecuterSpan(executerSpan)
@@ -186,6 +187,7 @@ std::unique_ptr<TEvKqpNode::TEvStartKqpTasksRequest> TKqpPlanner::SerializeReque
186187 request.MutableRuntimeSettings ()->SetExecType (NYql::NDqProto::TComputeRuntimeSettings::DATA);
187188 } else {
188189 request.MutableRuntimeSettings ()->SetExecType (NYql::NDqProto::TComputeRuntimeSettings::SCAN);
190+ request.MutableRuntimeSettings ()->SetUseSpilling (WithSpilling);
189191 }
190192
191193 if (RlPath) {
@@ -332,6 +334,7 @@ void TKqpPlanner::ExecuteDataComputeTask(ui64 taskId, bool shareMailbox, bool op
332334 settings.ExtraMemoryAllocationPool = NRm::EKqpMemoryPool::DataQuery;
333335 settings.FailOnUndelivery = true ;
334336 settings.StatsMode = GetDqStatsMode (StatsMode);
337+ settings.UseSpilling = false ;
335338
336339 NYql::NDq::TComputeMemoryLimits limits;
337340 limits.ChannelBufferSize = 32_MB; // Depends on NYql::NDq::TDqOutputChannelSettings::ChunkSizeLimit (now 48 MB) with a ratio of 1.5
@@ -515,14 +518,14 @@ ui32 TKqpPlanner::CalcSendMessageFlagsForNode(ui32 nodeId) {
515518std::unique_ptr<TKqpPlanner> CreateKqpPlanner (TKqpTasksGraph& tasksGraph, ui64 txId, const TActorId& executer,
516519 const IKqpGateway::TKqpSnapshot& snapshot,
517520 const TString& database, const TIntrusiveConstPtr<NACLib::TUserToken>& userToken, TInstant deadline,
518- const Ydb::Table::QueryStatsCollection::Mode& statsMode,
521+ const Ydb::Table::QueryStatsCollection::Mode& statsMode, bool withSpilling,
519522 const TMaybe<NKikimrKqp::TRlPath>& rlPath, NWilson::TSpan& executerSpan,
520523 TVector<NKikimrKqp::TKqpNodeResources>&& resourcesSnapshot, const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& executerRetriesConfig,
521524 bool useDataQueryPool, bool localComputeTasks, ui64 mkqlMemoryLimit, NYql::NDq::IDqAsyncIoFactory::TPtr asyncIoFactory, bool doOptimization,
522525 const TIntrusivePtr<TUserRequestContext>& userRequestContext)
523526{
524527 return std::make_unique<TKqpPlanner>(tasksGraph, txId, executer, snapshot,
525- database, userToken, deadline, statsMode, rlPath, executerSpan,
528+ database, userToken, deadline, statsMode, withSpilling, rlPath, executerSpan,
526529 std::move (resourcesSnapshot), executerRetriesConfig, useDataQueryPool,
527530 localComputeTasks, mkqlMemoryLimit, asyncIoFactory, doOptimization, userRequestContext);
528531}
0 commit comments