mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 12:37:55 +00:00
(improvement)(Headless) Obtain metric default agg (#984)
This commit is contained in:
@@ -67,6 +67,8 @@ public class MetricResp extends SchemaItem {
|
||||
|
||||
private double similarity;
|
||||
|
||||
private String defaultAgg;
|
||||
|
||||
public void setClassifications(String tag) {
|
||||
if (StringUtils.isBlank(tag)) {
|
||||
classifications = Lists.newArrayList();
|
||||
@@ -92,14 +94,6 @@ public class MetricResp extends SchemaItem {
|
||||
return relateDimension.getDrillDownDimensions();
|
||||
}
|
||||
|
||||
public String getDefaultAgg() {
|
||||
if (metricDefineByMeasureParams != null
|
||||
&& CollectionUtils.isNotEmpty(metricDefineByMeasureParams.getMeasures())) {
|
||||
return metricDefineByMeasureParams.getMeasures().get(0).getAgg();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public String getExpr() {
|
||||
if (MetricDefineType.MEASURE.equals(metricDefineType)) {
|
||||
return metricDefineByMeasureParams.getExpr();
|
||||
|
||||
Reference in New Issue
Block a user