diff options
author | Roman Udovichenko <rvu@ydb.tech> | 2024-08-09 11:22:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-09 11:22:51 +0300 |
commit | 403d37f5db96049f07d859a9cf815c9e10756345 (patch) | |
tree | 07375a05441827e3e101c1bc243882dd0e9f1fae | |
parent | 3a7b2751fd316f4de3f54743991e48475b9b391a (diff) | |
download | ydb-403d37f5db96049f07d859a9cf815c9e10756345.tar.gz |
Drop unused flag in IsYtCompleteIsolatedLambda (#7587)
14 files changed, 62 insertions, 64 deletions
diff --git a/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_join.cpp b/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_join.cpp index 4b9ed1670c..a7d66e50a1 100644 --- a/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_join.cpp +++ b/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_join.cpp @@ -31,14 +31,14 @@ TMaybeNode<TExprBase> TYtPhysicalOptProposalTransformer::EquiJoin(TExprBase node } if (auto maybeFlatMap = list.Maybe<TCoFlatMapBase>()) { TSyncMap syncList; - if (!IsYtCompleteIsolatedLambda(maybeFlatMap.Cast().Lambda().Ref(), syncList, usedCluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(maybeFlatMap.Cast().Lambda().Ref(), syncList, usedCluster, false)) { return node; } list = maybeFlatMap.Cast().Input(); } if (!IsYtProviderInput(list)) { TSyncMap syncList; - if (!IsYtCompleteIsolatedLambda(list.Ref(), syncList, usedCluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(list.Ref(), syncList, usedCluster, false)) { return node; } continue; @@ -84,7 +84,7 @@ TMaybeNode<TExprBase> TYtPhysicalOptProposalTransformer::EquiJoin(TExprBase node if (auto maybeFlatMap = listStepForward.Maybe<TCoFlatMapBase>()) { auto flatMap = maybeFlatMap.Cast(); if (IsLambdaSuitableForPullingIntoEquiJoin(flatMap, joinInput.Scope().Ref(), tableKeysMap, extractedMembers.Get())) { - if (!IsYtCompleteIsolatedLambda(flatMap.Lambda().Ref(), worldList, usedCluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(flatMap.Lambda().Ref(), worldList, usedCluster, false)) { return node; } @@ -134,7 +134,7 @@ TMaybeNode<TExprBase> TYtPhysicalOptProposalTransformer::EquiJoin(TExprBase node } else { TSyncMap syncList; - if (!IsYtCompleteIsolatedLambda(list.Ref(), syncList, usedCluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(list.Ref(), syncList, usedCluster, false)) { return node; } diff --git a/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_map.cpp b/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_map.cpp index c7bda3d0e5..e102ff420d 100644 --- a/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_map.cpp +++ b/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_map.cpp @@ -62,7 +62,7 @@ TMaybeNode<TExprBase> TYtPhysicalOptProposalTransformer::FlatMap(TExprBase node, auto cluster = TString{GetClusterName(input)}; TSyncMap syncList; - if (!IsYtCompleteIsolatedLambda(flatMap.Lambda().Ref(), syncList, cluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(flatMap.Lambda().Ref(), syncList, cluster, false)) { return node; } @@ -150,7 +150,7 @@ TMaybeNode<TExprBase> TYtPhysicalOptProposalTransformer::LMap(TExprBase node, TE auto cluster = TString{GetClusterName(lmap.Input())}; TSyncMap syncList; - if (!IsYtCompleteIsolatedLambda(lmap.Lambda().Ref(), syncList, cluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(lmap.Lambda().Ref(), syncList, cluster, false)) { return node; } @@ -228,19 +228,19 @@ TMaybeNode<TExprBase> TYtPhysicalOptProposalTransformer::CombineByKey(TExprBase auto cluster = TString{GetClusterName(input)}; TSyncMap syncList; - if (!IsYtCompleteIsolatedLambda(combineByKey.PreMapLambda().Ref(), syncList, cluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(combineByKey.PreMapLambda().Ref(), syncList, cluster, false)) { return node; } - if (!IsYtCompleteIsolatedLambda(combineByKey.KeySelectorLambda().Ref(), syncList, cluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(combineByKey.KeySelectorLambda().Ref(), syncList, cluster, false)) { return node; } - if (!IsYtCompleteIsolatedLambda(combineByKey.InitHandlerLambda().Ref(), syncList, cluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(combineByKey.InitHandlerLambda().Ref(), syncList, cluster, false)) { return node; } - if (!IsYtCompleteIsolatedLambda(combineByKey.UpdateHandlerLambda().Ref(), syncList, cluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(combineByKey.UpdateHandlerLambda().Ref(), syncList, cluster, false)) { return node; } - if (!IsYtCompleteIsolatedLambda(combineByKey.FinishHandlerLambda().Ref(), syncList, cluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(combineByKey.FinishHandlerLambda().Ref(), syncList, cluster, false)) { return node; } diff --git a/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_misc.cpp b/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_misc.cpp index ec3d27d593..b929eb4e21 100644 --- a/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_misc.cpp +++ b/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_misc.cpp @@ -244,7 +244,7 @@ TMaybeNode<TExprBase> TYtPhysicalOptProposalTransformer::Mux(TExprBase node, TEx return node; } TSyncMap syncList; - if (!IsYtCompleteIsolatedLambda(child.Ref(), syncList, resultCluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(child.Ref(), syncList, resultCluster, false)) { return node; } @@ -319,7 +319,7 @@ TMaybeNode<TExprBase> TYtPhysicalOptProposalTransformer::TakeOrSkip(TExprBase no auto cluster = TString{GetClusterName(input)}; TSyncMap syncList; - if (!IsYtCompleteIsolatedLambda(countBase.Count().Ref(), syncList, cluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(countBase.Count().Ref(), syncList, cluster, false)) { return node; } @@ -558,7 +558,7 @@ TMaybeNode<TExprBase> TYtPhysicalOptProposalTransformer::Extend(TExprBase node, return node; } TSyncMap syncList; - if (!IsYtCompleteIsolatedLambda(child.Ref(), syncList, resultCluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(child.Ref(), syncList, resultCluster, false)) { return node; } diff --git a/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_partition.cpp b/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_partition.cpp index f52a5944ed..d0f27aae22 100644 --- a/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_partition.cpp +++ b/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_partition.cpp @@ -35,8 +35,8 @@ TMaybeNode<TExprBase> TYtPhysicalOptProposalTransformer::PartitionByKey(TExprBas auto cluster = TString{GetClusterName(input)}; TSyncMap syncList; - if (!IsYtCompleteIsolatedLambda(keySelectorLambda.Ref(), syncList, cluster, true, false) - || !IsYtCompleteIsolatedLambda(handlerLambda.Ref(), syncList, cluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(keySelectorLambda.Ref(), syncList, cluster, false) + || !IsYtCompleteIsolatedLambda(handlerLambda.Ref(), syncList, cluster, false)) { return node; } @@ -94,7 +94,7 @@ TMaybeNode<TExprBase> TYtPhysicalOptProposalTransformer::PartitionByKey(TExprBas } TCoLambda sortKeySelectorLambda = partByKey.SortKeySelectorLambda().Cast<TCoLambda>(); - if (!IsYtCompleteIsolatedLambda(sortKeySelectorLambda.Ref(), syncList, cluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(sortKeySelectorLambda.Ref(), syncList, cluster, false)) { return node; } diff --git a/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_push.cpp b/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_push.cpp index 147d7eeaf1..7278bc93ff 100644 --- a/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_push.cpp +++ b/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_push.cpp @@ -162,7 +162,7 @@ TMaybeNode<TExprBase> TYtPhysicalOptProposalTransformer::PushDownKeyExtract(TExp TSyncMap syncList; for (auto filter: keyFilters) { - if (!IsYtCompleteIsolatedLambda(*filter, syncList, true, false)) { + if (!IsYtCompleteIsolatedLambda(*filter, syncList, false)) { return node; } } diff --git a/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_sort.cpp b/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_sort.cpp index b0dcc4ca58..f5e5b88227 100644 --- a/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_sort.cpp +++ b/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_sort.cpp @@ -73,7 +73,7 @@ TMaybeNode<TExprBase> TYtPhysicalOptProposalTransformer::Sort(TExprBase node, TE auto keySelectorLambda = sort.KeySelectorLambda(); auto cluster = TString{GetClusterName(sort.Input())}; TSyncMap syncList; - if (!IsYtCompleteIsolatedLambda(keySelectorLambda.Ref(), syncList, cluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(keySelectorLambda.Ref(), syncList, cluster, false)) { return node; } diff --git a/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_write.cpp b/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_write.cpp index 2f39fe7b41..0f8f65f961 100644 --- a/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_write.cpp +++ b/ydb/library/yql/providers/yt/provider/phy_opt/yql_yt_phy_opt_write.cpp @@ -43,7 +43,7 @@ TMaybeNode<TExprBase> TYtPhysicalOptProposalTransformer::DqWrite(TExprBase node, } TSyncMap syncList; - if (!IsYtCompleteIsolatedLambda(write.Content().Ref(), syncList, true, true)) { + if (!IsYtCompleteIsolatedLambda(write.Content().Ref(), syncList, true)) { return node; } @@ -554,7 +554,7 @@ TMaybeNode<TExprBase> TYtPhysicalOptProposalTransformer::ReplaceStatWriteTable(T TString cluster; TSyncMap syncList; - if (!IsYtCompleteIsolatedLambda(input.Ref(), syncList, cluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(input.Ref(), syncList, cluster, false)) { return node; } @@ -710,7 +710,7 @@ TMaybeNode<TExprBase> TYtPhysicalOptProposalTransformer::Fill(TExprBase node, TE auto cluster = TString{write.DataSink().Cluster().Value()}; TSyncMap syncList; - if (!IsYtCompleteIsolatedLambda(write.Content().Ref(), syncList, cluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(write.Content().Ref(), syncList, cluster, false)) { return node; } diff --git a/ydb/library/yql/providers/yt/provider/yql_yt_datasource.cpp b/ydb/library/yql/providers/yt/provider/yql_yt_datasource.cpp index 0ac780e2c9..0a3f599f7a 100644 --- a/ydb/library/yql/providers/yt/provider/yql_yt_datasource.cpp +++ b/ydb/library/yql/providers/yt/provider/yql_yt_datasource.cpp @@ -270,7 +270,7 @@ public: bool CanBuildResult(const TExprNode& node, TSyncMap& syncList) override { TString usedCluster; - return IsYtCompleteIsolatedLambda(node, syncList, usedCluster, true, false); + return IsYtCompleteIsolatedLambda(node, syncList, usedCluster, false); } bool GetExecWorld(const TExprNode::TPtr& node, TExprNode::TPtr& root) override { diff --git a/ydb/library/yql/providers/yt/provider/yql_yt_datasource_exec.cpp b/ydb/library/yql/providers/yt/provider/yql_yt_datasource_exec.cpp index 64c04021ac..f386539fea 100644 --- a/ydb/library/yql/providers/yt/provider/yql_yt_datasource_exec.cpp +++ b/ydb/library/yql/providers/yt/provider/yql_yt_datasource_exec.cpp @@ -114,7 +114,7 @@ protected: TString usedCluster; TSyncMap syncList; - if (!IsYtIsolatedLambda(data.Ref(), syncList, usedCluster, true, false)) { + if (!IsYtIsolatedLambda(data.Ref(), syncList, usedCluster, false)) { ctx.AddError(TIssue(ctx.GetPosition(data.Pos()), TStringBuilder() << "Failed to execute node due to bad graph: " << input->Content())); return SyncError(); } diff --git a/ydb/library/yql/providers/yt/provider/yql_yt_dq_optimize.cpp b/ydb/library/yql/providers/yt/provider/yql_yt_dq_optimize.cpp index 867bf9981d..0a93bea037 100644 --- a/ydb/library/yql/providers/yt/provider/yql_yt_dq_optimize.cpp +++ b/ydb/library/yql/providers/yt/provider/yql_yt_dq_optimize.cpp @@ -97,7 +97,7 @@ public: } TSyncMap syncList; - if (!IsYtCompleteIsolatedLambda(count.Count().Ref(), syncList, cluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(count.Count().Ref(), syncList, cluster, false)) { return read; } diff --git a/ydb/library/yql/providers/yt/provider/yql_yt_helpers.cpp b/ydb/library/yql/providers/yt/provider/yql_yt_helpers.cpp index 9e37ab48c9..ca0a71d934 100644 --- a/ydb/library/yql/providers/yt/provider/yql_yt_helpers.cpp +++ b/ydb/library/yql/providers/yt/provider/yql_yt_helpers.cpp @@ -38,7 +38,7 @@ using namespace NNodes; namespace { -bool IsYtIsolatedLambdaImpl(const TExprNode& lambdaBody, TSyncMap& syncList, TString* usedCluster, bool supportsReads, bool supportsDq, TNodeSet& visited) { +bool IsYtIsolatedLambdaImpl(const TExprNode& lambdaBody, TSyncMap& syncList, TString* usedCluster, bool supportsDq, TNodeSet& visited) { if (!visited.insert(&lambdaBody).second) { return true; } @@ -50,14 +50,14 @@ bool IsYtIsolatedLambdaImpl(const TExprNode& lambdaBody, TSyncMap& syncList, TSt if (auto maybeLength = TMaybeNode<TYtLength>(&lambdaBody)) { if (auto maybeRead = maybeLength.Input().Maybe<TYtReadTable>()) { auto read = maybeRead.Cast(); - if (supportsReads && usedCluster && !UpdateUsedCluster(*usedCluster, TString{read.DataSource().Cluster().Value()})) { + if (usedCluster && !UpdateUsedCluster(*usedCluster, TString{read.DataSource().Cluster().Value()})) { return false; } syncList.emplace(read.Ptr(), syncList.size()); } if (auto maybeOutput = maybeLength.Input().Maybe<TYtOutput>()) { auto output = maybeOutput.Cast(); - if (supportsReads && usedCluster && !UpdateUsedCluster(*usedCluster, TString{GetOutputOp(output).DataSink().Cluster().Value()})) { + if (usedCluster && !UpdateUsedCluster(*usedCluster, TString{GetOutputOp(output).DataSink().Cluster().Value()})) { return false; } syncList.emplace(output.Operation().Ptr(), syncList.size()); @@ -68,14 +68,14 @@ bool IsYtIsolatedLambdaImpl(const TExprNode& lambdaBody, TSyncMap& syncList, TSt if (auto maybeContent = TMaybeNode<TYtTableContent>(&lambdaBody)) { if (auto maybeRead = maybeContent.Input().Maybe<TYtReadTable>()) { auto read = maybeRead.Cast(); - if (supportsReads && usedCluster && !UpdateUsedCluster(*usedCluster, TString{read.DataSource().Cluster().Value()})) { + if (usedCluster && !UpdateUsedCluster(*usedCluster, TString{read.DataSource().Cluster().Value()})) { return false; } syncList.emplace(read.Ptr(), syncList.size()); } if (auto maybeOutput = maybeContent.Input().Maybe<TYtOutput>()) { auto output = maybeOutput.Cast(); - if (supportsReads && usedCluster && !UpdateUsedCluster(*usedCluster, TString{GetOutputOp(output).DataSink().Cluster().Value()})) { + if (usedCluster && !UpdateUsedCluster(*usedCluster, TString{GetOutputOp(output).DataSink().Cluster().Value()})) { return false; } syncList.emplace(output.Operation().Ptr(), syncList.size()); @@ -89,14 +89,14 @@ bool IsYtIsolatedLambdaImpl(const TExprNode& lambdaBody, TSyncMap& syncList, TSt } if (auto maybeRead = maybeContent.Input().Maybe<TYtReadTable>()) { auto read = maybeRead.Cast(); - if (supportsReads && usedCluster && !UpdateUsedCluster(*usedCluster, TString{read.DataSource().Cluster().Value()})) { + if (usedCluster && !UpdateUsedCluster(*usedCluster, TString{read.DataSource().Cluster().Value()})) { return false; } syncList.emplace(read.Ptr(), syncList.size()); } if (auto maybeOutput = maybeContent.Input().Maybe<TYtOutput>()) { auto output = maybeOutput.Cast(); - if (supportsReads && usedCluster && !UpdateUsedCluster(*usedCluster, TString{GetOutputOp(output).DataSink().Cluster().Value()})) { + if (usedCluster && !UpdateUsedCluster(*usedCluster, TString{GetOutputOp(output).DataSink().Cluster().Value()})) { return false; } syncList.emplace(output.Operation().Ptr(), syncList.size()); @@ -108,28 +108,26 @@ bool IsYtIsolatedLambdaImpl(const TExprNode& lambdaBody, TSyncMap& syncList, TSt return false; } - if (supportsReads) { - if (auto maybeRead = TMaybeNode<TCoRight>(&lambdaBody).Input().Maybe<TYtReadTable>()) { - auto read = maybeRead.Cast(); - if (usedCluster && !UpdateUsedCluster(*usedCluster, TString{read.DataSource().Cluster().Value()})) { - return false; - } - syncList.emplace(read.Ptr(), syncList.size()); - return true; - } else if (auto out = TMaybeNode<TYtOutput>(&lambdaBody)) { - auto op = GetOutputOp(out.Cast()); - if (usedCluster && !UpdateUsedCluster(*usedCluster, TString{op.DataSink().Cluster().Value()})) { - return false; - } - syncList.emplace(out.Cast().Operation().Ptr(), syncList.size()); - return true; + if (auto maybeRead = TMaybeNode<TCoRight>(&lambdaBody).Input().Maybe<TYtReadTable>()) { + auto read = maybeRead.Cast(); + if (usedCluster && !UpdateUsedCluster(*usedCluster, TString{read.DataSource().Cluster().Value()})) { + return false; } + syncList.emplace(read.Ptr(), syncList.size()); + return true; + } else if (auto out = TMaybeNode<TYtOutput>(&lambdaBody)) { + auto op = GetOutputOp(out.Cast()); + if (usedCluster && !UpdateUsedCluster(*usedCluster, TString{op.DataSink().Cluster().Value()})) { + return false; + } + syncList.emplace(out.Cast().Operation().Ptr(), syncList.size()); + return true; } if (auto right = TMaybeNode<TCoRight>(&lambdaBody).Input()) { if (auto maybeCons = right.Maybe<TCoCons>()) { syncList.emplace(maybeCons.Cast().World().Ptr(), syncList.size()); - return IsYtIsolatedLambdaImpl(maybeCons.Cast().Input().Ref(), syncList, usedCluster, supportsReads, supportsDq, visited); + return IsYtIsolatedLambdaImpl(maybeCons.Cast().Input().Ref(), syncList, usedCluster, supportsDq, visited); } if (right.Cast().Raw()->IsCallable("PgReadTable!")) { @@ -148,7 +146,7 @@ bool IsYtIsolatedLambdaImpl(const TExprNode& lambdaBody, TSyncMap& syncList, TSt } for (auto& child : lambdaBody.Children()) { - if (!IsYtIsolatedLambdaImpl(*child, syncList, usedCluster, supportsReads, supportsDq, visited)) { + if (!IsYtIsolatedLambdaImpl(*child, syncList, usedCluster, supportsDq, visited)) { return false; } } @@ -293,22 +291,22 @@ bool UpdateUsedCluster(TString& usedCluster, const TString& newCluster) { return true; } -bool IsYtIsolatedLambda(const TExprNode& lambdaBody, TSyncMap& syncList, bool supportsReads, bool supportsDq) { +bool IsYtIsolatedLambda(const TExprNode& lambdaBody, TSyncMap& syncList, bool supportsDq) { TNodeSet visited; - return IsYtIsolatedLambdaImpl(lambdaBody, syncList, nullptr, supportsReads, supportsDq, visited); + return IsYtIsolatedLambdaImpl(lambdaBody, syncList, nullptr, supportsDq, visited); } -bool IsYtIsolatedLambda(const TExprNode& lambdaBody, TSyncMap& syncList, TString& usedCluster, bool supportsReads, bool supportsDq) { +bool IsYtIsolatedLambda(const TExprNode& lambdaBody, TSyncMap& syncList, TString& usedCluster, bool supportsDq) { TNodeSet visited; - return IsYtIsolatedLambdaImpl(lambdaBody, syncList, &usedCluster, supportsReads, supportsDq, visited); + return IsYtIsolatedLambdaImpl(lambdaBody, syncList, &usedCluster, supportsDq, visited); } -bool IsYtCompleteIsolatedLambda(const TExprNode& lambda, TSyncMap& syncList, bool supportsReads, bool supportsDq) { - return lambda.IsComplete() && IsYtIsolatedLambda(lambda, syncList, supportsReads, supportsDq); +bool IsYtCompleteIsolatedLambda(const TExprNode& lambda, TSyncMap& syncList, bool supportsDq) { + return lambda.IsComplete() && IsYtIsolatedLambda(lambda, syncList, supportsDq); } -bool IsYtCompleteIsolatedLambda(const TExprNode& lambda, TSyncMap& syncList, TString& usedCluster, bool supportsReads, bool supportsDq) { - return lambda.IsComplete() && IsYtIsolatedLambda(lambda, syncList, usedCluster, supportsReads, supportsDq); +bool IsYtCompleteIsolatedLambda(const TExprNode& lambda, TSyncMap& syncList, TString& usedCluster, bool supportsDq) { + return lambda.IsComplete() && IsYtIsolatedLambda(lambda, syncList, usedCluster, supportsDq); } TExprNode::TPtr YtCleanupWorld(const TExprNode::TPtr& input, TExprContext& ctx, TYtState::TPtr state) { diff --git a/ydb/library/yql/providers/yt/provider/yql_yt_helpers.h b/ydb/library/yql/providers/yt/provider/yql_yt_helpers.h index 5cfc207ef5..fefe54eeec 100644 --- a/ydb/library/yql/providers/yt/provider/yql_yt_helpers.h +++ b/ydb/library/yql/providers/yt/provider/yql_yt_helpers.h @@ -21,9 +21,9 @@ namespace NYql { bool UpdateUsedCluster(TString& usedCluster, const TString& newCluster); -bool IsYtIsolatedLambda(const TExprNode& lambdaBody, TSyncMap& syncList, TString& usedCluster, bool supportsReads, bool supportsDq); -bool IsYtCompleteIsolatedLambda(const TExprNode& lambdaBody, TSyncMap& syncList, bool supportsReads, bool supportsDq); -bool IsYtCompleteIsolatedLambda(const TExprNode& lambdaBody, TSyncMap& syncList, TString& usedCluster, bool supportsReads, bool supportsDq); +bool IsYtIsolatedLambda(const TExprNode& lambdaBody, TSyncMap& syncList, TString& usedCluster, bool supportsDq); +bool IsYtCompleteIsolatedLambda(const TExprNode& lambdaBody, TSyncMap& syncList, bool supportsDq); +bool IsYtCompleteIsolatedLambda(const TExprNode& lambdaBody, TSyncMap& syncList, TString& usedCluster, bool supportsDq); TExprNode::TPtr YtCleanupWorld(const TExprNode::TPtr& input, TExprContext& ctx, TYtState::TPtr state); TVector<TYtTableBaseInfo::TPtr> GetInputTableInfos(NNodes::TExprBase input); TVector<TYtPathInfo::TPtr> GetInputPaths(NNodes::TExprBase input); diff --git a/ydb/library/yql/providers/yt/provider/yql_yt_logical_optimize.cpp b/ydb/library/yql/providers/yt/provider/yql_yt_logical_optimize.cpp index 49bb8f814b..94f3965b1a 100644 --- a/ydb/library/yql/providers/yt/provider/yql_yt_logical_optimize.cpp +++ b/ydb/library/yql/providers/yt/provider/yql_yt_logical_optimize.cpp @@ -341,12 +341,12 @@ protected: t.FinishHandler(), }; for (auto lambda : lambdas) { - if (!IsYtCompleteIsolatedLambda(lambda.Ref(), syncList, cluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(lambda.Ref(), syncList, cluster, false)) { return node; } } } else if (trait.Ref().IsCallable("AggApply")) { - if (!IsYtCompleteIsolatedLambda(*trait.Ref().Child(2), syncList, cluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(*trait.Ref().Child(2), syncList, cluster, false)) { return node; } } @@ -1344,7 +1344,7 @@ protected: TYtDSource dataSource = GetDataSource(input, ctx); TString cluster = TString{dataSource.Cluster().Value()}; TSyncMap syncList; - if (!IsYtCompleteIsolatedLambda(countBase.Count().Ref(), syncList, cluster, true, false)) { + if (!IsYtCompleteIsolatedLambda(countBase.Count().Ref(), syncList, cluster, false)) { return node; } diff --git a/ydb/library/yql/providers/yt/provider/yql_yt_physical_finalizing.cpp b/ydb/library/yql/providers/yt/provider/yql_yt_physical_finalizing.cpp index 0b47fb670d..3b8182ca45 100644 --- a/ydb/library/yql/providers/yt/provider/yql_yt_physical_finalizing.cpp +++ b/ydb/library/yql/providers/yt/provider/yql_yt_physical_finalizing.cpp @@ -332,7 +332,7 @@ public: auto kind = FromString<EYtSettingType>(setting.Name().Value()); if (EYtSettingType::Take == kind || EYtSettingType::Skip == kind) { TSyncMap syncList; - if (!IsYtCompleteIsolatedLambda(setting.Value().Ref(), syncList, usedCluster, true, false) || !syncList.empty()) { + if (!IsYtCompleteIsolatedLambda(setting.Value().Ref(), syncList, usedCluster, false) || !syncList.empty()) { hasTake = false; break; } |