mirror of
https://github.com/dataease/dataease.git
synced 2026-06-13 01:01:20 +08:00
fix: 解析sql失败
This commit is contained in:
@@ -2980,6 +2980,16 @@ public class DataSetTableService {
|
||||
}
|
||||
if (inExpression.getRightExpression() != null) {
|
||||
getBuffer().append(" ( ");
|
||||
if (inExpression.getRightExpression() instanceof SubSelect) {
|
||||
try {
|
||||
SubSelect subSelect = (SubSelect) inExpression.getRightExpression();
|
||||
Select select = (Select) CCJSqlParserUtil.parse(removeVariables(subSelect.getSelectBody().toString(), ""));
|
||||
subSelect.setSelectBody(select.getSelectBody());
|
||||
inExpression.setRightExpression(subSelect);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
inExpression.getRightExpression().accept(this);
|
||||
getBuffer().append(" )");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user