diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2023-11-30 09:51:21 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2023-11-30 10:08:27 +0300 |
commit | 468826fff1465595d80da778532b253674e1e1c3 (patch) | |
tree | 55979be8d30470ec46d845bb5d2270a11847d186 /contrib/clickhouse/src/Processors/QueryPlan/Optimizations/optimizeUseNormalProjection.cpp | |
parent | 98ecc8deb38724114150e3758b86eb79dc9f12a9 (diff) | |
download | ydb-468826fff1465595d80da778532b253674e1e1c3.tar.gz |
Intermediate changes
Diffstat (limited to 'contrib/clickhouse/src/Processors/QueryPlan/Optimizations/optimizeUseNormalProjection.cpp')
-rw-r--r-- | contrib/clickhouse/src/Processors/QueryPlan/Optimizations/optimizeUseNormalProjection.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/clickhouse/src/Processors/QueryPlan/Optimizations/optimizeUseNormalProjection.cpp b/contrib/clickhouse/src/Processors/QueryPlan/Optimizations/optimizeUseNormalProjection.cpp index 727afcb1a9..fbe02265dc 100644 --- a/contrib/clickhouse/src/Processors/QueryPlan/Optimizations/optimizeUseNormalProjection.cpp +++ b/contrib/clickhouse/src/Processors/QueryPlan/Optimizations/optimizeUseNormalProjection.cpp @@ -236,7 +236,7 @@ bool optimizeUseNormalProjections(Stack & stack, QueryPlan::Nodes & nodes) } else { - const auto & main_stream = iter->node->children.front()->step->getOutputStream(); + const auto & main_stream = iter->node->children[iter->next_child - 1]->step->getOutputStream(); const auto * proj_stream = &next_node->step->getOutputStream(); if (auto materializing = makeMaterializingDAG(proj_stream->header, main_stream.header)) @@ -252,7 +252,7 @@ bool optimizeUseNormalProjections(Stack & stack, QueryPlan::Nodes & nodes) auto & union_node = nodes.emplace_back(); DataStreams input_streams = {main_stream, *proj_stream}; union_node.step = std::make_unique<UnionStep>(std::move(input_streams)); - union_node.children = {iter->node->children.front(), next_node}; + union_node.children = {iter->node->children[iter->next_child - 1], next_node}; iter->node->children[iter->next_child - 1] = &union_node; } |