Skip to content

Commit

Permalink
[fix](mtmv) fix insert overwrite getExecTimeout error (apache#28700)
Browse files Browse the repository at this point in the history
should use InsertTimeout but QueryTimeout
  • Loading branch information
zddr authored and HappenLee committed Jan 12, 2024
1 parent 17626fa commit f997717
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ private void exec(ConnectContext ctx, Set<Long> refreshPartitionIds, Map<OlapTab
.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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
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;
Expand Down Expand Up @@ -402,10 +403,12 @@ public boolean isSyncLoadKindStmt() {
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() {
Expand Down

0 comments on commit f997717

Please sign in to comment.