fix: 【数据集】oracle历史数据查看提示异常

This commit is contained in:
taojinlong
2025-01-10 16:00:56 +08:00
committed by taojinlong
parent 891850aa01
commit c85195fcb1

View File

@@ -50,13 +50,14 @@ public class SqlparserUtils {
private final List<Map<String, String>> sysParams = new ArrayList<>();
public String handleVariableDefaultValue(String sql, String sqlVariableDetails, boolean isEdit, boolean isFromDataSet, List<SqlVariableDetails> parameters, boolean isCross, Map<Long, DatasourceSchemaDTO> dsMap, PluginManageApi pluginManage, UserFormVO userEntity) {
DatasourceSchemaDTO ds = dsMap.entrySet().iterator().next().getValue();
if (StringUtils.isEmpty(sql)) {
DEException.throwException(Translator.get("i18n_sql_not_empty"));
}
this.userEntity = userEntity;
try {
this.removeSysParams = true;
removeVariables(sql, "");
removeVariables(sql, ds.getType());
} catch (Exception e) {
DEException.throwException(e);
}
@@ -103,7 +104,6 @@ public class SqlparserUtils {
}
try {
DatasourceSchemaDTO ds = dsMap.entrySet().iterator().next().getValue();
this.removeSysParams = false;
sql = removeVariables(sql, ds.getType());
// replace keyword '`'