(improvement)(chat)LLM might output table or column with `` enclose, should handle with it.

This commit is contained in:
jerryjzhang
2025-02-18 12:48:26 +08:00
parent a067d2cace
commit 17a3dd052c

View File

@@ -294,7 +294,8 @@ public class SqlSelectHelper {
}
// do not account in aliases
results.removeAll(aliases);
return new ArrayList<>(results);
return new ArrayList<>(
results.stream().map(r -> r.replaceAll("`", "")).collect(Collectors.toList()));
}
private static List<String> getFieldsByPlainSelect(PlainSelect plainSelect) {