From 4e2e3bdc03285220acde77f4142097b6603f3cd4 Mon Sep 17 00:00:00 2001 From: 924060929 Date: Fri, 20 Dec 2024 15:53:57 +0800 Subject: [PATCH] fix --- .../trees/plans/commands/insert/InsertIntoTableCommand.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertIntoTableCommand.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertIntoTableCommand.java index b67e66949946513..477f8db0da760af 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertIntoTableCommand.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertIntoTableCommand.java @@ -217,7 +217,6 @@ public AbstractInsertExecutor initPlan(ConnectContext ctx, StmtExecutor stmtExec insertExecutor.getCoordinator().setTxnId(insertExecutor.getTxnId()); stmtExecutor.setCoord(insertExecutor.getCoordinator()); // for prepare and execute, avoiding normalization for every execute command - this.originalLogicalQuery = this.logicalQuery; return insertExecutor; } LOG.warn("insert plan failed {} times. query id is {}.", retryTimes, DebugUtil.printId(ctx.queryId())); @@ -238,12 +237,12 @@ private BuildInsertExecutorResult initPlanOnce(ConnectContext ctx, if (cte.isPresent()) { this.logicalQuery = Optional.of((LogicalPlan) cte.get().withChildren(logicalQuery.get())); } - OlapGroupCommitInsertExecutor.analyzeGroupCommit(ctx, targetTableIf, this.logicalQuery, this.insertCtx); + OlapGroupCommitInsertExecutor.analyzeGroupCommit(ctx, targetTableIf, this.logicalQuery.get(), this.insertCtx); } finally { targetTableIf.readUnlock(); } - LogicalPlanAdapter logicalPlanAdapter = new LogicalPlanAdapter(logicalQuery, ctx.getStatementContext()); + LogicalPlanAdapter logicalPlanAdapter = new LogicalPlanAdapter(logicalQuery.get(), ctx.getStatementContext()); return planInsertExecutor(ctx, stmtExecutor, logicalPlanAdapter, targetTableIf); }