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
fix(15403): Re-enable canceling query for Hive and Presto #15878
fix(15403): Re-enable canceling query for Hive and Presto #15878
Conversation
if cancel_query_id is None: | ||
return False | ||
|
||
database = query.database | ||
engine = database.get_sqla_engine( | ||
engine = query.database.get_sqla_engine( |
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.
Removing interim variables which likely add unnecessary obfuscation.
Codecov Report
@@ Coverage Diff @@
## master #15878 +/- ##
==========================================
- Coverage 77.08% 77.01% -0.08%
==========================================
Files 984 984
Lines 51787 51797 +10
Branches 7031 7031
==========================================
- Hits 39918 39889 -29
- Misses 11644 11683 +39
Partials 225 225
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
LGTM
Co-authored-by: John Bodley <john.bodley@airbnb.com> (cherry picked from commit 6d3e19d)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
Co-authored-by: John Bodley <john.bodley@airbnb.com>
Co-authored-by: John Bodley <john.bodley@airbnb.com>
Co-authored-by: John Bodley <john.bodley@airbnb.com>
SUMMARY
Both the Hive and Presto live cursors have implicit async handling to cancel queries, however post #15403 when you stop a query in SQL Lab it incorrectly mentioned that the query could not be stopped and thus prevented to user from iterating within the SQL editor.
This PR adds a new method to check if the database implicitly handles the canceling of queries.
TESTING INSTRUCTIONS
Added unit tests.
ADDITIONAL INFORMATION
cc: @koszti