This commit is contained in:
@ -65,7 +65,6 @@ import java.util.Map;
|
||||
public class JdbcResource extends Resource {
|
||||
private static final Logger LOG = LogManager.getLogger(JdbcResource.class);
|
||||
|
||||
public static final String JDBC_NEBULA = "jdbc:nebula";
|
||||
public static final String JDBC_MYSQL = "jdbc:mysql";
|
||||
public static final String JDBC_MARIADB = "jdbc:mariadb";
|
||||
public static final String JDBC_POSTGRESQL = "jdbc:postgresql";
|
||||
@ -78,7 +77,6 @@ public class JdbcResource extends Resource {
|
||||
public static final String JDBC_OCEANBASE = "jdbc:oceanbase";
|
||||
public static final String JDBC_DB2 = "jdbc:db2";
|
||||
|
||||
public static final String NEBULA = "NEBULA";
|
||||
public static final String MYSQL = "MYSQL";
|
||||
public static final String POSTGRESQL = "POSTGRESQL";
|
||||
public static final String ORACLE = "ORACLE";
|
||||
@ -323,8 +321,6 @@ public class JdbcResource extends Resource {
|
||||
return PRESTO;
|
||||
} else if (url.startsWith(JDBC_OCEANBASE)) {
|
||||
return OCEANBASE;
|
||||
} else if (url.startsWith(JDBC_NEBULA)) {
|
||||
return NEBULA;
|
||||
} else if (url.startsWith(JDBC_DB2)) {
|
||||
return DB2;
|
||||
}
|
||||
|
||||
@ -92,7 +92,6 @@ public class JdbcTable extends Table {
|
||||
|
||||
static {
|
||||
Map<String, TOdbcTableType> tempMap = new CaseInsensitiveMap();
|
||||
tempMap.put("nebula", TOdbcTableType.NEBULA);
|
||||
tempMap.put("mysql", TOdbcTableType.MYSQL);
|
||||
tempMap.put("postgresql", TOdbcTableType.POSTGRESQL);
|
||||
tempMap.put("sqlserver", TOdbcTableType.SQLSERVER);
|
||||
|
||||
@ -98,7 +98,6 @@ public class JdbcScanNode extends ExternalScanNode {
|
||||
@Override
|
||||
public void init(Analyzer analyzer) throws UserException {
|
||||
super.init(analyzer);
|
||||
getGraphQueryString();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -112,25 +111,6 @@ public class JdbcScanNode extends ExternalScanNode {
|
||||
cardinality = (long) statsDeriveResult.getRowCount();
|
||||
}
|
||||
|
||||
private boolean isNebula() {
|
||||
return jdbcType == TOdbcTableType.NEBULA;
|
||||
}
|
||||
|
||||
private void getGraphQueryString() {
|
||||
if (!isNebula()) {
|
||||
return;
|
||||
}
|
||||
for (Expr expr : conjuncts) {
|
||||
FunctionCallExpr functionCallExpr = (FunctionCallExpr) expr;
|
||||
if ("g".equals(functionCallExpr.getFnName().getFunction())) {
|
||||
graphQueryString = functionCallExpr.getChild(0).getStringValue();
|
||||
break;
|
||||
}
|
||||
}
|
||||
// clean conjusts cause graph sannnode no need conjuncts
|
||||
conjuncts = Lists.newArrayList();
|
||||
}
|
||||
|
||||
private void createJdbcFilters() {
|
||||
if (conjuncts.isEmpty()) {
|
||||
return;
|
||||
@ -194,9 +174,6 @@ public class JdbcScanNode extends ExternalScanNode {
|
||||
}
|
||||
|
||||
private String getJdbcQueryStr() {
|
||||
if (isNebula()) {
|
||||
return graphQueryString;
|
||||
}
|
||||
StringBuilder sql = new StringBuilder("SELECT ");
|
||||
|
||||
// Oracle use the where clause to do top n
|
||||
|
||||
Reference in New Issue
Block a user