liujiwen-up commented on code in PR #31580:
URL: https://github.com/apache/superset/pull/31580#discussion_r1896339645
##########
superset/db_engine_specs/doris.py:
##########
@@ -245,17 +248,45 @@ def adjust_engine_params(
catalog: Optional[str] = None,
schema: Optional[str] = None,
) -> tuple[URL, dict[str, Any]]:
- database = uri.database
- if schema and database:
- schema = parse.quote(schema, safe="")
- if "." in database:
- database = database.split(".")[0] + "." + schema
- else:
- database = "internal." + schema
- uri = uri.set(database=database)
-
+ if uri.database and "." in uri.database:
+ current_catalog, _ = uri.database.split(".", 1)
+ else:
+ current_catalog = "internal"
+
+ # In Apache Doris, each catalog has an information_schema for BI tool
+ # compatibility. See: https://github.com/apache/doris/pull/28919
+ adjusted_database = ".".join(
+ [catalog or current_catalog or "", "information_schema"]
+ ).rstrip(".")
Review Comment:
@villebro Yes, you are right. Thank you very much for your suggestion. I
have modified it according to your suggestion.
--
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]