mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 04:27:39 +00:00
[improvement][launcher]Clean code logic of s2demos and remove tag-related constructs.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
import com.tencent.supersonic.common.pojo.Constants;
|
||||
import com.tencent.supersonic.headless.api.pojo.enums.DimensionType;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -12,7 +13,7 @@ public class Dim {
|
||||
|
||||
private String name;
|
||||
|
||||
private String type;
|
||||
private DimensionType type;
|
||||
|
||||
private String expr;
|
||||
|
||||
@@ -28,23 +29,15 @@ public class Dim {
|
||||
|
||||
private int isTag;
|
||||
|
||||
public Dim(String name, String bizName, String type, Integer isCreateDimension) {
|
||||
public Dim(String name, String bizName, DimensionType type, Integer isCreateDimension) {
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
this.isCreateDimension = isCreateDimension;
|
||||
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) {
|
||||
public Dim(String name, String bizName, DimensionType type, Integer isCreateDimension,
|
||||
String expr, String dateFormat, DimensionTimeTypeParams typeParams) {
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
this.expr = expr;
|
||||
@@ -55,8 +48,8 @@ public class Dim {
|
||||
}
|
||||
|
||||
public static Dim getDefault() {
|
||||
return new Dim("日期", "time", "2023-05-28", Constants.DAY_FORMAT,
|
||||
new DimensionTimeTypeParams("true", "day"), 0, "imp_date");
|
||||
return new Dim("数据日期", "imp_date", DimensionType.partition_time, 0, "imp_date",
|
||||
Constants.DAY_FORMAT, new DimensionTimeTypeParams("false", "day"));
|
||||
}
|
||||
|
||||
public String getFieldName() {
|
||||
|
||||
@@ -43,8 +43,7 @@ public class ModelDetail {
|
||||
if (CollectionUtils.isEmpty(dimensions)) {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return dimensions.stream()
|
||||
.filter(dim -> DimensionType.partition_time.name().equalsIgnoreCase(dim.getType()))
|
||||
return dimensions.stream().filter(dim -> DimensionType.partition_time.equals(dim.getType()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
@@ -35,8 +35,6 @@ public class ModelReq extends SchemaItem {
|
||||
|
||||
private List<String> adminOrgs;
|
||||
|
||||
private Long tagObjectId;
|
||||
|
||||
private Map<String, Object> ext;
|
||||
|
||||
public String getViewer() {
|
||||
|
||||
Reference in New Issue
Block a user