john-bodley commented on code in PR #24488:
URL: https://github.com/apache/superset/pull/24488#discussion_r1239187318


##########
superset/utils/core.py:
##########
@@ -815,12 +815,15 @@ def __exit__(  # pylint: 
disable=redefined-outer-name,redefined-builtin
 
 def pessimistic_connection_handling(some_engine: Engine) -> None:
     @event.listens_for(some_engine, "engine_connect")
-    def ping_connection(connection: Connection, branch: bool) -> None:
+    def on_connect(connection: Connection, branch: bool) -> None:
         if branch:
             # 'branch' refers to a sub-connection of a connection,
             # we don't want to bother pinging on these.
             return
 
+        if connection.dialect.name == "sqlite":

Review Comment:
   See 
[here](https://docs.sqlalchemy.org/en/20/dialects/sqlite.html#foreign-key-support)
 for why this is needed. I do wonder if we should drop support for SQLite given 
it's not supported in production. We already skip a bunch of tests, i.e., 
   
   ```python
   if backend() == "sqlite":
       return
   ```
   
   possibly because of how the foreign key constraints have no impact on the 
underlying table.



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