Merge pull request #5185 from dataease/pr@dev@fixextratdata

Pr@dev@fixextratdata
This commit is contained in:
taojinlong 2023-05-11 14:32:47 +08:00 committed by GitHub
commit 219c339c67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -787,7 +787,7 @@ public class JdbcProvider extends DefaultJdbcProvider {
if(redshiftConfiguration.getDataBase().length() > 64 || redshiftConfiguration.getDataBase().length() < 1){
throw new Exception("Invalid database name");
}
if(!redshiftConfiguration.getDataBase().matches("\"^[a-z][a-z0-9_+.@-]*$\"")){
if(!redshiftConfiguration.getDataBase().matches("^[a-z][a-z0-9_+.@-]*$")){
throw new Exception("Invalid database name");
}
break;

View File

@ -1122,8 +1122,7 @@ public class DataSetTableService {
SelectBody selectBody = ((SubSelect) fromItem).getSelectBody();
SubSelect subSelect = new SubSelect();
Select subSelectTmp = (Select) CCJSqlParserUtil.parse(removeVariables(selectBody.toString(), dsType));
PlainSelect subPlainSelect = ((PlainSelect) subSelectTmp.getSelectBody());
subSelect.setSelectBody(subPlainSelect);
subSelect.setSelectBody(subSelectTmp.getSelectBody());
if (dsType.equals(DatasourceTypes.oracle.getType())) {
subSelect.setAlias(new Alias(fromItem.getAlias().toString(), false));
} else {
@ -1280,7 +1279,7 @@ public class DataSetTableService {
QueryProvider qp = ProviderFactory.getQueryProvider(ds.getType());
String sqlAsTable = qp.createSQLPreview(sql, null);
datasourceRequest.setQuery(sqlAsTable);
System.out.println(sqlAsTable);
Map<String, List> result;
try {
datasetSqlLog.setStartTime(System.currentTimeMillis());