fix: 修复数据集调试执行成功,保存报错,不使用参数也可以保存成功 #13317

This commit is contained in:
taojinlong 2024-11-18 16:37:22 +08:00
parent 0f7adb02f6
commit 75561c6e8f

View File

@ -507,6 +507,12 @@ public class SqlparserUtils {
if (StringUtils.isEmpty(sql)) {
DEException.throwException(Translator.get("i18n_sql_not_empty"));
}
try {
removeVariables(sql, "");
} catch (Exception e) {
DEException.throwException(e);
}
sql = sql.trim();
if (sql.endsWith(";")) {
sql = sql.substring(0, sql.length() - 1);