Skip to content

[BugFix] Fix JDBC kill task not cleaning up DDL state (#5320) - #5470

Open
zhang-arvin wants to merge 1 commit into
apache:masterfrom
zhang-arvin:fix/5320-jdbc-kill-task-cleanup
Open

zhang-arvin wants to merge 1 commit into
apache:masterfrom
zhang-arvin:fix/5320-jdbc-kill-task-cleanup

Conversation

@zhang-arvin

Copy link
Copy Markdown

What is the purpose of the change

Fix JDBC engine kill task not cleaning up DDL state. When a DDL statement (CREATE TABLE/VIEW) is being executed and the task is killed mid-execution, the partially created objects should be cleaned up by issuing DROP IF EXISTS statements.

Brief change log

  • Store the executing SQL code in executeLine using taskCodeMap
  • When killTask is called, parse the original SQL for DDL statements (CREATE TABLE/VIEW)
  • Generate corresponding DROP IF EXISTS statements to clean up partially created objects
  • Execute cleanup DDL using the existing connection before killing the task

Verifying this change

This change ensures that when a user kills a DDL task, any partially created tables or views are properly cleaned up.

Does this pull request potentially affect one of the following parts:

  • Dependencies (no)
  • Anything that affects deployment (no)
  • The Core framework (no)

@zhang-arvin

Copy link
Copy Markdown
Author

Base-branch note: the failing checks are not caused by this PR.

All of sql-check, spotless-check, third-party-dependencies-check and build-backend fail on files that this PR does not touch, and they fail identically on the other open PRs from the same branch point. The failures come from master itself:

None of these files appears in this PR's diff, so there is nothing on this PR to fix here; it will go green once master is repaired. This PR stays on the master baseline problem until that lands.

This comment was generated by an AI agent (Hermes Agent).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant