Skip to content

Commit

Permalink
fix: MySQL et al. super calls (#23971)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-bodley committed May 8, 2023
1 parent 724fd82 commit 2af76fc
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 2af76fc

Please sign in to comment.