mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
[fix][headless]Fix published metrics issue.
This commit is contained in:
@@ -120,10 +120,12 @@ public class ChatQueryRepositoryImpl implements ChatQueryRepository {
|
||||
// fix bugs, compatible with bugs caused by history field changes
|
||||
if (!CollectionUtils.isEmpty(queryResult.getQueryColumns())) {
|
||||
List<QueryColumn> queryColumns = queryResult.getQueryColumns().stream().peek(x -> {
|
||||
if (StringUtils.isEmpty(x.getBizName()) && StringUtils.isNotEmpty(x.getNameEn())) {
|
||||
if (StringUtils.isEmpty(x.getBizName())
|
||||
&& StringUtils.isNotEmpty(x.getNameEn())) {
|
||||
x.setBizName(x.getNameEn());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(x.getBizName()) && StringUtils.isEmpty(x.getNameEn())) {
|
||||
if (StringUtils.isNotEmpty(x.getBizName())
|
||||
&& StringUtils.isEmpty(x.getNameEn())) {
|
||||
x.setNameEn(x.getBizName());
|
||||
}
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
@@ -26,7 +26,8 @@ public abstract class BaseSemanticCorrector implements SemanticCorrector {
|
||||
try {
|
||||
String s2SQL = semanticParseInfo.getSqlInfo().getCorrectedS2SQL();
|
||||
if (Objects.isNull(s2SQL)) {
|
||||
semanticParseInfo.getSqlInfo().setCorrectedS2SQL(semanticParseInfo.getSqlInfo().getParsedS2SQL());
|
||||
semanticParseInfo.getSqlInfo()
|
||||
.setCorrectedS2SQL(semanticParseInfo.getSqlInfo().getParsedS2SQL());
|
||||
}
|
||||
doCorrect(chatQueryContext, semanticParseInfo);
|
||||
log.debug("sqlCorrection:{} sql:{}", this.getClass().getSimpleName(),
|
||||
|
||||
@@ -37,7 +37,7 @@ public class MetricConverter {
|
||||
metricDO.setClassifications(metricReq.getClassifications());
|
||||
metricDO.setRelateDimensions(JSONObject.toJSONString(metricReq.getRelateDimension()));
|
||||
metricDO.setStatus(StatusEnum.ONLINE.getCode());
|
||||
metricDO.setIsPublish(PublishEnum.UN_PUBLISHED.getCode());
|
||||
metricDO.setIsPublish(PublishEnum.PUBLISHED.getCode());
|
||||
if (metricReq.getExt() != null) {
|
||||
metricDO.setExt(JSONObject.toJSONString(metricReq.getExt()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user