silvermissile opened a new issue, #18725: URL: https://github.com/apache/dolphinscheduler/issues/18725
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) first to see whether the same feature was requested already. ### Description Currently, in `dolphinscheduler-datasource-kyuubi` (and `dolphinscheduler-datasource-hive`), DolphinScheduler constructs the JDBC URL by forcibly concatenating parameters using semicolons (`;`): ```java // KyuubiDataSourceProcessor.java @Override public String getJdbcUrl(ConnectionParam connectionParam) { KyuubiConnectionParam kyuubiConnectionParam = (KyuubiConnectionParam) connectionParam; String jdbcUrl = kyuubiConnectionParam.getJdbcUrl(); if (MapUtils.isNotEmpty(kyuubiConnectionParam.getOther())) { return jdbcUrl + ";" + transformOther(kyuubiConnectionParam.getOther()); } return jdbcUrl; } private String transformOther(Map<String, String> otherMap) { if (MapUtils.isEmpty(otherMap)) { return null; } List<String> otherList = new ArrayList<>(); otherMap.forEach((key, value) -> otherList.add(String.format("%s=%s", key, value))); return String.join(";", otherList); } ``` However, according to the official [Apache Kyuubi JDBC URL Specification](https://kyuubi.apache.org/docs/latest/deployment/settings.html#jdbc-url), Kyuubi relies on a standard three-segment URL structure: ```text jdbc:hive2://<host>:<port>/<db>;<sessionVars>?<hiveVars>#<kyuubiSessionVars> ``` Where: 1. `;` precedes `<sessionVars>` (Engine / Hadoop / Spark session configurations) 2. `?` precedes `<hiveVars>` (Script-level variable substitution) 3. `#` precedes `<kyuubiSessionVars>` (Kyuubi Server-level engine routing and lifecycle control, e.g., `#kyuubi.engine.share.level=USER`, `#kyuubi.engine.type=SPARK_SQL`, `#spark.driver.memory=4g`) ### Problem & Real-world Impact 1. **Broken Engine Routing**: When users attempt to configure Kyuubi engine isolation (e.g. `kyuubi.engine.share.level=USER`) via the `other` configuration map, DolphinScheduler joins it with `;`. Kyuubi server treats this as an ordinary SQL session configuration instead of recognizing it as a Kyuubi-level engine directive. 2. **Driver Syntax Error**: If users prefix the key with `#` (e.g., `#kyuubi.engine.share.level`), DolphinScheduler renders it as `.../default;;#kyuubi...` or `;#kyuubi...`, causing Thrift / Kyuubi JDBC driver parsing exceptions. 3. **Lack of Raw URL Passthrough**: Enterprise users cannot pass custom, fine-tuned Kyuubi JDBC connection strings through the REST API or Web UI, forcing them to manually hack the metadata table (`t_ds_datasource.connection_params`) directly in MySQL. ### Use case In enterprise Lakehouse environments (Spark on Kyuubi / Trino on Kyuubi), different scheduling tenants or critical workflows require dedicated Spark Driver instances and custom RPC timeouts (e.g., `#kyuubi.engine.share.level=USER`, `#kyuubi.engine.initialize.timeout=PT3M`). Users should be able to: 1. Either specify the full custom JDBC URL directly via an optional `rawJdbcUrl` parameter; 2. Or configure Kyuubi session variables (`#`) and hive variables (`?`) cleanly through dedicated parameters in `KyuubiDataSourceParamDTO` without having them flattened into semicolon-separated strings. ### Related issues None found. ### Are you willing to submit a PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
