fix: [Bug]doris数据源,sql数据集中使用参数时,sql中含有两行空行时执行报错 #7750

This commit is contained in:
taojinlong 2024-01-23 15:46:06 +08:00
parent af16c16c5c
commit 06f0d69bcc

View File

@ -1053,7 +1053,7 @@ public class DataSetTableService {
}
public String removeVariables(final String sql, String dsType) throws Exception {
String tmpSql = sql;
String tmpSql = sql.replaceAll("(?m)^\\s*$[\n\r]{0,}", "");
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(tmpSql);
boolean hasVariables = false;