[improvement][headless&chat]Move EntityInfoProcessor from chat to headless module and optimize code.

[improvement][headless&chat]Move `EntityInfoProcessor` from `chat` to `headless` module and optimize code.
This commit is contained in:
jerryjzhang
2024-07-27 16:40:05 +08:00
parent ebbb519c07
commit e5504473a4
19 changed files with 108 additions and 134 deletions

View File

@@ -244,7 +244,7 @@ public class SqlSelectHelper {
return plainSelects;
}
public static List<String> getAllFields(String sql) {
public static List<String> getAllSelectFields(String sql) {
List<PlainSelect> plainSelects = getPlainSelects(getPlainSelect(sql));
Set<String> results = new HashSet<>();
for (PlainSelect plainSelect : plainSelects) {

View File

@@ -28,8 +28,8 @@ public class SqlValidHelper {
}
//2. all fields
List<String> thisAllFields = SqlSelectHelper.getAllFields(thisSql);
List<String> otherAllFields = SqlSelectHelper.getAllFields(otherSql);
List<String> thisAllFields = SqlSelectHelper.getAllSelectFields(thisSql);
List<String> otherAllFields = SqlSelectHelper.getAllSelectFields(otherSql);
if (!CollectionUtils.isEqualCollection(thisAllFields, otherAllFields)) {
return false;