mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 03:58:14 +00:00
(improvement)(chat) if there is no group by in dsl,set MetricTable's aggOption to NATIVE (#195)
This commit is contained in:
@@ -22,9 +22,9 @@ public class EntityInfoExecuteResponder implements ExecuteResponder {
|
||||
}
|
||||
SemanticService semanticService = ContextUtils.getBean(SemanticService.class);
|
||||
User user = queryReq.getUser();
|
||||
queryResult.setEntityInfo(semanticService.getEntityInfo(semanticParseInfo, user));
|
||||
EntityInfo entityInfo = semanticService.getEntityInfo(semanticParseInfo, user);
|
||||
queryResult.setEntityInfo(entityInfo);
|
||||
|
||||
EntityInfo entityInfo = semanticService.getEntityInfo(semanticParseInfo.getModelId());
|
||||
if (Objects.isNull(entityInfo) || Objects.isNull(entityInfo.getModelInfo())
|
||||
|| Objects.isNull(entityInfo.getModelInfo().getPrimaryEntityName())) {
|
||||
return;
|
||||
@@ -36,6 +36,8 @@ public class EntityInfoExecuteResponder implements ExecuteResponder {
|
||||
boolean existPrimaryEntityName = queryResult.getQueryColumns().stream()
|
||||
.anyMatch(queryColumn -> primaryEntityBizName.equals(queryColumn.getNameEn()));
|
||||
|
||||
semanticParseInfo.setNativeQuery(existPrimaryEntityName);
|
||||
|
||||
if (!existPrimaryEntityName) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user