mirror of
https://github.com/dataease/dataease.git
synced 2026-05-16 05:50:45 +08:00
fix: 解析sql,抛出错误信息
This commit is contained in:
@@ -123,7 +123,6 @@ public class HttpClientUtil {
|
||||
EntityBuilder entityBuilder = EntityBuilder.create();
|
||||
entityBuilder.setText(json);
|
||||
entityBuilder.setContentType(ContentType.APPLICATION_JSON);
|
||||
entityBuilder.setContentEncoding(config.getCharset());
|
||||
HttpEntity requestEntity = entityBuilder.build();
|
||||
httpPost.setEntity(requestEntity);
|
||||
|
||||
|
||||
@@ -1116,6 +1116,9 @@ public class DataSetTableService {
|
||||
if (dsType.equals(DatasourceTypes.oracle.getType())) {
|
||||
subSelect.setAlias(new Alias(fromItem.getAlias().toString(), false));
|
||||
} else {
|
||||
if(fromItem.getAlias() == null){
|
||||
throw new Exception("Failed to parse sql, Every derived table must have its own alias!");
|
||||
}
|
||||
subSelect.setAlias(new Alias(fromItem.getAlias().toString()));
|
||||
}
|
||||
plainSelect.setFromItem(subSelect);
|
||||
|
||||
Reference in New Issue
Block a user