(improvement) improve evalution accuracy (#727)

This commit is contained in:
mainmain
2024-02-19 17:31:38 +08:00
committed by GitHub
parent fdb69547e6
commit 699a33b1c1
13 changed files with 112 additions and 53 deletions

View File

@@ -484,7 +484,15 @@ public class SqlSelectHelper {
SelectBody selectBody = selectStatement.getSelectBody();
if (selectBody instanceof PlainSelect) {
PlainSelect plainSelect = (PlainSelect) selectBody;
return (Table) plainSelect.getFromItem();
if (plainSelect.getFromItem() instanceof Table) {
return (Table) plainSelect.getFromItem();
}
if (plainSelect.getFromItem() instanceof SubSelect) {
SubSelect subSelect = (SubSelect) plainSelect.getFromItem();
return getTable(subSelect.getSelectBody().toString());
}
} else if (selectBody instanceof SetOperationList) {
SetOperationList setOperationList = (SetOperationList) selectBody;
if (!CollectionUtils.isEmpty(setOperationList.getSelects())) {