[fix-#11726] fix error when set connection proerty both in the URL and an argument (#15093)
Co-authored-by: zhangying14 <zhangying14@zuoyebang.com> Co-authored-by: xiangzihao <460888207@qq.com>
This commit is contained in:
parent
dc503b0e00
commit
8665951981
|
|
@ -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 <a href="https://prestodb.io/docs/current/installation/jdbc.html">Presto JDBC Driver</>
|
||||
*/
|
||||
return prestoConnectionParam.getJdbcUrl();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue