[improvement][Headless] Fix the caching issue in struct queries and add headless test cases. (#689)

This commit is contained in:
lexluo09
2024-01-25 11:31:15 +08:00
committed by GitHub
parent 922201c181
commit 841db25198
23 changed files with 214 additions and 113 deletions

View File

@@ -272,7 +272,8 @@ public class QueryStructReq extends SemanticQueryReq {
}
public String getModelName() {
return Objects.nonNull(modelName) ? modelName : "m_" + String.valueOf(StringUtils.join(modelIds, "_"));
return Objects.nonNull(modelName) ? modelName :
Constants.TABLE_PREFIX + StringUtils.join(modelIds, "_");
}
}

View File

@@ -19,13 +19,12 @@ public abstract class SemanticQueryReq {
protected boolean needAuth = true;
protected Set<Long> modelIds;
protected Set<Long> modelIds = new HashSet<>();
protected List<Param> params = new ArrayList<>();
protected Cache cacheInfo = new Cache();
public void setModelId(Long modelId) {
modelIds = new HashSet<>();
public void addModelId(Long modelId) {
modelIds.add(modelId);
}