fix: 解析sql,抛出错误信息
This commit is contained in:
parent
d696d36727
commit
4ce8baf309
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user