From 8665951981b48fad051fe7457af5fddf8e61de87 Mon Sep 17 00:00:00 2001 From: izualzhy Date: Fri, 3 Nov 2023 14:44:27 +0800 Subject: [PATCH] [fix-#11726] fix error when set connection proerty both in the URL and an argument (#15093) Co-authored-by: zhangying14 Co-authored-by: xiangzihao <460888207@qq.com> --- .../presto/param/PrestoDataSourceProcessor.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-presto/src/main/java/org/apache/dolphinscheduler/plugin/datasource/presto/param/PrestoDataSourceProcessor.java b/dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-presto/src/main/java/org/apache/dolphinscheduler/plugin/datasource/presto/param/PrestoDataSourceProcessor.java index 06f22a705a..e466ea98c9 100644 --- a/dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-presto/src/main/java/org/apache/dolphinscheduler/plugin/datasource/presto/param/PrestoDataSourceProcessor.java +++ b/dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-presto/src/main/java/org/apache/dolphinscheduler/plugin/datasource/presto/param/PrestoDataSourceProcessor.java @@ -102,10 +102,11 @@ public class PrestoDataSourceProcessor extends AbstractDataSourceProcessor { @Override public String getJdbcUrl(ConnectionParam connectionParam) { PrestoConnectionParam prestoConnectionParam = (PrestoConnectionParam) connectionParam; - if (MapUtils.isNotEmpty(prestoConnectionParam.getOther())) { - return String.format("%s?%s", prestoConnectionParam.getJdbcUrl(), - transformOther(prestoConnectionParam.getOther())); - } + /** + * return jdbc url without other parameters, avoid to assign same parameters both in URL and properties. + * or else got error msg: Connection property '...' is both in the URL and an argument + * ref to Presto JDBC Driver + */ return prestoConnectionParam.getJdbcUrl(); }