mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 04:27:39 +00:00
(improvement)(headless) Remove MetricCheckProcessor in chat and MetricDrillDownChecker in headless (#716)
(improvement)(headless) remove MetricCheckProcessor in chat and MetricDrillDownChecker in headless --------- Co-authored-by: jolunoluo
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DefaultDisplayInfo {
|
||||
|
||||
//When displaying tag selection results, the information displayed by default
|
||||
private List<Long> dimensionIds = new ArrayList<>();
|
||||
|
||||
private List<Long> metricIds = new ArrayList<>();
|
||||
|
||||
}
|
||||
@@ -2,15 +2,10 @@ package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class TagTypeDefaultConfig {
|
||||
|
||||
//When displaying tag selection results, the information displayed by default
|
||||
private List<Long> dimensionIds = new ArrayList<>();
|
||||
private List<Long> metricIds = new ArrayList<>();
|
||||
private DefaultDisplayInfo defaultDisplayInfo;
|
||||
|
||||
//default time to filter tag selection results
|
||||
private TimeDefaultConfig timeDefaultConfig;
|
||||
|
||||
@@ -77,6 +77,13 @@ public class MetricResp extends SchemaItem {
|
||||
.collect(Collectors.joining(","));
|
||||
}
|
||||
|
||||
public List<DrillDownDimension> getDrillDownDimensions() {
|
||||
if (relateDimension == null || CollectionUtils.isEmpty(relateDimension.getDrillDownDimensions())) {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return relateDimension.getDrillDownDimensions();
|
||||
}
|
||||
|
||||
public String getDefaultAgg() {
|
||||
if (metricDefineByMeasureParams != null
|
||||
&& CollectionUtils.isNotEmpty(metricDefineByMeasureParams.getMeasures())) {
|
||||
|
||||
@@ -35,4 +35,24 @@ public class SemanticSchemaResp {
|
||||
|
||||
}
|
||||
|
||||
public MetricSchemaResp getMetric(String bizName) {
|
||||
return metrics.stream().filter(metric -> bizName.equalsIgnoreCase(metric.getBizName()))
|
||||
.findFirst().orElse(null);
|
||||
}
|
||||
|
||||
public MetricSchemaResp getMetric(Long id) {
|
||||
return metrics.stream().filter(metric -> id.equals(metric.getId()))
|
||||
.findFirst().orElse(null);
|
||||
}
|
||||
|
||||
public DimSchemaResp getDimension(String bizName) {
|
||||
return dimensions.stream().filter(dimension -> bizName.equalsIgnoreCase(dimension.getBizName()))
|
||||
.findFirst().orElse(null);
|
||||
}
|
||||
|
||||
public DimSchemaResp getDimension(Long id) {
|
||||
return dimensions.stream().filter(dimension -> id.equals(dimension.getId()))
|
||||
.findFirst().orElse(null);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user