(improvement)(test) Fixed the intermittent failure of QueryByStructTest on Windows. (#1159)

This commit is contained in:
lexluo09
2024-06-15 22:03:56 +08:00
committed by GitHub
parent c3ecc05715
commit 39fd16b918
4 changed files with 31 additions and 23 deletions

View File

@@ -19,6 +19,7 @@ public class SemanticQueryResp extends QueryResult<Map<String, Object>> {
List<QueryColumn> columns = Lists.newArrayList();
String sql;
QueryAuthorization queryAuthorization;
boolean useCache;
public List<QueryColumn> getMetricColumns() {
return columns.stream()

View File

@@ -97,7 +97,9 @@ public class QueryServiceImpl implements QueryService {
String cacheKey = queryCache.getCacheKey(queryReq);
Object query = queryCache.query(queryReq, cacheKey);
if (Objects.nonNull(query)) {
return (SemanticQueryResp) query;
SemanticQueryResp queryResp = (SemanticQueryResp) query;
queryResp.setUseCache(true);
return queryResp;
}
StatUtils.get().setUseResultCache(false);
//3 query