fix: 解析sql失败

This commit is contained in:
taojinlong 2023-12-28 15:38:41 +08:00
parent 70ee4b2c13
commit feae0b9169

View File

@ -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(" )");
}