diff options
author | spuchin <spuchin@ydb.tech> | 2023-03-13 16:35:33 +0300 |
---|---|---|
committer | spuchin <spuchin@ydb.tech> | 2023-03-13 16:35:33 +0300 |
commit | c6639e2510e9babdd401192557030f9b30f2d746 (patch) | |
tree | fa0e009c4baa1ce5768b430f6fc9009bc540a597 | |
parent | 3664b535f33a641e687200dd5d1e4d5ffa89f595 (diff) | |
download | ydb-c6639e2510e9babdd401192557030f9b30f2d746.tar.gz |
Use single-partition setting to avoid collect stages in simple cases. ()
37 files changed, 294 insertions, 483 deletions
diff --git a/ydb/core/kqp/executer_actor/kqp_data_executer.cpp b/ydb/core/kqp/executer_actor/kqp_data_executer.cpp index 4911802a765..d4090dec0f5 100644 --- a/ydb/core/kqp/executer_actor/kqp_data_executer.cpp +++ b/ydb/core/kqp/executer_actor/kqp_data_executer.cpp @@ -1671,6 +1671,10 @@ private: BuildDatashardTasks(stageInfo); } + if (stage.GetIsSinglePartition()) { + YQL_ENSURE(stageInfo.Tasks.size() == 1, "Unexpected multiple tasks in single-partition stage"); + } + BuildKqpStageChannels(TasksGraph, TableKeys, stageInfo, TxId, /* enableSpilling */ false); } diff --git a/ydb/core/kqp/executer_actor/kqp_executer.h b/ydb/core/kqp/executer_actor/kqp_executer.h index 2d2a5748d4d..5cc80581040 100644 --- a/ydb/core/kqp/executer_actor/kqp_executer.h +++ b/ydb/core/kqp/executer_actor/kqp_executer.h @@ -85,7 +85,7 @@ IActor* CreateKqpExecuter(IKqpGateway::TExecPhysicalRequest&& request, const TSt const NKikimrConfig::TTableServiceConfig::TAggregationConfig& aggregation, const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& executerRetriesConfig); -std::unique_ptr<TEvKqpExecuter::TEvTxResponse> ExecutePure( +std::unique_ptr<TEvKqpExecuter::TEvTxResponse> ExecuteLiteral( IKqpGateway::TExecPhysicalRequest&& request, TKqpRequestCounters::TPtr counters, TActorId owner); } // namespace NKqp diff --git a/ydb/core/kqp/executer_actor/kqp_literal_executer.cpp b/ydb/core/kqp/executer_actor/kqp_literal_executer.cpp index b5d916c2bb5..4c6059ce26f 100644 --- a/ydb/core/kqp/executer_actor/kqp_literal_executer.cpp +++ b/ydb/core/kqp/executer_actor/kqp_literal_executer.cpp @@ -79,9 +79,9 @@ public: LOG_D("Begin literal execution. Operation timeout: " << Request.Timeout << ", cancelAfter: " << Request.CancelAfter); } - std::unique_ptr<TEvKqpExecuter::TEvTxResponse> ExecutePure() { + std::unique_ptr<TEvKqpExecuter::TEvTxResponse> ExecuteLiteral() { try { - ExecutePureImpl(); + ExecuteLiteralImpl(); } catch (const TMemoryLimitExceededException&) { LOG_W("TKqpLiteralExecuter, memory limit exceeded."); CreateErrorResponse(Ydb::StatusIds::PRECONDITION_FAILED, @@ -95,7 +95,7 @@ public: return std::move(ResponseEv); } - void ExecutePureImpl() { + void ExecuteLiteralImpl() { NWilson::TSpan prepareTasksSpan(TWilsonKqp::LiteralExecuterPrepareTasks, LiteralExecuterSpan.GetTraceId(), "PrepareTasks", NWilson::EFlags::AUTO_END); if (Stats) { Stats->StartTs = TInstant::Now(); @@ -402,13 +402,13 @@ private: } // anonymous namespace -std::unique_ptr<TEvKqpExecuter::TEvTxResponse> ExecutePure( +std::unique_ptr<TEvKqpExecuter::TEvTxResponse> ExecuteLiteral( IKqpGateway::TExecPhysicalRequest&& request, TKqpRequestCounters::TPtr counters, TActorId owner) { std::unique_ptr<TKqpLiteralExecuter> executer = std::make_unique<TKqpLiteralExecuter>( std::move(request), counters, owner); - return executer->ExecutePure(); + return executer->ExecuteLiteral(); } } // namespace NKqp diff --git a/ydb/core/kqp/executer_actor/kqp_scan_executer.cpp b/ydb/core/kqp/executer_actor/kqp_scan_executer.cpp index 6cfbcf0b171..d8622dc13fd 100644 --- a/ydb/core/kqp/executer_actor/kqp_scan_executer.cpp +++ b/ydb/core/kqp/executer_actor/kqp_scan_executer.cpp @@ -493,6 +493,10 @@ private: YQL_ENSURE(false, "Unexpected stage type " << (int) stageInfo.Meta.TableKind); } + if (stage.GetIsSinglePartition()) { + YQL_ENSURE(stageInfo.Tasks.size() == 1, "Unexpected multiple tasks in single-partition stage"); + } + BuildKqpStageChannels(TasksGraph, TableKeys, stageInfo, TxId, AppData()->EnableKqpSpilling); } diff --git a/ydb/core/kqp/gateway/kqp_gateway.h b/ydb/core/kqp/gateway/kqp_gateway.h index 8469cba064d..9914d9a6930 100644 --- a/ydb/core/kqp/gateway/kqp_gateway.h +++ b/ydb/core/kqp/gateway/kqp_gateway.h @@ -148,7 +148,8 @@ public: public: /* Compute */ - virtual NThreading::TFuture<TExecPhysicalResult> ExecutePure(TExecPhysicalRequest&& request, TQueryData::TPtr params) = 0; + virtual NThreading::TFuture<TExecPhysicalResult> ExecuteLiteral(TExecPhysicalRequest&& request, + TQueryData::TPtr params) = 0; /* Scripting */ virtual NThreading::TFuture<TQueryResult> ExplainDataQueryAst(const TString& cluster, const TString& query) = 0; diff --git a/ydb/core/kqp/gateway/kqp_ic_gateway.cpp b/ydb/core/kqp/gateway/kqp_ic_gateway.cpp index 72bc0fb3146..ef64a1442d2 100644 --- a/ydb/core/kqp/gateway/kqp_ic_gateway.cpp +++ b/ydb/core/kqp/gateway/kqp_ic_gateway.cpp @@ -462,7 +462,7 @@ private: }; -class TKqpExecPureRequestHandler: public TActorBootstrapped<TKqpExecPureRequestHandler> { +class TKqpExecLiteralRequestHandler: public TActorBootstrapped<TKqpExecLiteralRequestHandler> { public: using TResult = IKqpGateway::TExecPhysicalResult; @@ -470,7 +470,7 @@ public: return NKikimrServices::TActivity::KQP_EXEC_PHYSICAL_REQUEST_HANDLER; } - TKqpExecPureRequestHandler(IKqpGateway::TExecPhysicalRequest&& request, + TKqpExecLiteralRequestHandler(IKqpGateway::TExecPhysicalRequest&& request, TKqpRequestCounters::TPtr counters, TPromise<TResult> promise, TQueryData::TPtr params) : Request(std::move(request)) , Parameters(params) @@ -479,7 +479,7 @@ public: {} void Bootstrap() { - auto result = ::NKikimr::NKqp::ExecutePure(std::move(Request), Counters, SelfId()); + auto result = ::NKikimr::NKqp::ExecuteLiteral(std::move(Request), Counters, SelfId()); ProcessPureExecution(result); Become(&TThis::DieState); Send(SelfId(), new TEvents::TEvPoisonPill()); @@ -1796,12 +1796,12 @@ public: } } - TFuture<TExecPhysicalResult> ExecutePure(TExecPhysicalRequest&& request, TQueryData::TPtr params) override { + TFuture<TExecPhysicalResult> ExecuteLiteral(TExecPhysicalRequest&& request, TQueryData::TPtr params) override { YQL_ENSURE(!request.Transactions.empty()); YQL_ENSURE(request.DataShardLocks.empty()); YQL_ENSURE(!request.NeedTxId); - auto containOnlyPureStages = [](const auto& request) { + auto containOnlyLiteralStages = [](const auto& request) { for (const auto& tx : request.Transactions) { if (tx.Body->GetType() != NKqpProto::TKqpPhyTx::TYPE_COMPUTE) { return false; @@ -1817,9 +1817,9 @@ public: return true; }; - YQL_ENSURE(containOnlyPureStages(request)); + YQL_ENSURE(containOnlyLiteralStages(request)); auto promise = NewPromise<TExecPhysicalResult>(); - IActor* requestHandler = new TKqpExecPureRequestHandler(std::move(request), Counters, promise, params); + IActor* requestHandler = new TKqpExecLiteralRequestHandler(std::move(request), Counters, promise, params); RegisterActor(requestHandler); return promise.GetFuture(); } diff --git a/ydb/core/kqp/host/kqp_explain_prepared.cpp b/ydb/core/kqp/host/kqp_explain_prepared.cpp index f77e6a7eed0..1b04a0e9af5 100644 --- a/ydb/core/kqp/host/kqp_explain_prepared.cpp +++ b/ydb/core/kqp/host/kqp_explain_prepared.cpp @@ -37,12 +37,12 @@ public: const auto& tx = queryConstPtr->GetPhyTx(CurrentTxIndex); bool prepared = PrepareParameters(tx); - if (tx->IsPureTx() && prepared) { + if (tx->IsLiteralTx() && prepared) { IKqpGateway::TExecPhysicalRequest request(TxAlloc); request.Transactions.emplace_back(tx, TransformCtx->QueryCtx->QueryData); request.NeedTxId = false; - ExecuteFuture = Gateway->ExecutePure(std::move(request), TransformCtx->QueryCtx->QueryData); + ExecuteFuture = Gateway->ExecuteLiteral(std::move(request), TransformCtx->QueryCtx->QueryData); Promise = NewPromise(); ExecuteFuture.Apply([promise = Promise](const TFuture<IKqpGateway::TExecPhysicalResult> future) mutable { diff --git a/ydb/core/kqp/opt/kqp_opt_build_txs.cpp b/ydb/core/kqp/opt/kqp_opt_build_txs.cpp index 013341dc86f..cbacd00d143 100644 --- a/ydb/core/kqp/opt/kqp_opt_build_txs.cpp +++ b/ydb/core/kqp/opt/kqp_opt_build_txs.cpp @@ -14,6 +14,7 @@ namespace NKikimr::NKqp::NOpt { using namespace NYql; +using namespace NYql::NDq; using namespace NYql::NNodes; using TStatus = IGraphTransformer::TStatus; @@ -200,20 +201,29 @@ private: // return {}; // } - TMaybeNode<TDqPhyStage> collectStage; - // TODO: This is a temporary workaround. - // If result stage has single UnionAll input, we don't have to build a separate stage + bool needsCollectStage = true; + + // TODO: This is a temporary workaround until we have a proper constraints support. + // If result stage has single UnionAll/Merge input, we don't have to build a separate stage // for results collection as it's already in single partition. // Proper check should use partitioning information for results stage via opt constraints. - if (resultStage.Inputs().Size() == 1 && resultStage.Inputs().Item(0).Maybe<TDqCnUnionAll>()) { - collectStage = resultStage; - } else if (resultStage.Inputs().Size() == 1 && resultStage.Inputs().Item(0).Maybe<TDqCnMerge>()) { - collectStage = resultStage; - } else if (resultStage.Inputs().Size() == 1 && resultStage.Inputs().Item(0).Maybe<TDqPhyPrecompute>()) { - collectStage = resultStage; - } else if (resultStage.Inputs().Empty() && IsKqpPureLambda(resultStage.Program())) { - collectStage = resultStage; - } else { + if (resultStage.Inputs().Size() == 1) { + if (resultStage.Inputs().Item(0).Maybe<TDqCnUnionAll>() || + resultStage.Inputs().Item(0).Maybe<TDqCnMerge>()) + { + needsCollectStage = false; + } + } + + // If results stage is marked as single_partition, no collect stage needed. + // Once we have partitioning constraint we should check it instead of stage setting. + auto settings = TDqStageSettings::Parse(resultStage); + if (settings.SinglePartition) { + needsCollectStage = false; + } + + TDqPhyStage collectStage = resultStage; + if (needsCollectStage) { collectStage = Build<TDqPhyStage>(ctx, results.Pos()) .Inputs() .Add(resultConnection) @@ -225,13 +235,12 @@ private: .Settings(NDq::TDqStageSettings::New().BuildNode(ctx, results.Pos())) .Done(); resultIndex = 0; - stages.emplace_back(collectStage.Cast()); + stages.emplace_back(collectStage); } - YQL_ENSURE(collectStage); auto newResult = Build<TDqCnResult>(ctx, results.Pos()) .Output() - .Stage(collectStage.Cast()) + .Stage(collectStage) .Index().Build(ToString(resultIndex)) .Build() .ColumnHints(result.ColumnHints()) diff --git a/ydb/core/kqp/opt/physical/kqp_opt_phy_build_stage.cpp b/ydb/core/kqp/opt/physical/kqp_opt_phy_build_stage.cpp index 7f9a8de2838..37f9c2e9e39 100644 --- a/ydb/core/kqp/opt/physical/kqp_opt_phy_build_stage.cpp +++ b/ydb/core/kqp/opt/physical/kqp_opt_phy_build_stage.cpp @@ -16,6 +16,28 @@ using namespace NYql; using namespace NYql::NDq; using namespace NYql::NNodes; +namespace { + +bool IsSingleKey(const TKqlKeyRange& range, const TKikimrTableMetadata& tableMeta) { + if (range.From().ArgCount() != tableMeta.KeyColumnNames.size()) { + return false; + } + + if (range.To().ArgCount() != tableMeta.KeyColumnNames.size()) { + return false; + } + + for (size_t i = 0; i < tableMeta.KeyColumnNames.size(); ++i) { + if (range.From().Arg(i).Raw() != range.To().Arg(i).Raw()) { + return false; + } + } + + return true; +} + +} // namespace + TMaybeNode<TDqPhyPrecompute> BuildLookupKeysPrecompute(const TExprBase& input, TExprContext& ctx) { TMaybeNode<TDqConnection> precomputeInput; @@ -33,7 +55,9 @@ TMaybeNode<TDqPhyPrecompute> BuildLookupKeysPrecompute(const TExprBase& input, T .Build() .Build() .Build() - .Settings().Build() + .Settings(TDqStageSettings::New() + .SetSinglePartition() + .BuildNode(ctx, input.Pos())) .Done(); precomputeInput = Build<TDqCnValue>(ctx, input.Pos()) @@ -72,7 +96,7 @@ NYql::NNodes::TExprBase ExpandSkipNullMembersForReadTableSource(NYql::NNodes::TE auto source = stage.Inputs().Item(*tableSourceIndex).Cast<TDqSource>(); auto readRangesSource = source.Settings().Cast<TKqpReadRangesSourceSettings>(); auto settings = TKqpReadTableSettings::Parse(readRangesSource.Settings()); - + if (settings.SkipNullKeys.empty()) { return node; } @@ -168,6 +192,7 @@ TExprBase KqpBuildReadTableStage(TExprBase node, TExprContext& ctx, const TKqpOp } bool literalRanges = fromIsLiteral && toIsLiteral; + bool singleKey = IsSingleKey(read.Range(), *tableDesc.Metadata); TVector<TExprBase> inputs; TVector<TCoArgument> programArgs; @@ -186,7 +211,9 @@ TExprBase KqpBuildReadTableStage(TExprBase node, TExprContext& ctx, const TKqpOp .Build() .Build() .Build() - .Settings().Build() + .Settings(TDqStageSettings::New() + .SetSinglePartition() + .BuildNode(ctx, read.Pos())) .Done(); auto precompute = Build<TDqPhyPrecompute>(ctx, read.Pos()) @@ -272,7 +299,9 @@ TExprBase KqpBuildReadTableStage(TExprBase node, TExprContext& ctx, const TKqpOp .Args(programArgs) .Body(phyRead.Cast()) .Build() - .Settings().Build() + .Settings(TDqStageSettings::New() + .SetSinglePartition(singleKey && useSource) + .BuildNode(ctx, read.Pos())) .Done(); return Build<TDqCnUnionAll>(ctx, read.Pos()) @@ -323,8 +352,9 @@ TExprBase KqpBuildReadTableRangesStage(TExprBase node, TExprContext& ctx, .Build() .Build() .Build() - .Settings() - .Build() + .Settings(TDqStageSettings::New() + .SetSinglePartition() + .BuildNode(ctx, read.Pos())) .Done(); } else { auto connections = FindDqConnections(node); @@ -593,7 +623,9 @@ NYql::NNodes::TExprBase KqpBuildStreamLookupTableStages(NYql::NNodes::TExprBase .List(lookup.LookupKeys()) .Build() .Build() - .Settings(TDqStageSettings().BuildNode(ctx, lookup.Pos())) + .Settings(TDqStageSettings::New() + .SetSinglePartition() + .BuildNode(ctx, lookup.Pos())) .Build() .Index().Build("0") .Build() diff --git a/ydb/core/kqp/query_compiler/kqp_query_compiler.cpp b/ydb/core/kqp/query_compiler/kqp_query_compiler.cpp index 812db4e4528..4eb5ff20850 100644 --- a/ydb/core/kqp/query_compiler/kqp_query_compiler.cpp +++ b/ydb/core/kqp/query_compiler/kqp_query_compiler.cpp @@ -692,7 +692,10 @@ private: } stageProto.SetProgramAst(KqpExprToPrettyString(stage.Program(), ctx)); - stageProto.SetStageGuid(NDq::TDqStageSettings::Parse(stage).Id); + + auto stageSettings = NDq::TDqStageSettings::Parse(stage); + stageProto.SetStageGuid(stageSettings.Id); + stageProto.SetIsSinglePartition(stageSettings.SinglePartition); } void CompileTransaction(const TKqpPhysicalTx& tx, NKqpProto::TKqpPhyTx& txProto, TExprContext& ctx) { diff --git a/ydb/core/kqp/query_data/kqp_prepared_query.cpp b/ydb/core/kqp/query_data/kqp_prepared_query.cpp index 3c615c0088d..1366f93cc8f 100644 --- a/ydb/core/kqp/query_data/kqp_prepared_query.cpp +++ b/ydb/core/kqp/query_data/kqp_prepared_query.cpp @@ -16,7 +16,7 @@ using namespace NKikimr::NMiniKQL; namespace { -bool CalcIsPureTx(const NKqpProto::TKqpPhyTx* tx) { +bool CalcIsLiteralTx(const NKqpProto::TKqpPhyTx* tx) { if (tx->GetType() != NKqpProto::TKqpPhyTx::TYPE_COMPUTE) { return false; } @@ -54,7 +54,7 @@ TKqpPhyTxHolder::TKqpPhyTxHolder(const std::shared_ptr<const NKikimrKqp::TPrepar const NKqpProto::TKqpPhyTx* proto, const std::shared_ptr<TPreparedQueryAllocHolder>& alloc) : PreparedQuery(pq) , Proto(proto) - , PureTx(CalcIsPureTx(proto)) + , LiteralTx(CalcIsLiteralTx(proto)) , Alloc(alloc) { TxResultsMeta.resize(Proto->GetResults().size()); @@ -90,8 +90,8 @@ TKqpPhyTxHolder::TKqpPhyTxHolder(const std::shared_ptr<const NKikimrKqp::TPrepar } } -bool TKqpPhyTxHolder::IsPureTx() const { - return PureTx; +bool TKqpPhyTxHolder::IsLiteralTx() const { + return LiteralTx; } const NKikimr::NKqp::TStagePredictor& TKqpPhyTxHolder::GetCalculationPredictor(const size_t stageIdx) const { diff --git a/ydb/core/kqp/query_data/kqp_prepared_query.h b/ydb/core/kqp/query_data/kqp_prepared_query.h index 4705cafa669..e4b71443ee6 100644 --- a/ydb/core/kqp/query_data/kqp_prepared_query.h +++ b/ydb/core/kqp/query_data/kqp_prepared_query.h @@ -34,7 +34,7 @@ struct TPhyTxResultMetadata { class TKqpPhyTxHolder { std::shared_ptr<const NKikimrKqp::TPreparedQuery> PreparedQuery; const NKqpProto::TKqpPhyTx* Proto; - bool PureTx = false; + bool LiteralTx = false; TVector<TPhyTxResultMetadata> TxResultsMeta; std::shared_ptr<TPreparedQueryAllocHolder> Alloc; std::vector<TStagePredictor> Predictors; @@ -92,7 +92,7 @@ public: TKqpPhyTxHolder(const std::shared_ptr<const NKikimrKqp::TPreparedQuery>& pq, const NKqpProto::TKqpPhyTx* proto, const std::shared_ptr<TPreparedQueryAllocHolder>& alloc); - bool IsPureTx() const; + bool IsLiteralTx() const; }; class TPreparedQueryHolder { diff --git a/ydb/core/kqp/session_actor/kqp_session_actor.cpp b/ydb/core/kqp/session_actor/kqp_session_actor.cpp index a651e6401e9..ef0721cc1ff 100644 --- a/ydb/core/kqp/session_actor/kqp_session_actor.cpp +++ b/ydb/core/kqp/session_actor/kqp_session_actor.cpp @@ -949,7 +949,7 @@ public: } - IKqpGateway::TExecPhysicalRequest PreparePureRequest(TKqpQueryState *queryState) { + IKqpGateway::TExecPhysicalRequest PrepareLiteralRequest(TKqpQueryState *queryState) { auto request = PrepareBaseRequest(queryState, queryState->TxCtx->TxAlloc); request.NeedTxId = false; return request; @@ -996,12 +996,12 @@ public: return request; } - IKqpGateway::TExecPhysicalRequest PrepareRequest(const TKqpPhyTxHolder::TConstPtr& tx, bool pure, + IKqpGateway::TExecPhysicalRequest PrepareRequest(const TKqpPhyTxHolder::TConstPtr& tx, bool literal, TKqpQueryState *queryState) { - if (pure) { + if (literal) { YQL_ENSURE(tx); - return PreparePureRequest(QueryState.get()); + return PrepareLiteralRequest(QueryState.get()); } if (!tx) { @@ -1010,7 +1010,6 @@ public: switch (tx->GetType()) { case NKqpProto::TKqpPhyTx::TYPE_COMPUTE: - // TODO: Compute is always pure, should not depend on number of stages. return PreparePhysicalRequest(QueryState.get(), queryState->TxCtx->TxAlloc); case NKqpProto::TKqpPhyTx::TYPE_DATA: return PreparePhysicalRequest(QueryState.get(), queryState->TxCtx->TxAlloc); @@ -1151,10 +1150,22 @@ public: bool ExecutePhyTx(const NKqpProto::TKqpPhyQuery* query, const TKqpPhyTxHolder::TConstPtr& tx, bool commit) { auto& txCtx = *QueryState->TxCtx; - bool pure = tx && tx->IsPureTx(); - auto request = PrepareRequest(tx, pure, QueryState.get()); + bool literal = tx && tx->IsLiteralTx(); - LOG_D("ExecutePhyTx, tx: " << (void*)tx.get() << " pure: " << pure << " commit: " << commit + if (commit) { + if (txCtx.TxHasEffects() || txCtx.Locks.HasLocks() || txCtx.TopicOperations.HasOperations()) { + // Cannot perform commit in literal execution + literal = false; + } else if (!tx) { + // Commit is no-op + ReplySuccess(); + return true; + } + } + + auto request = PrepareRequest(tx, literal, QueryState.get()); + + LOG_D("ExecutePhyTx, tx: " << (void*)tx.get() << " literal: " << literal << " commit: " << commit << " txCtx.DeferredEffects.size(): " << txCtx.DeferredEffects.Size()); if (!CheckTopicOperations()) { @@ -1178,19 +1189,14 @@ public: txCtx.HasImmediateEffects = txCtx.HasImmediateEffects || tx->GetHasEffects(); } else { YQL_ENSURE(commit); - - if (!txCtx.TxHasEffects() && !txCtx.Locks.HasLocks() && !txCtx.TopicOperations.HasOperations()) { - ReplySuccess(); - return true; - } } - if (pure) { + if (literal) { if (QueryState) { request.Orbit = std::move(QueryState->Orbit); } request.TraceId = QueryState ? QueryState->KqpSessionSpan.GetTraceId() : NWilson::TTraceId(); - auto response = ExecutePure(std::move(request), RequestCounters, SelfId()); + auto response = ExecuteLiteral(std::move(request), RequestCounters, SelfId()); ++QueryState->CurrentTx; ProcessExecuterResult(response.get()); return true; diff --git a/ydb/core/kqp/ut/perf/kqp_query_perf_ut.cpp b/ydb/core/kqp/ut/perf/kqp_query_perf_ut.cpp index 7c8bd7726f4..34dd6cd967c 100644 --- a/ydb/core/kqp/ut/perf/kqp_query_perf_ut.cpp +++ b/ydb/core/kqp/ut/perf/kqp_query_perf_ut.cpp @@ -158,14 +158,14 @@ Y_UNIT_TEST_SUITE(KqpQueryPerf) { NJson::ReadJsonTree(stats.query_plan(), &plan, true); auto stages = FindPlanStages(plan); - UNIT_ASSERT_VALUES_EQUAL(stages.size(), 2); + UNIT_ASSERT_VALUES_EQUAL(stages.size(), EnableSourceRead ? 1 : 2); i64 totalTasks = 0; for (const auto& stage : stages) { totalTasks += stage.GetMapSafe().at("Stats").GetMapSafe().at("TotalTasks").GetIntegerSafe(); } - - UNIT_ASSERT_VALUES_EQUAL(totalTasks, 2); + + UNIT_ASSERT_VALUES_EQUAL(totalTasks, EnableSourceRead ? 1 : 2); } Y_UNIT_TEST_TWIN(RangeLimitRead, EnableSourceRead) { diff --git a/ydb/core/protos/kqp_physical.proto b/ydb/core/protos/kqp_physical.proto index b2598b4e227..1a593cbf3b0 100644 --- a/ydb/core/protos/kqp_physical.proto +++ b/ydb/core/protos/kqp_physical.proto @@ -299,6 +299,7 @@ message TKqpPhyStage { bool IsEffectsStage = 7; string StageGuid = 8; repeated TKqpSource Sources = 9; + bool IsSinglePartition = 10; } message TKqpPhyResult { diff --git a/ydb/library/yql/dq/opt/dq_opt.h b/ydb/library/yql/dq/opt/dq_opt.h index 3cb3566a2ea..a659a7ddab0 100644 --- a/ydb/library/yql/dq/opt/dq_opt.h +++ b/ydb/library/yql/dq/opt/dq_opt.h @@ -17,6 +17,8 @@ struct TDqStageSettings { TString Id; bool SinglePartition = false; + TDqStageSettings& SetSinglePartition(bool value = true) { SinglePartition = value; return *this; } + static TDqStageSettings New(const NNodes::TDqStageBase& node); static TDqStageSettings New() { diff --git a/ydb/library/yql/dq/opt/dq_opt_phy.cpp b/ydb/library/yql/dq/opt/dq_opt_phy.cpp index 65d3ad30ae3..c3f43485571 100644 --- a/ydb/library/yql/dq/opt/dq_opt_phy.cpp +++ b/ydb/library/yql/dq/opt/dq_opt_phy.cpp @@ -748,7 +748,9 @@ TExprBase DqBuildPureFlatmapStage(TExprBase node, TExprContext& ctx) { .List(flatmap.Input()) .Build() .Build() - .Settings(TDqStageSettings().BuildNode(ctx, flatmap.Input().Pos())) + .Settings(TDqStageSettings::New() + .SetSinglePartition() + .BuildNode(ctx, flatmap.Input().Pos())) .Done(); auto inputConnection = Build<TDqCnUnionAll>(ctx, flatmap.Pos()) @@ -2017,7 +2019,9 @@ TExprBase DqBuildPureExprStage(TExprBase node, TExprContext& ctx) { .Input(node) .Build() .Build() - .Settings(TDqStageSettings().BuildNode(ctx, node.Pos())) + .Settings(TDqStageSettings::New() + .SetSinglePartition() + .BuildNode(ctx, node.Pos())) .Done(); return Build<TDqCnUnionAll>(ctx, node.Pos()) diff --git a/ydb/library/yql/providers/dq/planner/execution_planner.cpp b/ydb/library/yql/providers/dq/planner/execution_planner.cpp index 93671746fdc..b4b1a46df66 100644 --- a/ydb/library/yql/providers/dq/planner/execution_planner.cpp +++ b/ydb/library/yql/providers/dq/planner/execution_planner.cpp @@ -236,6 +236,11 @@ namespace NYql::NDqs { for (const auto& stage : stages) { auto& stageInfo = TasksGraph.GetStageInfo(stage); YQL_ENSURE(!stageInfo.Tasks.empty()); + + auto stageSettings = NDq::TDqStageSettings::Parse(stage); + if (stageSettings.SinglePartition) { + YQL_ENSURE(stageInfo.Tasks.size() == 1, "Unexpected multiple tasks in single-partition stage"); + } } TMaybeNode<TDqPhyStage> finalStage; diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_explain.script-script_/explain.script.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_explain.script-script_/explain.script.plan index 1370b00ffd0..aa9259e3f4b 100644 --- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_explain.script-script_/explain.script.plan +++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_explain.script-script_/explain.script.plan @@ -128,31 +128,18 @@ "Plan": { "Plans": [ { - "PlanNodeId": 9, + "PlanNodeId": 7, "Plans": [ { - "PlanNodeId": 8, - "Plans": [ + "PlanNodeId": 6, + "Operators": [ { - "PlanNodeId": 7, - "Plans": [ - { - "PlanNodeId": 6, - "Operators": [ - { - "Iterator": "%kqp%tx_result_binding_0_0", - "Name": "Iterator" - } - ], - "Node Type": "ConstantExpr", - "CTE Name": "tx_result_binding_1_0" - } - ], - "Node Type": "UnionAll", - "PlanNodeType": "Connection" + "Iterator": "%kqp%tx_result_binding_0_0", + "Name": "Iterator" } ], - "Node Type": "Collect" + "Node Type": "ConstantExpr", + "CTE Name": "tx_result_binding_1_0" } ], "Node Type": "ResultSet_1", @@ -307,31 +294,18 @@ "Plan": { "Plans": [ { - "PlanNodeId": 9, + "PlanNodeId": 7, "Plans": [ { - "PlanNodeId": 8, - "Plans": [ + "PlanNodeId": 6, + "Operators": [ { - "PlanNodeId": 7, - "Plans": [ - { - "PlanNodeId": 6, - "Operators": [ - { - "Iterator": "%kqp%tx_result_binding_0_0", - "Name": "Iterator" - } - ], - "Node Type": "ConstantExpr", - "CTE Name": "tx_result_binding_1_0" - } - ], - "Node Type": "UnionAll", - "PlanNodeType": "Connection" + "Iterator": "%kqp%tx_result_binding_0_0", + "Name": "Iterator" } ], - "Node Type": "Collect" + "Node Type": "ConstantExpr", + "CTE Name": "tx_result_binding_1_0" } ], "Node Type": "ResultSet_1", diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-0 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-0 index 4c1370e0536..eb6a2ce7eff 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-0 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-0 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 9, + "PlanNodeId": 7, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 8, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 7, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "%kqp%tx_result_binding_0_0", - "Name": "Iterator" - } - ], - "PlanNodeId": 6 - } - ] + "Iterator": "%kqp%tx_result_binding_0_0", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 6 } ] }, diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-1 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-1 index 10f08a15413..dfebd585333 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-1 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-1 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 9, + "PlanNodeId": 7, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 8, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 7, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "%kqp%tx_result_binding_0_0", - "Name": "Iterator" - } - ], - "PlanNodeId": 6 - } - ] + "Iterator": "%kqp%tx_result_binding_0_0", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 6 } ] }, diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-2 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-2 index a685e3b9307..2363b5d913a 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-2 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-2 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 9, + "PlanNodeId": 7, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 8, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 7, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "[{column0: %kqp%tx_result_binding_0_0.Sum0,column1: %kqp%tx_result_binding_0_0.Count0,column2: %kqp%tx_result_binding_0_0.Avg0}]", - "Name": "Iterator" - } - ], - "PlanNodeId": 6 - } - ] + "Iterator": "[{column0: %kqp%tx_result_binding_0_0.Sum0,column1: %kqp%tx_result_binding_0_0.Count0,column2: %kqp%tx_result_binding_0_0.Avg0}]", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 6 } ] }, diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-20 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-20 index 8e6f9af5f02..5c14a9d69a0 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-20 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-20 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 9, + "PlanNodeId": 7, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 8, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 7, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "%kqp%tx_result_binding_0_0", - "Name": "Iterator" - } - ], - "PlanNodeId": 6 - } - ] + "Iterator": "%kqp%tx_result_binding_0_0", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 6 } ] }, diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-29 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-29 index 898da2804fd..adf49d4bfb3 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-29 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-29 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 9, + "PlanNodeId": 7, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 8, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 7, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "[{column0: %kqp%tx_result_binding_0_0.Sum0,column1: %kqp%tx_result_binding_0_0.Sum1,column10: %kqp%tx_result_binding_0_0.Sum10,column11: %kqp%tx_result_binding_0_0.Sum11,column12: %kqp%tx_result_binding_0_0.Sum12,column13: %kqp%tx_result_binding_0_0.Sum13,column14: %kqp%tx_result_binding_0_0.Sum14,column15: %kqp%tx_result_binding_0_0.Sum15,column16: %kqp%tx_result_binding_0_0.Sum16,column17: %kqp%tx_result_binding_0_0.Sum17,column18: %kqp%tx_result_binding_0_0.Sum18,column19: %kqp%tx_result_binding_0_0.Sum19,column2: %kqp%tx_result_binding_0_0.Sum2,column20: %kqp%tx_result_binding_0_0.Sum20,column21: %kqp%tx_result_binding_0_0.Sum21,column22: %kqp%tx_result_binding_0_0.Sum22,column23: %kqp%tx_result_binding_0_0.Sum23,column24: %kqp%tx_result_binding_0_0.Sum24,column25: %kqp%tx_result_binding_0_0.Sum25,column26: %kqp%tx_result_binding_0_0.Sum26,column27: %kqp%tx_result_binding_0_0.Sum27,column28: %kqp%tx_result_binding_0_0.Sum28,column29: %kqp%tx_result_binding_0_0.Sum29,column3: %kqp%tx_result_binding_0_0.Sum3,column30: %kqp%tx_result_binding_0_0.Sum30,column31: %kqp%tx_result_binding_0_0.Sum31,column32: %kqp%tx_result_binding_0_0.Sum32,column33: %kqp%tx_result_binding_0_0.Sum33,column34: %kqp%tx_result_binding_0_0.Sum34,column35: %kqp%tx_result_binding_0_0.Sum35,column36: %kqp%tx_result_binding_0_0.Sum36,column37: %kqp%tx_result_binding_0_0.Sum37,column38: %kqp%tx_result_binding_0_0.Sum38,column39: %kqp%tx_result_binding_0_0.Sum39,column4: %kqp%tx_result_binding_0_0.Sum4,column40: %kqp%tx_result_binding_0_0.Sum40,column41: %kqp%tx_result_binding_0_0.Sum41,column42: %kqp%tx_result_binding_0_0.Sum42,column43: %kqp%tx_result_binding_0_0.Sum43,column44: %kqp%tx_result_binding_0_0.Sum44,column45: %kqp%tx_result_binding_0_0.Sum45,column46: %kqp%tx_result_binding_0_0.Sum46,column47: %kqp%tx_result_binding_0_0.Sum47,column48: %kqp%tx_result_binding_0_0.Sum48,column49: %kqp%tx_result_binding_0_0.Sum49,column5: %kqp%tx_result_binding_0_0.Sum5,column50: %kqp%tx_result_binding_0_0.Sum50,column51: %kqp%tx_result_binding_0_0.Sum51,column52: %kqp%tx_result_binding_0_0.Sum52,column53: %kqp%tx_result_binding_0_0.Sum53,column54: %kqp%tx_result_binding_0_0.Sum54,column55: %kqp%tx_result_binding_0_0.Sum55,column56: %kqp%tx_result_binding_0_0.Sum56,column57: %kqp%tx_result_binding_0_0.Sum57,column58: %kqp%tx_result_binding_0_0.Sum58,column59: %kqp%tx_result_binding_0_0.Sum59,column6: %kqp%tx_result_binding_0_0.Sum6,column60: %kqp%tx_result_binding_0_0.Sum60,column61: %kqp%tx_result_binding_0_0.Sum61,column62: %kqp%tx_result_binding_0_0.Sum62,column63: %kqp%tx_result_binding_0_0.Sum63,column64: %kqp%tx_result_binding_0_0.Sum64,column65: %kqp%tx_result_binding_0_0.Sum65,column66: %kqp%tx_result_binding_0_0.Sum66,column67: %kqp%tx_result_binding_0_0.Sum67,column68: %kqp%tx_result_binding_0_0.Sum68,column69: %kqp%tx_result_binding_0_0.Sum69,column7: %kqp%tx_result_binding_0_0.Sum7,column70: %kqp%tx_result_binding_0_0.Sum70,column71: %kqp%tx_result_binding_0_0.Sum71,column72: %kqp%tx_result_binding_0_0.Sum72,column73: %kqp%tx_result_binding_0_0.Sum73,column74: %kqp%tx_result_binding_0_0.Sum74,column75: %kqp%tx_result_binding_0_0.Sum75,column76: %kqp%tx_result_binding_0_0.Sum76,column77: %kqp%tx_result_binding_0_0.Sum77,column78: %kqp%tx_result_binding_0_0.Sum78,column79: %kqp%tx_result_binding_0_0.Sum79,column8: %kqp%tx_result_binding_0_0.Sum8,column80: %kqp%tx_result_binding_0_0.Sum80,column81: %kqp%tx_result_binding_0_0.Sum81,column82: %kqp%tx_result_binding_0_0.Sum82,column83: %kqp%tx_result_binding_0_0.Sum83,column84: %kqp%tx_result_binding_0_0.Sum84,column85: %kqp%tx_result_binding_0_0.Sum85,column86: %kqp%tx_result_binding_0_0.Sum86,column87: %kqp%tx_result_binding_0_0.Sum87,column88: %kqp%tx_result_binding_0_0.Sum88,column89: %kqp%tx_result_binding_0_0.Sum89,column9: %kqp%tx_result_binding_0_0.Sum9}]", - "Name": "Iterator" - } - ], - "PlanNodeId": 6 - } - ] + "Iterator": "[{column0: %kqp%tx_result_binding_0_0.Sum0,column1: %kqp%tx_result_binding_0_0.Sum1,column10: %kqp%tx_result_binding_0_0.Sum10,column11: %kqp%tx_result_binding_0_0.Sum11,column12: %kqp%tx_result_binding_0_0.Sum12,column13: %kqp%tx_result_binding_0_0.Sum13,column14: %kqp%tx_result_binding_0_0.Sum14,column15: %kqp%tx_result_binding_0_0.Sum15,column16: %kqp%tx_result_binding_0_0.Sum16,column17: %kqp%tx_result_binding_0_0.Sum17,column18: %kqp%tx_result_binding_0_0.Sum18,column19: %kqp%tx_result_binding_0_0.Sum19,column2: %kqp%tx_result_binding_0_0.Sum2,column20: %kqp%tx_result_binding_0_0.Sum20,column21: %kqp%tx_result_binding_0_0.Sum21,column22: %kqp%tx_result_binding_0_0.Sum22,column23: %kqp%tx_result_binding_0_0.Sum23,column24: %kqp%tx_result_binding_0_0.Sum24,column25: %kqp%tx_result_binding_0_0.Sum25,column26: %kqp%tx_result_binding_0_0.Sum26,column27: %kqp%tx_result_binding_0_0.Sum27,column28: %kqp%tx_result_binding_0_0.Sum28,column29: %kqp%tx_result_binding_0_0.Sum29,column3: %kqp%tx_result_binding_0_0.Sum3,column30: %kqp%tx_result_binding_0_0.Sum30,column31: %kqp%tx_result_binding_0_0.Sum31,column32: %kqp%tx_result_binding_0_0.Sum32,column33: %kqp%tx_result_binding_0_0.Sum33,column34: %kqp%tx_result_binding_0_0.Sum34,column35: %kqp%tx_result_binding_0_0.Sum35,column36: %kqp%tx_result_binding_0_0.Sum36,column37: %kqp%tx_result_binding_0_0.Sum37,column38: %kqp%tx_result_binding_0_0.Sum38,column39: %kqp%tx_result_binding_0_0.Sum39,column4: %kqp%tx_result_binding_0_0.Sum4,column40: %kqp%tx_result_binding_0_0.Sum40,column41: %kqp%tx_result_binding_0_0.Sum41,column42: %kqp%tx_result_binding_0_0.Sum42,column43: %kqp%tx_result_binding_0_0.Sum43,column44: %kqp%tx_result_binding_0_0.Sum44,column45: %kqp%tx_result_binding_0_0.Sum45,column46: %kqp%tx_result_binding_0_0.Sum46,column47: %kqp%tx_result_binding_0_0.Sum47,column48: %kqp%tx_result_binding_0_0.Sum48,column49: %kqp%tx_result_binding_0_0.Sum49,column5: %kqp%tx_result_binding_0_0.Sum5,column50: %kqp%tx_result_binding_0_0.Sum50,column51: %kqp%tx_result_binding_0_0.Sum51,column52: %kqp%tx_result_binding_0_0.Sum52,column53: %kqp%tx_result_binding_0_0.Sum53,column54: %kqp%tx_result_binding_0_0.Sum54,column55: %kqp%tx_result_binding_0_0.Sum55,column56: %kqp%tx_result_binding_0_0.Sum56,column57: %kqp%tx_result_binding_0_0.Sum57,column58: %kqp%tx_result_binding_0_0.Sum58,column59: %kqp%tx_result_binding_0_0.Sum59,column6: %kqp%tx_result_binding_0_0.Sum6,column60: %kqp%tx_result_binding_0_0.Sum60,column61: %kqp%tx_result_binding_0_0.Sum61,column62: %kqp%tx_result_binding_0_0.Sum62,column63: %kqp%tx_result_binding_0_0.Sum63,column64: %kqp%tx_result_binding_0_0.Sum64,column65: %kqp%tx_result_binding_0_0.Sum65,column66: %kqp%tx_result_binding_0_0.Sum66,column67: %kqp%tx_result_binding_0_0.Sum67,column68: %kqp%tx_result_binding_0_0.Sum68,column69: %kqp%tx_result_binding_0_0.Sum69,column7: %kqp%tx_result_binding_0_0.Sum7,column70: %kqp%tx_result_binding_0_0.Sum70,column71: %kqp%tx_result_binding_0_0.Sum71,column72: %kqp%tx_result_binding_0_0.Sum72,column73: %kqp%tx_result_binding_0_0.Sum73,column74: %kqp%tx_result_binding_0_0.Sum74,column75: %kqp%tx_result_binding_0_0.Sum75,column76: %kqp%tx_result_binding_0_0.Sum76,column77: %kqp%tx_result_binding_0_0.Sum77,column78: %kqp%tx_result_binding_0_0.Sum78,column79: %kqp%tx_result_binding_0_0.Sum79,column8: %kqp%tx_result_binding_0_0.Sum8,column80: %kqp%tx_result_binding_0_0.Sum80,column81: %kqp%tx_result_binding_0_0.Sum81,column82: %kqp%tx_result_binding_0_0.Sum82,column83: %kqp%tx_result_binding_0_0.Sum83,column84: %kqp%tx_result_binding_0_0.Sum84,column85: %kqp%tx_result_binding_0_0.Sum85,column86: %kqp%tx_result_binding_0_0.Sum86,column87: %kqp%tx_result_binding_0_0.Sum87,column88: %kqp%tx_result_binding_0_0.Sum88,column89: %kqp%tx_result_binding_0_0.Sum89,column9: %kqp%tx_result_binding_0_0.Sum9}]", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 6 } ] }, diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-3 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-3 index 5b7af7f4115..56491954fbd 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-3 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-3 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 9, + "PlanNodeId": 7, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 8, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 7, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "%kqp%tx_result_binding_0_0", - "Name": "Iterator" - } - ], - "PlanNodeId": 6 - } - ] + "Iterator": "%kqp%tx_result_binding_0_0", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 6 } ] }, diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-4 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-4 index a24418752e3..be36db784fc 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-4 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-4 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 11, + "PlanNodeId": 9, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 10, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 9, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "%kqp%tx_result_binding_0_0", - "Name": "Iterator" - } - ], - "PlanNodeId": 8 - } - ] + "Iterator": "%kqp%tx_result_binding_0_0", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 8 } ] }, diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-5 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-5 index 488aafcbb23..de3ed3a0a64 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-5 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-5 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 11, + "PlanNodeId": 9, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 10, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 9, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "%kqp%tx_result_binding_0_0", - "Name": "Iterator" - } - ], - "PlanNodeId": 8 - } - ] + "Iterator": "%kqp%tx_result_binding_0_0", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 8 } ] }, diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-6 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-6 index 16106bf9c78..a9d6e53549a 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-6 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-6 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 9, + "PlanNodeId": 7, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 8, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 7, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "[{column0: %kqp%tx_result_binding_0_0.Min0,column1: %kqp%tx_result_binding_0_0.Max0}]", - "Name": "Iterator" - } - ], - "PlanNodeId": 6 - } - ] + "Iterator": "[{column0: %kqp%tx_result_binding_0_0.Min0,column1: %kqp%tx_result_binding_0_0.Max0}]", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 6 } ] }, diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-0 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-0 index 7b57773072d..dd1874964cb 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-0 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-0 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 9, + "PlanNodeId": 7, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 8, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 7, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "%kqp%tx_result_binding_0_0", - "Name": "Iterator" - } - ], - "PlanNodeId": 6 - } - ] + "Iterator": "%kqp%tx_result_binding_0_0", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 6 } ] }, diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-1 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-1 index e466d4319b1..24d9104792a 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-1 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-1 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 9, + "PlanNodeId": 7, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 8, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 7, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "%kqp%tx_result_binding_0_0", - "Name": "Iterator" - } - ], - "PlanNodeId": 6 - } - ] + "Iterator": "%kqp%tx_result_binding_0_0", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 6 } ] }, diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-2 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-2 index 108b593d618..a3d9caa3bdf 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-2 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-2 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 9, + "PlanNodeId": 7, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 8, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 7, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "[{column0: %kqp%tx_result_binding_0_0.Sum0,column1: %kqp%tx_result_binding_0_0.Count0,column2: %kqp%tx_result_binding_0_0.Avg0}]", - "Name": "Iterator" - } - ], - "PlanNodeId": 6 - } - ] + "Iterator": "[{column0: %kqp%tx_result_binding_0_0.Sum0,column1: %kqp%tx_result_binding_0_0.Count0,column2: %kqp%tx_result_binding_0_0.Avg0}]", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 6 } ] }, diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-20 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-20 index c532917f610..1572d104491 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-20 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-20 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 9, + "PlanNodeId": 7, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 8, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 7, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "%kqp%tx_result_binding_0_0", - "Name": "Iterator" - } - ], - "PlanNodeId": 6 - } - ] + "Iterator": "%kqp%tx_result_binding_0_0", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 6 } ] }, diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-29 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-29 index 30974dc0895..08fd7ef1598 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-29 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-29 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 9, + "PlanNodeId": 7, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 8, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 7, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "[{column0: %kqp%tx_result_binding_0_0.Sum0,column1: %kqp%tx_result_binding_0_0.Sum1,column10: %kqp%tx_result_binding_0_0.Sum10,column11: %kqp%tx_result_binding_0_0.Sum11,column12: %kqp%tx_result_binding_0_0.Sum12,column13: %kqp%tx_result_binding_0_0.Sum13,column14: %kqp%tx_result_binding_0_0.Sum14,column15: %kqp%tx_result_binding_0_0.Sum15,column16: %kqp%tx_result_binding_0_0.Sum16,column17: %kqp%tx_result_binding_0_0.Sum17,column18: %kqp%tx_result_binding_0_0.Sum18,column19: %kqp%tx_result_binding_0_0.Sum19,column2: %kqp%tx_result_binding_0_0.Sum2,column20: %kqp%tx_result_binding_0_0.Sum20,column21: %kqp%tx_result_binding_0_0.Sum21,column22: %kqp%tx_result_binding_0_0.Sum22,column23: %kqp%tx_result_binding_0_0.Sum23,column24: %kqp%tx_result_binding_0_0.Sum24,column25: %kqp%tx_result_binding_0_0.Sum25,column26: %kqp%tx_result_binding_0_0.Sum26,column27: %kqp%tx_result_binding_0_0.Sum27,column28: %kqp%tx_result_binding_0_0.Sum28,column29: %kqp%tx_result_binding_0_0.Sum29,column3: %kqp%tx_result_binding_0_0.Sum3,column30: %kqp%tx_result_binding_0_0.Sum30,column31: %kqp%tx_result_binding_0_0.Sum31,column32: %kqp%tx_result_binding_0_0.Sum32,column33: %kqp%tx_result_binding_0_0.Sum33,column34: %kqp%tx_result_binding_0_0.Sum34,column35: %kqp%tx_result_binding_0_0.Sum35,column36: %kqp%tx_result_binding_0_0.Sum36,column37: %kqp%tx_result_binding_0_0.Sum37,column38: %kqp%tx_result_binding_0_0.Sum38,column39: %kqp%tx_result_binding_0_0.Sum39,column4: %kqp%tx_result_binding_0_0.Sum4,column40: %kqp%tx_result_binding_0_0.Sum40,column41: %kqp%tx_result_binding_0_0.Sum41,column42: %kqp%tx_result_binding_0_0.Sum42,column43: %kqp%tx_result_binding_0_0.Sum43,column44: %kqp%tx_result_binding_0_0.Sum44,column45: %kqp%tx_result_binding_0_0.Sum45,column46: %kqp%tx_result_binding_0_0.Sum46,column47: %kqp%tx_result_binding_0_0.Sum47,column48: %kqp%tx_result_binding_0_0.Sum48,column49: %kqp%tx_result_binding_0_0.Sum49,column5: %kqp%tx_result_binding_0_0.Sum5,column50: %kqp%tx_result_binding_0_0.Sum50,column51: %kqp%tx_result_binding_0_0.Sum51,column52: %kqp%tx_result_binding_0_0.Sum52,column53: %kqp%tx_result_binding_0_0.Sum53,column54: %kqp%tx_result_binding_0_0.Sum54,column55: %kqp%tx_result_binding_0_0.Sum55,column56: %kqp%tx_result_binding_0_0.Sum56,column57: %kqp%tx_result_binding_0_0.Sum57,column58: %kqp%tx_result_binding_0_0.Sum58,column59: %kqp%tx_result_binding_0_0.Sum59,column6: %kqp%tx_result_binding_0_0.Sum6,column60: %kqp%tx_result_binding_0_0.Sum60,column61: %kqp%tx_result_binding_0_0.Sum61,column62: %kqp%tx_result_binding_0_0.Sum62,column63: %kqp%tx_result_binding_0_0.Sum63,column64: %kqp%tx_result_binding_0_0.Sum64,column65: %kqp%tx_result_binding_0_0.Sum65,column66: %kqp%tx_result_binding_0_0.Sum66,column67: %kqp%tx_result_binding_0_0.Sum67,column68: %kqp%tx_result_binding_0_0.Sum68,column69: %kqp%tx_result_binding_0_0.Sum69,column7: %kqp%tx_result_binding_0_0.Sum7,column70: %kqp%tx_result_binding_0_0.Sum70,column71: %kqp%tx_result_binding_0_0.Sum71,column72: %kqp%tx_result_binding_0_0.Sum72,column73: %kqp%tx_result_binding_0_0.Sum73,column74: %kqp%tx_result_binding_0_0.Sum74,column75: %kqp%tx_result_binding_0_0.Sum75,column76: %kqp%tx_result_binding_0_0.Sum76,column77: %kqp%tx_result_binding_0_0.Sum77,column78: %kqp%tx_result_binding_0_0.Sum78,column79: %kqp%tx_result_binding_0_0.Sum79,column8: %kqp%tx_result_binding_0_0.Sum8,column80: %kqp%tx_result_binding_0_0.Sum80,column81: %kqp%tx_result_binding_0_0.Sum81,column82: %kqp%tx_result_binding_0_0.Sum82,column83: %kqp%tx_result_binding_0_0.Sum83,column84: %kqp%tx_result_binding_0_0.Sum84,column85: %kqp%tx_result_binding_0_0.Sum85,column86: %kqp%tx_result_binding_0_0.Sum86,column87: %kqp%tx_result_binding_0_0.Sum87,column88: %kqp%tx_result_binding_0_0.Sum88,column89: %kqp%tx_result_binding_0_0.Sum89,column9: %kqp%tx_result_binding_0_0.Sum9}]", - "Name": "Iterator" - } - ], - "PlanNodeId": 6 - } - ] + "Iterator": "[{column0: %kqp%tx_result_binding_0_0.Sum0,column1: %kqp%tx_result_binding_0_0.Sum1,column10: %kqp%tx_result_binding_0_0.Sum10,column11: %kqp%tx_result_binding_0_0.Sum11,column12: %kqp%tx_result_binding_0_0.Sum12,column13: %kqp%tx_result_binding_0_0.Sum13,column14: %kqp%tx_result_binding_0_0.Sum14,column15: %kqp%tx_result_binding_0_0.Sum15,column16: %kqp%tx_result_binding_0_0.Sum16,column17: %kqp%tx_result_binding_0_0.Sum17,column18: %kqp%tx_result_binding_0_0.Sum18,column19: %kqp%tx_result_binding_0_0.Sum19,column2: %kqp%tx_result_binding_0_0.Sum2,column20: %kqp%tx_result_binding_0_0.Sum20,column21: %kqp%tx_result_binding_0_0.Sum21,column22: %kqp%tx_result_binding_0_0.Sum22,column23: %kqp%tx_result_binding_0_0.Sum23,column24: %kqp%tx_result_binding_0_0.Sum24,column25: %kqp%tx_result_binding_0_0.Sum25,column26: %kqp%tx_result_binding_0_0.Sum26,column27: %kqp%tx_result_binding_0_0.Sum27,column28: %kqp%tx_result_binding_0_0.Sum28,column29: %kqp%tx_result_binding_0_0.Sum29,column3: %kqp%tx_result_binding_0_0.Sum3,column30: %kqp%tx_result_binding_0_0.Sum30,column31: %kqp%tx_result_binding_0_0.Sum31,column32: %kqp%tx_result_binding_0_0.Sum32,column33: %kqp%tx_result_binding_0_0.Sum33,column34: %kqp%tx_result_binding_0_0.Sum34,column35: %kqp%tx_result_binding_0_0.Sum35,column36: %kqp%tx_result_binding_0_0.Sum36,column37: %kqp%tx_result_binding_0_0.Sum37,column38: %kqp%tx_result_binding_0_0.Sum38,column39: %kqp%tx_result_binding_0_0.Sum39,column4: %kqp%tx_result_binding_0_0.Sum4,column40: %kqp%tx_result_binding_0_0.Sum40,column41: %kqp%tx_result_binding_0_0.Sum41,column42: %kqp%tx_result_binding_0_0.Sum42,column43: %kqp%tx_result_binding_0_0.Sum43,column44: %kqp%tx_result_binding_0_0.Sum44,column45: %kqp%tx_result_binding_0_0.Sum45,column46: %kqp%tx_result_binding_0_0.Sum46,column47: %kqp%tx_result_binding_0_0.Sum47,column48: %kqp%tx_result_binding_0_0.Sum48,column49: %kqp%tx_result_binding_0_0.Sum49,column5: %kqp%tx_result_binding_0_0.Sum5,column50: %kqp%tx_result_binding_0_0.Sum50,column51: %kqp%tx_result_binding_0_0.Sum51,column52: %kqp%tx_result_binding_0_0.Sum52,column53: %kqp%tx_result_binding_0_0.Sum53,column54: %kqp%tx_result_binding_0_0.Sum54,column55: %kqp%tx_result_binding_0_0.Sum55,column56: %kqp%tx_result_binding_0_0.Sum56,column57: %kqp%tx_result_binding_0_0.Sum57,column58: %kqp%tx_result_binding_0_0.Sum58,column59: %kqp%tx_result_binding_0_0.Sum59,column6: %kqp%tx_result_binding_0_0.Sum6,column60: %kqp%tx_result_binding_0_0.Sum60,column61: %kqp%tx_result_binding_0_0.Sum61,column62: %kqp%tx_result_binding_0_0.Sum62,column63: %kqp%tx_result_binding_0_0.Sum63,column64: %kqp%tx_result_binding_0_0.Sum64,column65: %kqp%tx_result_binding_0_0.Sum65,column66: %kqp%tx_result_binding_0_0.Sum66,column67: %kqp%tx_result_binding_0_0.Sum67,column68: %kqp%tx_result_binding_0_0.Sum68,column69: %kqp%tx_result_binding_0_0.Sum69,column7: %kqp%tx_result_binding_0_0.Sum7,column70: %kqp%tx_result_binding_0_0.Sum70,column71: %kqp%tx_result_binding_0_0.Sum71,column72: %kqp%tx_result_binding_0_0.Sum72,column73: %kqp%tx_result_binding_0_0.Sum73,column74: %kqp%tx_result_binding_0_0.Sum74,column75: %kqp%tx_result_binding_0_0.Sum75,column76: %kqp%tx_result_binding_0_0.Sum76,column77: %kqp%tx_result_binding_0_0.Sum77,column78: %kqp%tx_result_binding_0_0.Sum78,column79: %kqp%tx_result_binding_0_0.Sum79,column8: %kqp%tx_result_binding_0_0.Sum8,column80: %kqp%tx_result_binding_0_0.Sum80,column81: %kqp%tx_result_binding_0_0.Sum81,column82: %kqp%tx_result_binding_0_0.Sum82,column83: %kqp%tx_result_binding_0_0.Sum83,column84: %kqp%tx_result_binding_0_0.Sum84,column85: %kqp%tx_result_binding_0_0.Sum85,column86: %kqp%tx_result_binding_0_0.Sum86,column87: %kqp%tx_result_binding_0_0.Sum87,column88: %kqp%tx_result_binding_0_0.Sum88,column89: %kqp%tx_result_binding_0_0.Sum89,column9: %kqp%tx_result_binding_0_0.Sum9}]", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 6 } ] }, diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-3 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-3 index 4fae85642c2..87d2fbc2dfe 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-3 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-3 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 9, + "PlanNodeId": 7, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 8, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 7, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "%kqp%tx_result_binding_0_0", - "Name": "Iterator" - } - ], - "PlanNodeId": 6 - } - ] + "Iterator": "%kqp%tx_result_binding_0_0", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 6 } ] }, diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-4 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-4 index a81b2241096..8a7f1b5ad9a 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-4 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-4 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 11, + "PlanNodeId": 9, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 10, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 9, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "%kqp%tx_result_binding_0_0", - "Name": "Iterator" - } - ], - "PlanNodeId": 8 - } - ] + "Iterator": "%kqp%tx_result_binding_0_0", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 8 } ] }, diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-5 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-5 index fd66be3ad84..a8a893a2376 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-5 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-5 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 11, + "PlanNodeId": 9, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 10, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 9, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "%kqp%tx_result_binding_0_0", - "Name": "Iterator" - } - ], - "PlanNodeId": 8 - } - ] + "Iterator": "%kqp%tx_result_binding_0_0", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 8 } ] }, diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-6 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-6 index 99efa65e582..4976e9eeffe 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-6 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-6 @@ -11,32 +11,19 @@ "Plans": [ { "Node Type": "ResultSet_1", - "PlanNodeId": 9, + "PlanNodeId": 7, "PlanNodeType": "ResultSet", "Plans": [ { - "Node Type": "Collect", - "PlanNodeId": 8, - "Plans": [ + "CTE Name": "tx_result_binding_1_0", + "Node Type": "ConstantExpr", + "Operators": [ { - "Node Type": "UnionAll", - "PlanNodeId": 7, - "PlanNodeType": "Connection", - "Plans": [ - { - "CTE Name": "tx_result_binding_1_0", - "Node Type": "ConstantExpr", - "Operators": [ - { - "Iterator": "[{column0: %kqp%tx_result_binding_0_0.Min0,column1: %kqp%tx_result_binding_0_0.Max0}]", - "Name": "Iterator" - } - ], - "PlanNodeId": 6 - } - ] + "Iterator": "[{column0: %kqp%tx_result_binding_0_0.Min0,column1: %kqp%tx_result_binding_0_0.Max0}]", + "Name": "Iterator" } - ] + ], + "PlanNodeId": 6 } ] }, |