mistercrunch commented on code in PR #31315:
URL: https://github.com/apache/superset/pull/31315#discussion_r1873686127


##########
superset/models/core.py:
##########
@@ -691,27 +731,30 @@ def _log_query(sql: str) -> None:
         with self.get_raw_connection(catalog=catalog, schema=schema) as conn:

Review Comment:
   That was my original plan, but some code like Database.get_df() doesnt use 
get_raw_connection. Also looked at get_sqla_engine and other areas in 
DbEngineSpec. There's a fair amount of indirection and a deep, conditional call 
stack around analytics queries... One thing I found is that with context 
managers like Database.get_sqla_engine, we offer a lease on a connection and 
there's no guarantees that the code using it won't need a metadata connection...



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