-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
query cancellation attempt #383
Conversation
5d7d1d5
to
f0a374b
Compare
f0a374b
to
14ce3a2
Compare
@@ -51,10 +51,6 @@ class DuckDBAdapter(SQLAdapter): | |||
def date_function(cls) -> str: | |||
return "now()" | |||
|
|||
@classmethod | |||
def is_cancelable(cls) -> bool: | |||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm should we make this environment dependent, possibly?
@@ -58,6 +58,9 @@ def notify_closed(self): | |||
if self.handle_count == 0 and not self._keep_open: | |||
self.close() | |||
|
|||
def cancel(cls, connection: Connection): | |||
connection.handle.cursor().interrupt() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a new feature of MD or of DuckDB in general?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a duckdb feature: duckdb/duckdb#7895
I also manually tested it with MD and saw the expected behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @hrl20, thank you so much!
The failing tests are the flaky attach test-- I'm writing a PR to make it non-flaky |
Implement query cancellation for DuckDB/MotherDuck using conn.interrupt() duckdb/duckdb#7895