mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 12:07:42 +00:00
[fix][headless]Adjust none operator enum.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
package com.tencent.supersonic.common.pojo.enums;
|
package com.tencent.supersonic.common.pojo.enums;
|
||||||
|
|
||||||
public enum AggOperatorEnum {
|
public enum AggOperatorEnum {
|
||||||
ANY("ANY"),
|
NONE(""),
|
||||||
|
|
||||||
MAX("MAX"),
|
MAX("MAX"),
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class ColumnSchema {
|
|||||||
|
|
||||||
private FieldType filedType;
|
private FieldType filedType;
|
||||||
|
|
||||||
private AggOperatorEnum agg = AggOperatorEnum.ANY;
|
private AggOperatorEnum agg = AggOperatorEnum.NONE;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ public class MetricExpressionParser implements QueryParser {
|
|||||||
if (allMeasures.containsKey(field)) {
|
if (allMeasures.containsKey(field)) {
|
||||||
Measure measure = allMeasures.get(field);
|
Measure measure = allMeasures.get(field);
|
||||||
String expr = metricExpr;
|
String expr = metricExpr;
|
||||||
if (Objects.nonNull(measure.getAgg())) {
|
if (StringUtils.isNotBlank(measure.getAgg())) {
|
||||||
expr = String.format("%s (%s)", measure.getAgg(), metricExpr);
|
expr = String.format("%s (%s)", measure.getAgg(), metricExpr);
|
||||||
}
|
}
|
||||||
replace.put(field, expr);
|
replace.put(field, expr);
|
||||||
|
|||||||
Reference in New Issue
Block a user