mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 03:58:14 +00:00
(fix)(headless)Fix show type and retrieve issues.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user