mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-13 04:57:28 +00:00
(improvement)(chat) SemanticParseInfo removes elements whose model is empty (#459)
* (improvement)(chat) Update spi in test profile * (improvement)(chat) SemanticParseInfo removes elements whose model is empty * (improvement)(chat) MetricCheckProcessor compatible time dimension chName --------- Co-authored-by: jolunoluo
This commit is contained in:
@@ -88,10 +88,11 @@ public class SemanticParseInfo {
|
|||||||
|
|
||||||
private Map<Long, Integer> getModelElementCountMap() {
|
private Map<Long, Integer> getModelElementCountMap() {
|
||||||
Map<Long, Integer> elementCountMap = new HashMap<>();
|
Map<Long, Integer> elementCountMap = new HashMap<>();
|
||||||
elementMatches.forEach(element -> {
|
elementMatches.stream().filter(element -> element.getElement().getModel() != null)
|
||||||
int count = elementCountMap.getOrDefault(element.getElement().getModel(), 0);
|
.forEach(element -> {
|
||||||
elementCountMap.put(element.getElement().getModel(), count + 1);
|
int count = elementCountMap.getOrDefault(element.getElement().getModel(), 0);
|
||||||
});
|
elementCountMap.put(element.getElement().getModel(), count + 1);
|
||||||
|
});
|
||||||
return elementCountMap;
|
return elementCountMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,8 @@ public class MetricCheckProcessor implements ParseResultProcessor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (String dimensionName : whereFields) {
|
for (String dimensionName : whereFields) {
|
||||||
if (TimeDimensionEnum.getNameList().contains(dimensionName)) {
|
if (TimeDimensionEnum.getNameList().contains(dimensionName)
|
||||||
|
|| TimeDimensionEnum.getChNameList().contains(dimensionName)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!checkInModelSchema(dimensionName, SchemaElementType.DIMENSION, semanticSchema)) {
|
if (!checkInModelSchema(dimensionName, SchemaElementType.DIMENSION, semanticSchema)) {
|
||||||
@@ -90,7 +91,8 @@ public class MetricCheckProcessor implements ParseResultProcessor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (String dimensionName : groupByFields) {
|
for (String dimensionName : groupByFields) {
|
||||||
if (TimeDimensionEnum.getNameList().contains(dimensionName)) {
|
if (TimeDimensionEnum.getNameList().contains(dimensionName)
|
||||||
|
|| TimeDimensionEnum.getChNameList().contains(dimensionName)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!checkInModelSchema(dimensionName, SchemaElementType.DIMENSION, semanticSchema)) {
|
if (!checkInModelSchema(dimensionName, SchemaElementType.DIMENSION, semanticSchema)) {
|
||||||
|
|||||||
@@ -44,5 +44,4 @@ com.tencent.supersonic.chat.postprocessor.PostProcessor=\
|
|||||||
com.tencent.supersonic.chat.postprocessor.RespBuildPostProcessor
|
com.tencent.supersonic.chat.postprocessor.RespBuildPostProcessor
|
||||||
|
|
||||||
com.tencent.supersonic.chat.query.QueryResponder=\
|
com.tencent.supersonic.chat.query.QueryResponder=\
|
||||||
com.tencent.supersonic.chat.query.EntityInfoQueryResponder, \
|
|
||||||
com.tencent.supersonic.chat.query.SimilarMetricQueryResponder
|
com.tencent.supersonic.chat.query.SimilarMetricQueryResponder
|
||||||
@@ -43,5 +43,4 @@ com.tencent.supersonic.chat.postprocessor.PostProcessor=\
|
|||||||
|
|
||||||
|
|
||||||
com.tencent.supersonic.chat.query.QueryResponder=\
|
com.tencent.supersonic.chat.query.QueryResponder=\
|
||||||
com.tencent.supersonic.chat.query.EntityInfoQueryResponder, \
|
|
||||||
com.tencent.supersonic.chat.query.SimilarMetricQueryResponder
|
com.tencent.supersonic.chat.query.SimilarMetricQueryResponder
|
||||||
Reference in New Issue
Block a user