Skip to content

Commit 71419a0

Browse files
authored
fix(executor): fix broken merge into source profiling (#15415)
1 parent dcbae32 commit 71419a0

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/query/service/src/interpreters/interpreter_merge_into.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ impl Interpreter for MergeIntoInterpreter {
9494
#[async_backtrace::framed]
9595
async fn execute2(&self) -> Result<PipelineBuildResult> {
9696
let (physical_plan, _) = self.build_physical_plan().await?;
97+
9798
let mut build_res =
9899
build_query_pipeline_without_render_result_set(&self.ctx, &physical_plan).await?;
99100

src/query/service/src/pipelines/pipeline_builder.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ use databend_common_pipeline_core::processors::PlanScope;
2424
use databend_common_pipeline_core::processors::PlanScopeGuard;
2525
use databend_common_pipeline_core::Pipeline;
2626
use databend_common_settings::Settings;
27+
use databend_common_sql::binder::MergeIntoType;
2728
use databend_common_sql::executor::PhysicalPlan;
2829
use databend_common_sql::IndexType;
2930

@@ -98,6 +99,9 @@ impl PipelineBuilder {
9899
pub(crate) fn add_plan_scope(&mut self, plan: &PhysicalPlan) -> Result<Option<PlanScopeGuard>> {
99100
match plan {
100101
PhysicalPlan::EvalScalar(v) if v.exprs.is_empty() => Ok(None),
102+
PhysicalPlan::MergeIntoSource(v) if v.merge_type != MergeIntoType::FullOperation => {
103+
Ok(None)
104+
}
101105
_ => {
102106
let desc = plan.get_desc()?;
103107
let plan_labels = plan.get_labels()?;

0 commit comments

Comments
 (0)