hyjunhyj commented on code in PR #11260:
URL: https://github.com/apache/dolphinscheduler/pull/11260#discussion_r969480214


##########
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-presto/src/main/java/org/apache/dolphinscheduler/plugin/datasource/presto/param/PrestoDataSourceProcessor.java:
##########
@@ -70,15 +73,16 @@ public BaseDataSourceParamDTO 
createDatasourceParamDTO(String connectionJson) {
     public BaseConnectionParam createConnectionParams(BaseDataSourceParamDTO 
datasourceParam) {
         PrestoDataSourceParamDTO prestoParam = (PrestoDataSourceParamDTO) 
datasourceParam;
         String address = String.format("%s%s:%s", Constants.JDBC_PRESTO, 
prestoParam.getHost(), prestoParam.getPort());
-        String jdbcUrl = address + "/" + prestoParam.getDatabase();
+        String jdbcUrl = address + Constants.SLASH + prestoParam.getDatabase();
 
         PrestoConnectionParam prestoConnectionParam = new 
PrestoConnectionParam();
         prestoConnectionParam.setUser(prestoParam.getUserName());
         
prestoConnectionParam.setPassword(PasswordUtils.encodePassword(prestoParam.getPassword()));
         prestoConnectionParam.setOther(transformOther(prestoParam.getOther()));
         prestoConnectionParam.setAddress(address);
         prestoConnectionParam.setJdbcUrl(jdbcUrl);
-        prestoConnectionParam.setDatabase(prestoParam.getDatabase());
+        
prestoConnectionParam.setDatabase(prestoParam.getDatabase().split(Constants.SLASH)[0]);
+        
prestoConnectionParam.setSchema(prestoParam.getDatabase().split(Constants.SLASH)[1]);

Review Comment:
   I also thought about modifying the UI before, because I couldn't find a 
front-end developer in the company to modify it temporarily, but I needed to 
use the feature at that time, so I changed it in this way.



-- 
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]

Reply via email to