(improvement)(Headless) Fix the issue of ineffective UV queries and Supersonic not creating tag objects. (#876)

This commit is contained in:
lexluo09
2024-04-03 16:29:54 +08:00
committed by GitHub
parent 73f7bd79e4
commit a64b60e6e2
2 changed files with 1 additions and 16 deletions

View File

@@ -18,8 +18,6 @@ import java.util.stream.Collectors;
import java.util.stream.Stream;
import static com.tencent.supersonic.common.pojo.enums.AggregateTypeEnum.AVG;
import static com.tencent.supersonic.common.pojo.enums.AggregateTypeEnum.COUNT;
import static com.tencent.supersonic.common.pojo.enums.AggregateTypeEnum.DISTINCT;
import static com.tencent.supersonic.common.pojo.enums.AggregateTypeEnum.MAX;
import static com.tencent.supersonic.common.pojo.enums.AggregateTypeEnum.MIN;
import static com.tencent.supersonic.common.pojo.enums.AggregateTypeEnum.NONE;
@@ -41,8 +39,6 @@ public class AggregateTypeParser implements SemanticParser {
new AbstractMap.SimpleEntry<>(SUM, Pattern.compile("(?i)(汇总|总和|sum)")),
new AbstractMap.SimpleEntry<>(AVG, Pattern.compile("(?i)(平均值|日均|平均|avg)")),
new AbstractMap.SimpleEntry<>(TOPN, Pattern.compile("(?i)(top)")),
new AbstractMap.SimpleEntry<>(DISTINCT, Pattern.compile("(?i)(uv)")),
new AbstractMap.SimpleEntry<>(COUNT, Pattern.compile("(?i)(总数|pv)")),
new AbstractMap.SimpleEntry<>(NONE, Pattern.compile("(?i)(明细)"))
).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (k1, k2) -> k2));

View File

@@ -102,7 +102,6 @@ public class ModelDemoDataLoader {
try {
addDatabase();
addDomain();
addTagObjectUser();
addTagObjectSinger();
addModel_1();
addModel_2();
@@ -128,15 +127,6 @@ public class ModelDemoDataLoader {
}
private void addTagObjectUser() throws Exception {
TagObjectReq tagObjectReq = new TagObjectReq();
tagObjectReq.setDomainId(1L);
tagObjectReq.setName("用户");
tagObjectReq.setBizName("user");
User user = User.getFakeUser();
tagObjectService.create(tagObjectReq, user);
}
private void addTagObjectSinger() throws Exception {
TagObjectReq tagObjectReq = new TagObjectReq();
tagObjectReq.setDomainId(2L);
@@ -184,7 +174,6 @@ public class ModelDemoDataLoader {
modelReq.setDescription("用户部门信息");
modelReq.setDatabaseId(1L);
modelReq.setDomainId(1L);
modelReq.setTagObjectId(1L);
modelReq.setViewers(Arrays.asList("admin", "tom", "jack"));
modelReq.setViewOrgs(Collections.singletonList("1"));
modelReq.setAdmins(Arrays.asList("admin", "alice"));
@@ -339,7 +328,7 @@ public class ModelDemoDataLoader {
modelReq.setDescription("艺人库");
modelReq.setDatabaseId(1L);
modelReq.setDomainId(2L);
modelReq.setTagObjectId(2L);
modelReq.setTagObjectId(1L);
modelReq.setViewers(Arrays.asList("admin", "tom", "jack"));
modelReq.setViewOrgs(Collections.singletonList("1"));
modelReq.setAdmins(Collections.singletonList("admin"));