betodealmeida commented on a change in pull request #13244:
URL: https://github.com/apache/superset/pull/13244#discussion_r579434700
##########
File path: superset/db_engine_specs/base.py
##########
@@ -941,7 +975,8 @@ def execute(cls, cursor: Any, query: str, **kwargs: Any) ->
None:
try:
cursor.execute(query)
except Exception as ex:
- raise cls.get_dbapi_mapped_exception(ex)
+ dbapi = importlib.import_module(cursor.__module__)
Review comment:
I'm not super happy with this, since in theory the cursor could be
defined in a submodule that doesn't have the exceptions in scope.
The alternative is to pass the database or engine instance to
`db_engine_spec.execute` and `db_engine_spec.fetch_data`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]