rusackas commented on code in PR #42900:
URL: https://github.com/apache/superset/pull/42900#discussion_r4340329371
##########
superset/db_engine_specs/databricks.py:
##########
@@ -775,6 +776,11 @@ class
DatabricksPythonConnectorEngineSpec(DatabricksDynamicBaseEngineSpec):
parameters_schema = DatabricksPythonConnectorSchema()
+ # The driver only populates `cursor.active_command_id` once a statement has
+ # actually been executed, so the cancel id can't be captured up front like
+ # it can for engines where it's tied to the session rather than the query.
+ has_query_id_before_execute = False
Review Comment:
Agreed with @sadpandajoe here. Since the ID only gets captured after
`execute()` returns, a Stop mid-statement can't reach the running one, and on a
multi-statement script it'll cancel the previous block's (already finished) ID
and report success while the current block keeps running on the warehouse.
Looks like the driver has `execute_async` / `is_query_pending` now, so the
Impala/Trino-style poll-and-cancel loop seems doable. @eschutho would you
rather do that here, or scope this one down to "stops between statements" (and
clear the stale ID) and leave in-flight cancel for a follow-up? Happy with
either, but I'd hold off merging until one of those lands.
--
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]