(improvement)(Headless) Abstracted tags from dimensions and metrics. (#828)

This commit is contained in:
lexluo09
2024-03-18 12:07:49 +08:00
committed by GitHub
parent 7f24c4c4e0
commit 8733231976
40 changed files with 236 additions and 322 deletions

View File

@@ -13,9 +13,9 @@ public enum DictWordType {
DIMENSION("dimension"),
VALUE("dv"),
VALUE("value"),
DATASET("dataset"),
DATASET("dataSet"),
ENTITY("entity"),
@@ -23,8 +23,6 @@ public enum DictWordType {
TAG("tag"),
TAG_VALUE("tv"),
SUFFIX("suffix");
public static final String NATURE_SPILT = "_";
@@ -35,7 +33,7 @@ public enum DictWordType {
this.type = type;
}
public String getTypeWithSpilt() {
public String getType() {
return NATURE_SPILT + type;
}
@@ -44,7 +42,7 @@ public enum DictWordType {
return null;
}
for (DictWordType dictWordType : values()) {
if (nature.endsWith(dictWordType.getTypeWithSpilt())) {
if (nature.endsWith(dictWordType.getType())) {
return dictWordType;
}
}
@@ -54,7 +52,7 @@ public enum DictWordType {
return DATASET;
}
//dimension value
if (natures.length >= 3 && StringUtils.isNumeric(natures[1]) && StringUtils.isNumeric(natures[2])) {
if (natures.length == 3 && StringUtils.isNumeric(natures[1]) && StringUtils.isNumeric(natures[2])) {
return VALUE;
}
return null;
@@ -76,4 +74,5 @@ public enum DictWordType {
}
return "";
}
}
}