diff options
author | vvvv <vvvv@yandex-team.com> | 2024-12-25 19:44:21 +0300 |
---|---|---|
committer | vvvv <vvvv@yandex-team.com> | 2024-12-25 20:52:40 +0300 |
commit | 454e1adb0d52215a9750ea9d56bfaaff647f2a8f (patch) | |
tree | f3422b73a4841b961ba6d25464f33414def28f84 /yql/essentials/core/yql_expr_optimize.cpp | |
parent | 7901522ead409e3b4c580b14f513ba4400b91681 (diff) | |
download | ydb-454e1adb0d52215a9750ea9d56bfaaff647f2a8f.tar.gz |
Handle repeats from inlined ExpandApply calls
init
commit_hash:c6373ff2a9e9562c16afe8d56cbd495790545274
Diffstat (limited to 'yql/essentials/core/yql_expr_optimize.cpp')
-rw-r--r-- | yql/essentials/core/yql_expr_optimize.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/yql/essentials/core/yql_expr_optimize.cpp b/yql/essentials/core/yql_expr_optimize.cpp index 91608eed80..24716a1668 100644 --- a/yql/essentials/core/yql_expr_optimize.cpp +++ b/yql/essentials/core/yql_expr_optimize.cpp @@ -862,6 +862,16 @@ IGraphTransformer::TStatus ExpandApply(const TExprNode::TPtr& input, TExprNode:: return ret; } +IGraphTransformer::TStatus ExpandApplyNoRepeat(const TExprNode::TPtr& input, TExprNode::TPtr& output, TExprContext& ctx) { + output = input; + for (;;) { + auto status = ExpandApply(output, output, ctx); + if (status.Level != IGraphTransformer::TStatus::Repeat) { + return status; + } + } +} + TExprNode::TPtr ApplySyncListToWorld(const TExprNode::TPtr& main, const TSyncMap& syncList, TExprContext& ctx) { if (syncList.empty()) { return main; |