fix(15403): Re-enable canceling query for Hive and Presto (#15878)

Co-authored-by: John Bodley <john.bodley@airbnb.com>
This commit is contained in:
John Bodley
2021-07-26 08:04:56 -07:00
committed by GitHub
parent 9c81599d21
commit 6d3e19d857
5 changed files with 61 additions and 5 deletions

View File

@@ -1305,6 +1305,18 @@ class BaseEngineSpec: # pylint: disable=too-many-public-methods
)
return None
@classmethod
def has_implicit_cancel(cls) -> bool:
"""
Return True if the live cursor handles the implicit cancelation of the query,
False otherise.
:return: Whether the live cursor implicitly cancels the query
:see: handle_cursor
"""
return False
@classmethod
def get_cancel_query_id(cls, cursor: Any, query: Query) -> Optional[str]:
"""
@@ -1316,6 +1328,7 @@ class BaseEngineSpec: # pylint: disable=too-many-public-methods
:param query: Query instance
:return: Query identifier
"""
return None
@classmethod
@@ -1330,6 +1343,8 @@ class BaseEngineSpec: # pylint: disable=too-many-public-methods
:return: True if query cancelled successfully, False otherwise
"""
return False
# schema for adding a database by providing parameters instead of the
# full SQLAlchemy URI