can not get error logs when running with async_=True
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by tracing the cursor.execute(async_=True), poll(), and fetch_logs() flow shown in the issue, then reproduce a failed query with asynchronous execution. Done means fetch_logs() returns the server's error information instead of an empty list.
Written by the indexing model from the issue text.
Description
I am running pyhive cursor.execute with async_=True, but when my query got error and I tried to get error message with cursor.fetch_logs() it returned an empty list. Did i do anything wrong, here is my code:
cursor.execute(sql_query, async_=True)
while True:
# Get operation status
status_code = cursor.poll().operationState
status_name = OPERATION_STATES.get(status_code, f'UNKNOWN_STATE_{status_code}')
_logger.info("Query status: %s", status_name)
if status_code in [2, 3, 4]:
_logger.info("Query completed with status: %s", status_name)
break
elif status_code == 5:
error_message = cursor.fetch_logs()
_logger.info("Query failed with error: %s", error_message)
raise Exception(f"Query failed: {error_message}")
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 545
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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 dropbox/PyHive
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100