From c1b7ee970aa149f74cd29afa74516ad1b841af0b Mon Sep 17 00:00:00 2001 From: lh xg Date: Mon, 19 Feb 2024 15:34:51 +0800 Subject: [PATCH] SQLParserUtils.splitAndRemoveComment(sql, com.alibaba.druid.DbType.xugu) --- .../datasource/xugu/param/XuguDataSourceProcessor.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-xugu/src/main/java/org/apache/dolphinscheduler/plugin/datasource/xugu/param/XuguDataSourceProcessor.java b/dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-xugu/src/main/java/org/apache/dolphinscheduler/plugin/datasource/xugu/param/XuguDataSourceProcessor.java index f73ed22c7360..5bdcbafba01a 100644 --- a/dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-xugu/src/main/java/org/apache/dolphinscheduler/plugin/datasource/xugu/param/XuguDataSourceProcessor.java +++ b/dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-xugu/src/main/java/org/apache/dolphinscheduler/plugin/datasource/xugu/param/XuguDataSourceProcessor.java @@ -37,6 +37,7 @@ import java.util.List; import java.util.Map; +import com.alibaba.druid.sql.parser.SQLParserUtils; import com.google.auto.service.AutoService; @AutoService(DataSourceProcessor.class) @@ -48,7 +49,7 @@ public BaseDataSourceParamDTO castDatasourceParamDTO(String paramJson) { } @Override - public BaseDataSourceParamDTO createDatasourceParamDTO(String connectionJson) throws NumberFormatException{ + public BaseDataSourceParamDTO createDatasourceParamDTO(String connectionJson){ XuguConnectionParam connectionParams = (XuguConnectionParam) createConnectionParams(connectionJson); XuguDataSourceParamDTO xuguDataSourceParamDTO = new XuguDataSourceParamDTO(); @@ -129,6 +130,11 @@ public DataSourceProcessor create() { return new XuguDataSourceProcessor(); } + @Override + public List splitAndRemoveComment(String sql) { + return SQLParserUtils.splitAndRemoveComment(sql, com.alibaba.druid.DbType.xugu); + } + private String transformOther(Map paramMap) { if (MapUtils.isEmpty(paramMap)) { return null;