mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-20 06:34:55 +00:00
(improvement)(headless) transfer term nature modelId to viewId before providing it to chat and put the modelId of metadata into the dict word instead of viewId (#739)
Co-authored-by: jolunoluo
This commit is contained in:
@@ -19,13 +19,13 @@ public class ModelDetail {
|
||||
|
||||
private String tableQuery;
|
||||
|
||||
private List<Identify> identifiers;
|
||||
private List<Identify> identifiers = Lists.newArrayList();
|
||||
|
||||
private List<Dim> dimensions;
|
||||
private List<Dim> dimensions = Lists.newArrayList();
|
||||
|
||||
private List<Measure> measures;
|
||||
private List<Measure> measures = Lists.newArrayList();
|
||||
|
||||
private List<Field> fields;
|
||||
private List<Field> fields = Lists.newArrayList();
|
||||
|
||||
public String getSqlQuery() {
|
||||
if (StringUtils.isNotBlank(sqlQuery) && sqlQuery.endsWith(";")) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.tencent.supersonic.headless.api.pojo;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class Param {
|
||||
@@ -10,7 +11,7 @@ public class Param {
|
||||
@NotBlank(message = "Invald parameter name")
|
||||
private String name;
|
||||
|
||||
@NotBlank(message = "Invalid parameter value")
|
||||
@NotNull(message = "Invalid parameter value")
|
||||
private String value;
|
||||
|
||||
public Param() {
|
||||
@@ -21,14 +22,4 @@ public class Param {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder sb = new StringBuilder("{");
|
||||
sb.append("\"name\":\"")
|
||||
.append(name).append('\"');
|
||||
sb.append(",\"value\":\"")
|
||||
.append(value).append('\"');
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
@@ -19,6 +18,7 @@ import java.util.List;
|
||||
public class SchemaElement implements Serializable {
|
||||
|
||||
private Long view;
|
||||
private Long model;
|
||||
private Long id;
|
||||
private String name;
|
||||
private String bizName;
|
||||
@@ -52,7 +52,4 @@ public class SchemaElement implements Serializable {
|
||||
return Objects.hashCode(view, id, name, bizName, type);
|
||||
}
|
||||
|
||||
public List<String> getModelNames() {
|
||||
return Lists.newArrayList(name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@ public class MetricResp extends SchemaItem {
|
||||
|
||||
private Long domainId;
|
||||
|
||||
private String modelBizName;
|
||||
|
||||
private String modelName;
|
||||
|
||||
//ATOMIC DERIVED
|
||||
|
||||
Reference in New Issue
Block a user