Merge pull request #4448 from majinju/master

新增对华为mpp数据库gaussdb和开源mpp数据库greenplum支持。
This commit is contained in:
温绍锦
2021-09-20 13:43:02 +08:00
committed by GitHub
4 changed files with 19 additions and 0 deletions
@@ -47,6 +47,14 @@ public enum DbType {
mock (1 << 34),
sybase (1 << 35),
highgo (1 << 36),
/**
* 非常成熟的开源mpp数据库
*/
greenplum (1 << 37),
/**
* 华为的mpp数据库
*/
gaussdb (1 << 38),
ingres (0),
@@ -136,4 +136,9 @@ public interface JdbcConstants {
*/
DbType POLARDB = DbType.polardb;
String POLARDB_DRIVER = "com.aliyun.polardb.Driver";
/**
* GreenPlum
*/
DbType GREENPLUM = DbType.greenplum;
String GREENPLUM_DRIVER = "com.pivotal.jdbc.GreenplumDriver";
}
@@ -632,6 +632,8 @@ public final class JdbcUtils implements JdbcConstants {
return DbType.polardb;
} else if (rawUrl.startsWith("jdbc:highgo:")) {
return DbType.highgo;
} else if (rawUrl.startsWith("jdbc:pivotal:greenplum:")||rawUrl.startsWith("jdbc:datadirect:greenplum:")) {
return DbType.greenplum;
} else {
return null;
}
@@ -965,6 +967,8 @@ public final class JdbcUtils implements JdbcConstants {
case postgresql:
case edb:
case polardb:
case greenplum:
case gaussdb:
return true;
default:
return false;
@@ -162,6 +162,8 @@ public class WallFilter extends FilterAdapter implements WallFilterMBean {
case postgresql:
case edb:
case polardb:
case greenplum:
case gaussdb:
if (config == null) {
config = new WallConfig(PGWallProvider.DEFAULT_CONFIG_DIR);
}