codeant-ai-for-open-source[bot] commented on code in PR #44737:
URL: https://github.com/apache/superset/pull/44737#discussion_r4129367756


##########
superset/db_engine_specs/impala.py:
##########
@@ -147,33 +149,29 @@ def handle_cursor(cls, cursor: Any, query: Query) -> None:
                 # the query was still executed
                 # modified in stop_query in views / core.py is reflected  here.
                 # stop query
-                if query.extra.get(QUERY_EARLY_CANCEL_KEY):
+                if query.extra.get(QUERY_EARLY_CANCEL_KEY) or query.status in (
+                    QueryStatus.STOPPED,
+                    QueryStatus.TIMED_OUT,
+                ):
                     cursor.cancel_operation()
                     cursor.close_operation()
                     cursor.close()

Review Comment:
   ✅ **CodeAnt verified this suggestion was addressed in subsequent commits and 
marked this thread resolved** as of `2458ced`.
   
   The cancellation exception is caught and logged, after which 
`cursor.close_operation()` and `cursor.close()` run under exception 
suppression, preventing the live operation from being left open.
   
   <sub>If that's not right, unresolve this thread and CodeAnt will leave it 
open.</sub>
   
   <!-- codeant-auto-resolve-reply -->



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to