From f8564d83680a276e6d0f7b5be750833850f6f5ae Mon Sep 17 00:00:00 2001 From: junjun Date: Thu, 26 Sep 2024 15:12:25 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=95=B0=E6=8D=AE=E6=BA=90):=20calcite?= =?UTF-8?q?=E6=94=AF=E6=8C=81es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../dataease/extensions/datasource/provider/Provider.java | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index db82b06709..c24c391f12 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ 3.5.6 2.2.220 4.4.0 - 1.35.14 + 1.35.15 2.6.0 3.5.2 3.12.1 diff --git a/sdk/extensions/extensions-datasource/src/main/java/io/dataease/extensions/datasource/provider/Provider.java b/sdk/extensions/extensions-datasource/src/main/java/io/dataease/extensions/datasource/provider/Provider.java index 78c6075039..fa55a9565c 100644 --- a/sdk/extensions/extensions-datasource/src/main/java/io/dataease/extensions/datasource/provider/Provider.java +++ b/sdk/extensions/extensions-datasource/src/main/java/io/dataease/extensions/datasource/provider/Provider.java @@ -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; }