[fix](mtmv) fix insert overwrite getExecTimeout error (#28700)

should use InsertTimeout but QueryTimeout
This commit is contained in:
zhangdong
2023-12-20 17:08:38 +08:00
committed by GitHub
parent 9d5b9cc452
commit 552a5c1632
2 changed files with 5 additions and 1 deletions

View File

@ -175,6 +175,7 @@ public class MTMVTask extends AbstractTask {
.from(mtmv, mtmv.getMvPartitionInfo().getPartitionType() == MTMVPartitionType.FOLLOW_BASE_TABLE
? refreshPartitionIds : Sets.newHashSet(), tableWithPartKey);
executor = new StmtExecutor(ctx, new LogicalPlanAdapter(command, ctx.getStatementContext()));
ctx.setExecutor(executor);
ctx.setQueryId(queryId);
command.run(ctx, executor);
if (ctx.getState().getStateType() != MysqlStateType.OK) {

View File

@ -127,6 +127,7 @@ import org.apache.doris.nereids.trees.plans.commands.Command;
import org.apache.doris.nereids.trees.plans.commands.CreateTableCommand;
import org.apache.doris.nereids.trees.plans.commands.Forward;
import org.apache.doris.nereids.trees.plans.commands.InsertIntoTableCommand;
import org.apache.doris.nereids.trees.plans.commands.InsertOverwriteTableCommand;
import org.apache.doris.nereids.trees.plans.commands.NotAllowFallback;
import org.apache.doris.nereids.trees.plans.logical.LogicalPlan;
import org.apache.doris.planner.GroupCommitPlanner;
@ -402,10 +403,12 @@ public class StmtExecutor {
if (parsedStmt instanceof LogicalPlanAdapter) {
LogicalPlan logicalPlan = ((LogicalPlanAdapter) parsedStmt).getLogicalPlan();
return logicalPlan instanceof InsertIntoTableCommand
|| logicalPlan instanceof InsertOverwriteTableCommand
|| (logicalPlan instanceof CreateTableCommand
&& ((CreateTableCommand) logicalPlan).isCtasCommand());
}
return parsedStmt instanceof InsertStmt || parsedStmt instanceof CreateTableAsSelectStmt;
return parsedStmt instanceof InsertStmt || parsedStmt instanceof InsertOverwriteTableStmt
|| parsedStmt instanceof CreateTableAsSelectStmt;
}
public boolean isAnalyzeStmt() {