From e55aaa6eb62328b53cec6e70cc0c38793e455815 Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Tue, 3 Dec 2024 19:09:36 +0000 Subject: [PATCH] Backport #72735 to 24.9: Fix context lifetime for Y-shaped join. --- src/QueryPipeline/QueryPipelineBuilder.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/QueryPipeline/QueryPipelineBuilder.cpp b/src/QueryPipeline/QueryPipelineBuilder.cpp index d276fed60a2..371b4e823ef 100644 --- a/src/QueryPipeline/QueryPipelineBuilder.cpp +++ b/src/QueryPipeline/QueryPipelineBuilder.cpp @@ -339,6 +339,7 @@ QueryPipelineBuilderPtr QueryPipelineBuilder::mergePipelines( left->pipe.processors->insert(left->pipe.processors->end(), right->pipe.processors->begin(), right->pipe.processors->end()); left->pipe.header = left->pipe.output_ports.front()->getHeader(); left->pipe.max_parallel_streams = std::max(left->pipe.max_parallel_streams, right->pipe.max_parallel_streams); + left->resources = std::move(right->resources); return left; }