kazanzhy commented on code in PR #27514:
URL: https://github.com/apache/airflow/pull/27514#discussion_r1014628068


##########
airflow/providers/common/sql/operators/sql.py:
##########
@@ -221,6 +220,16 @@ def execute(self, context):
 
         return output
 
+    def on_kill(self) -> None:
+        self.log.info("Stopping:", self._hook.query_ids)
+
+        results = []
+        for query_id in self._hook.query_ids.copy():
+            result = self._hook.stop_query(query_id)
+            results.append(result)
+
+        self.log.info("Termination successful:", results)

Review Comment:
   You're right. But the current solution for Trino tries to stop query anyway
   
https://github.com/apache/airflow/blob/9337aa92c082db36e82eb314585591394fe8ff27/airflow/providers/trino/operators/trino.py#L62



-- 
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]

Reply via email to