mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-22 06:44:18 +08:00
(improvement)(semantic) Add is_tag label to the dimension and Specify entity alias on datasource primary-key (#411)
Co-authored-by: jolunoluo
This commit is contained in:
@@ -27,6 +27,8 @@ public class Dim {
|
||||
|
||||
private String description;
|
||||
|
||||
private int isTag;
|
||||
|
||||
public Dim(String name, String bizName, String type, Integer isCreateDimension) {
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
@@ -34,6 +36,14 @@ public class Dim {
|
||||
this.bizName = bizName;
|
||||
}
|
||||
|
||||
public Dim(String name, String bizName, String type, Integer isCreateDimension, int isTag) {
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
this.isCreateDimension = isCreateDimension;
|
||||
this.bizName = bizName;
|
||||
this.isTag = isTag;
|
||||
}
|
||||
|
||||
public Dim(String name, String type, String expr, String dateFormat, DimensionTimeTypeParams typeParams,
|
||||
Integer isCreateDimension, String bizName) {
|
||||
this.name = name;
|
||||
@@ -45,6 +55,8 @@ public class Dim {
|
||||
this.bizName = bizName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static Dim getDefault() {
|
||||
return new Dim("日期", "time", "2023-05-28",
|
||||
Constants.DAY_FORMAT,
|
||||
|
||||
@@ -4,6 +4,7 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@@ -13,10 +14,17 @@ public class Identify {
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* like primary, foreign
|
||||
* primary, foreign
|
||||
*/
|
||||
private String type;
|
||||
|
||||
private String bizName;
|
||||
|
||||
private List<String> entityNames;
|
||||
|
||||
public Identify(String name, String type, String bizName) {
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
this.bizName = bizName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,11 +3,9 @@ package com.tencent.supersonic.semantic.api.model.request;
|
||||
import com.tencent.supersonic.common.pojo.enums.DataTypeEnums;
|
||||
import com.tencent.supersonic.semantic.api.model.pojo.DimValueMap;
|
||||
import com.tencent.supersonic.semantic.api.model.pojo.SchemaItem;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@@ -33,4 +31,6 @@ public class DimensionReq extends SchemaItem {
|
||||
private List<DimValueMap> dimValueMaps;
|
||||
|
||||
private DataTypeEnums dataType;
|
||||
|
||||
private int isTag;
|
||||
}
|
||||
|
||||
@@ -4,12 +4,11 @@ package com.tencent.supersonic.semantic.api.model.response;
|
||||
import com.tencent.supersonic.common.pojo.enums.DataTypeEnums;
|
||||
import com.tencent.supersonic.semantic.api.model.pojo.DimValueMap;
|
||||
import com.tencent.supersonic.semantic.api.model.pojo.SchemaItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@@ -41,4 +40,6 @@ public class DimensionResp extends SchemaItem {
|
||||
|
||||
private DataTypeEnums dataType;
|
||||
|
||||
private int isTag;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user