forked from github/dataease
Merge pull request #5185 from dataease/pr@dev@fixextratdata
Pr@dev@fixextratdata
This commit is contained in:
commit
219c339c67
@ -787,7 +787,7 @@ public class JdbcProvider extends DefaultJdbcProvider {
|
|||||||
if(redshiftConfiguration.getDataBase().length() > 64 || redshiftConfiguration.getDataBase().length() < 1){
|
if(redshiftConfiguration.getDataBase().length() > 64 || redshiftConfiguration.getDataBase().length() < 1){
|
||||||
throw new Exception("Invalid database name");
|
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");
|
throw new Exception("Invalid database name");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1122,8 +1122,7 @@ public class DataSetTableService {
|
|||||||
SelectBody selectBody = ((SubSelect) fromItem).getSelectBody();
|
SelectBody selectBody = ((SubSelect) fromItem).getSelectBody();
|
||||||
SubSelect subSelect = new SubSelect();
|
SubSelect subSelect = new SubSelect();
|
||||||
Select subSelectTmp = (Select) CCJSqlParserUtil.parse(removeVariables(selectBody.toString(), dsType));
|
Select subSelectTmp = (Select) CCJSqlParserUtil.parse(removeVariables(selectBody.toString(), dsType));
|
||||||
PlainSelect subPlainSelect = ((PlainSelect) subSelectTmp.getSelectBody());
|
subSelect.setSelectBody(subSelectTmp.getSelectBody());
|
||||||
subSelect.setSelectBody(subPlainSelect);
|
|
||||||
if (dsType.equals(DatasourceTypes.oracle.getType())) {
|
if (dsType.equals(DatasourceTypes.oracle.getType())) {
|
||||||
subSelect.setAlias(new Alias(fromItem.getAlias().toString(), false));
|
subSelect.setAlias(new Alias(fromItem.getAlias().toString(), false));
|
||||||
} else {
|
} else {
|
||||||
@ -1280,7 +1279,7 @@ public class DataSetTableService {
|
|||||||
QueryProvider qp = ProviderFactory.getQueryProvider(ds.getType());
|
QueryProvider qp = ProviderFactory.getQueryProvider(ds.getType());
|
||||||
String sqlAsTable = qp.createSQLPreview(sql, null);
|
String sqlAsTable = qp.createSQLPreview(sql, null);
|
||||||
datasourceRequest.setQuery(sqlAsTable);
|
datasourceRequest.setQuery(sqlAsTable);
|
||||||
|
System.out.println(sqlAsTable);
|
||||||
Map<String, List> result;
|
Map<String, List> result;
|
||||||
try {
|
try {
|
||||||
datasetSqlLog.setStartTime(System.currentTimeMillis());
|
datasetSqlLog.setStartTime(System.currentTimeMillis());
|
||||||
|
Loading…
Reference in New Issue
Block a user