[fix][headless]Fix schema corrector test cases. (#2027)

This commit is contained in:
Jun Zhang
2025-02-02 15:52:23 +08:00
committed by GitHub
parent d294fec2a0
commit 0417f12324
3 changed files with 14 additions and 12 deletions

View File

@@ -666,8 +666,9 @@ public class SqlSelectHelper {
}
if (withSelect instanceof ParenthesedSelect) {
ParenthesedSelect parenthesedSelect = (ParenthesedSelect) withSelect;
PlainSelect withPlainSelect = parenthesedSelect.getPlainSelect();
plainSelectList.add(withPlainSelect);
List<PlainSelect> plainSelects = new ArrayList<>();
SqlReplaceHelper.getFromSelect(parenthesedSelect, plainSelects);
plainSelectList.addAll(plainSelects);
}
}
}
@@ -893,7 +894,9 @@ public class SqlSelectHelper {
collectSelects(withItem.getSelect(), selects);
} else if (select instanceof ParenthesedSelect) {
ParenthesedSelect parenthesedSelect = (ParenthesedSelect) select;
collectSelects(parenthesedSelect.getPlainSelect(), selects);
List<PlainSelect> plainSelects = new ArrayList<>();
SqlReplaceHelper.getFromSelect(parenthesedSelect, plainSelects);
plainSelects.forEach(s -> collectSelects(s, selects));
}
}