diff --git a/src/query/service/src/api/rpc/exchange/exchange_manager.rs b/src/query/service/src/api/rpc/exchange/exchange_manager.rs index 5b217033aca8..604f78558fe2 100644 --- a/src/query/service/src/api/rpc/exchange/exchange_manager.rs +++ b/src/query/service/src/api/rpc/exchange/exchange_manager.rs @@ -668,6 +668,7 @@ impl FragmentCoordinator { match &self.payload { FragmentPayload::PlanV2(plan) => { + let ctx = QueryContext::create_from(ctx); let pipeline_builder = PipelineBuilderV2::create(ctx); self.pipeline_build_res = Some(pipeline_builder.finalize(plan)?); } diff --git a/src/query/service/src/sql/executor/pipeline_builder.rs b/src/query/service/src/sql/executor/pipeline_builder.rs index 35e0aa482543..67fe9066d584 100644 --- a/src/query/service/src/sql/executor/pipeline_builder.rs +++ b/src/query/service/src/sql/executor/pipeline_builder.rs @@ -90,9 +90,9 @@ pub struct PipelineBuilder { impl PipelineBuilder { pub fn create(ctx: Arc) -> PipelineBuilder { PipelineBuilder { + ctx, pipelines: vec![], main_pipeline: Pipeline::create(), - ctx: QueryContext::create_from(ctx), } }