mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-13 21:17:08 +00:00
(improvement)(project) dsl support get topN dimension/metric by useCount and fix semanticService get dimension/metric usrCount error (#105)
This commit is contained in:
@@ -40,4 +40,5 @@ public class DefaultSemanticConfig {
|
||||
|
||||
@Value("${explain.path:/api/semantic/query/explain}")
|
||||
private String explainPath;
|
||||
|
||||
}
|
||||
|
||||
@@ -81,8 +81,9 @@ public class LocalSemanticLayer extends BaseSemanticLayer {
|
||||
public List<ModelSchemaResp> doFetchModelSchema(List<Long> ids) {
|
||||
ModelSchemaFilterReq filter = new ModelSchemaFilterReq();
|
||||
filter.setModelIds(ids);
|
||||
modelService = ContextUtils.getBean(ModelService.class);
|
||||
return modelService.fetchModelSchema(filter);
|
||||
schemaService = ContextUtils.getBean(SchemaService.class);
|
||||
User user = User.getFakeUser();
|
||||
return schemaService.fetchModelSchema(filter, user);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,7 +18,7 @@ public class SchemaService {
|
||||
|
||||
|
||||
public static final String ALL_CACHE = "all";
|
||||
private static final Integer META_CACHE_TIME = 5;
|
||||
private static final Integer META_CACHE_TIME = 2;
|
||||
private SemanticLayer semanticLayer = ComponentFactory.getSemanticLayer();
|
||||
|
||||
private LoadingCache<String, SemanticSchema> cache = CacheBuilder.newBuilder()
|
||||
|
||||
Reference in New Issue
Block a user