(fix)(headless)Fix show type and retrieve issues.
Some checks failed
supersonic CentOS CI / build (21) (push) Has been cancelled
supersonic mac CI / build (21) (push) Has been cancelled
supersonic ubuntu CI / build (21) (push) Has been cancelled
supersonic windows CI / build (21) (push) Has been cancelled

This commit is contained in:
jerryjzhang
2025-04-21 14:41:31 +08:00
parent 48a8f69cca
commit fbf048cb00
2 changed files with 8 additions and 4 deletions

View File

@@ -60,6 +60,10 @@ public class RetrieveServiceImpl implements RetrieveService {
@Override @Override
public List<SearchResult> retrieve(QueryNLReq queryNLReq) { public List<SearchResult> retrieve(QueryNLReq queryNLReq) {
if (CollectionUtils.isEmpty(queryNLReq.getDataSetIds())) {
return Collections.emptyList();
}
String queryText = queryNLReq.getQueryText(); String queryText = queryNLReq.getQueryText();
// 1. Get meta info // 1. Get meta info

View File

@@ -135,10 +135,10 @@ public class QueryUtils {
if (StringUtils.isBlank(type)) { if (StringUtils.isBlank(type)) {
return false; return false;
} }
return type.toLowerCase().endsWith("int") || type.equalsIgnoreCase("float") return type.toLowerCase().endsWith("int") || type.toLowerCase().startsWith("int")
|| type.equalsIgnoreCase("double") || type.equalsIgnoreCase("real") || type.equalsIgnoreCase("float") || type.equalsIgnoreCase("double")
|| type.equalsIgnoreCase("numeric") || type.toLowerCase().startsWith("decimal") || type.equalsIgnoreCase("real") || type.equalsIgnoreCase("numeric")
|| type.equalsIgnoreCase("decfloat"); || type.toLowerCase().startsWith("decimal") || type.equalsIgnoreCase("decfloat");
} }
private String getName(String nameEn) { private String getName(String nameEn) {