diff options
author | ivanmorozov <ivanmorozov@yandex-team.com> | 2023-01-11 16:10:57 +0300 |
---|---|---|
committer | ivanmorozov <ivanmorozov@yandex-team.com> | 2023-01-11 16:10:57 +0300 |
commit | 877c2a494d58f5d75fc0ecbe2a40d6600ace4cb6 (patch) | |
tree | a84ecda446034893bf6268c986e37bd4691efbf9 | |
parent | 17773ad0b578e15ec7eb4bece9631e93fc98de4b (diff) | |
download | ydb-877c2a494d58f5d75fc0ecbe2a40d6600ace4cb6.tar.gz |
correct argument indexes for remap
-rw-r--r-- | ydb/library/yql/core/peephole_opt/yql_opt_peephole_physical.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ydb/library/yql/core/peephole_opt/yql_opt_peephole_physical.cpp b/ydb/library/yql/core/peephole_opt/yql_opt_peephole_physical.cpp index 4391c92171..63a58e9fdb 100644 --- a/ydb/library/yql/core/peephole_opt/yql_opt_peephole_physical.cpp +++ b/ydb/library/yql/core/peephole_opt/yql_opt_peephole_physical.cpp @@ -4608,9 +4608,9 @@ TExprNode::TPtr OptimizeWideCombiner(const TExprNode::TPtr& node, TExprContext& auto children = node->ChildrenList(); const auto keysAndStateSize = children[5]->Head().ChildrenSize(); - const auto keysWidth = children[2]->ChildrenSize() - 1; + const auto itemsWidth = children[2]->Head().ChildrenSize(); - std::vector<ui32> map(keysAndStateSize); + std::vector<ui32> map(itemsWidth + keysAndStateSize); std::iota(map.begin(), map.end(), 0U); std::for_each(dedups.cbegin(), dedups.cend(), [&](const std::pair<ui32, ui32>& it) { map[it.first] = it.second; }); @@ -4633,8 +4633,8 @@ TExprNode::TPtr OptimizeWideCombiner(const TExprNode::TPtr& node, TExprContext& .Seal().Build(); }; - children[3] = buildRemappedLambda(*children[3], keysWidth); - children[4] = buildRemappedLambda(*children[4], keysWidth); + children[3] = buildRemappedLambda(*children[3], itemsWidth); + children[4] = buildRemappedLambda(*children[4], itemsWidth); children[5] = buildRemappedLambda(*children[5], 0); return ctx.ChangeChildren(*node, std::move(children)); |