mirror of
https://github.com/dataease/dataease.git
synced 2026-05-23 05:48:13 +08:00
feat(数据源): calcite支持es
This commit is contained in:
@@ -138,7 +138,9 @@ public abstract class Provider {
|
||||
|
||||
// 获取数据库version
|
||||
ConnectionObj connection = getConnection(value);
|
||||
value.setDsVersion(connection.getConnection().getMetaData().getDatabaseMajorVersion());
|
||||
if (connection != null) {
|
||||
value.setDsVersion(connection.getConnection().getMetaData().getDatabaseMajorVersion());
|
||||
}
|
||||
|
||||
SqlParser parser = SqlParser.create(sql, SqlParser.Config.DEFAULT.withLex(Lex.JAVA));
|
||||
SqlNode sqlNode = parser.parseStmt();
|
||||
@@ -227,6 +229,9 @@ public abstract class Provider {
|
||||
case h2:
|
||||
sqlDialect = H2SqlDialect.DEFAULT;
|
||||
break;
|
||||
case es:
|
||||
sqlDialect = EsSqlDialect.DEFAULT;
|
||||
break;
|
||||
default:
|
||||
sqlDialect = MysqlSqlDialect.DEFAULT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user