Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
fix: MySQL et al. super calls (apache#23971)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2af76fc)
  • Loading branch information
john-bodley committed May 10, 2023
1 parent 7ce8f6d commit 2f23d53
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 7 additions & 3 deletions superset/db_engine_specs/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,13 @@ def adjust_engine_params(
catalog: Optional[str] = None,
schema: Optional[str] = None,
) -> Tuple[URL, Dict[str, Any]]:
uri, new_connect_args = super(
MySQLEngineSpec, MySQLEngineSpec
).adjust_engine_params(uri, connect_args, catalog, schema)
uri, new_connect_args = super().adjust_engine_params(
uri,
connect_args,
catalog,
schema,
)

if schema:
uri = uri.set(database=parse.quote(schema, safe=""))

Expand Down
4 changes: 1 addition & 3 deletions superset/db_engine_specs/ocient.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,7 @@ def fetch_data(
cls, cursor: Any, limit: Optional[int] = None
) -> List[Tuple[Any, ...]]:
try:
rows: List[Tuple[Any, ...]] = super(OcientEngineSpec, cls).fetch_data(
cursor, limit
)
rows: List[Tuple[Any, ...]] = super().fetch_data(cursor, limit)
except Exception as exception:
with OcientEngineSpec.query_id_mapping_lock:
del OcientEngineSpec.query_id_mapping[
Expand Down

0 comments on commit 2f23d53

Please sign in to comment.