github-actions[bot] commented on code in PR #70282:
URL: https://github.com/apache/doris/pull/70282#discussion_r4609912404
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertIntoTVFCommand.java:
##########
@@ -98,65 +122,118 @@ public void run(ConnectContext ctx, StmtExecutor
executor) throws Exception {
executor.setPlanner(planner);
executor.checkBlockRules();
- // FE-side deletion of existing files (before BE execution)
- PhysicalPlan physicalPlan = planner.getPhysicalPlan();
- if (physicalPlan instanceof PhysicalTVFTableSink) {
- PhysicalTVFTableSink<?> tvfSink = (PhysicalTVFTableSink<?>)
physicalPlan;
- String sinkTvfName = tvfSink.getTvfName();
- Map<String, String> sinkProps = tvfSink.getProperties();
- boolean deleteExisting = Boolean.parseBoolean(
- sinkProps.getOrDefault("delete_existing_files", "false"));
+ return planner;
+ }
- if (deleteExisting && !"local".equals(sinkTvfName)) {
- deleteExistingFilesInFE(sinkTvfName, sinkProps);
- }
- }
+ @Override
+ public void run(ConnectContext ctx, StmtExecutor executor) throws
Exception {
+ executor.registerQueryCancellationCallback(this::cancel);
+ checkCanceled();
Review Comment:
[P2] Reset cancellation state between prepared executions. Server-side
PREPARE retains this InsertIntoTVFCommand: ExecuteCommand.run reuses
prepareCommand.getLogicalPlan() with a fresh executor for each EXECUTE. After
KILL QUERY cancels one execution, cancel() leaves canceled permanently true, so
every subsequent EXECUTE fails at checkCanceled() before planning even though
its new executor has not been canceled. Scope cancellation to one execution,
while preserving cancellation already pending on that execution's executor, and
add a cancel-then-execute test for one prepared S3 INSERT.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]