cursor doesn't respond/raise exceptions when a query is cancelled in the backend
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start by reproducing the cancellation scenario with the shown cursor.execute and fetchmany_arrow(100000) calls, checking where execution hangs after the backend cancels the query. Done means the cursor responds appropriately by returning or raising an exception instead of continuing to hang.
Written by the indexing model from the issue text.
Description
Hi Team,
We have observed that the cursor doesn't respond/raise exceptions when a query is cancelled in the backend it just hangs (keeps on running)
I don't see any solutions online.
Any idea on how to handle this?
conn= connection(connection_params)
cursor = conn.cursor()
c = cursor.execute(query)
print(c)
print(c.query_id)
print("query executed")
query_id = cursor.query_id
print(f"In query: {query_id}")
result = cursor.fetchmany_arrow(100000)
if not result:
raise Exception("No results")
query_id = cursor.query_id
print(f"In query: {query_id}")
- Dominant language
- Python
- Stars
- 233
- Forks
- 152
- Avg merge
- 21h 5m
- Merged PRs (30d)
- 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from databricks/databricks-sql-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
All issues in databricks/databricks-sql-python
Similar issues
-
fix: inaccuracy ⚠️
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
uabrc/uabrc.github.io#1255 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ethereum-optimism/factory#64 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
duckdb/duckdb-python#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Qiskit/qiskit-addon-sqd#376 ·