(improvement)(semantic) metric table add agg option

This commit is contained in:
jipengli
2023-10-11 14:44:54 +08:00
parent 6b2a14e589
commit c14d4e59d4
9 changed files with 50 additions and 17 deletions

View File

@@ -0,0 +1,15 @@
package com.tencent.supersonic.semantic.api.query.enums;
public enum AggOption {
NATIVE,
AGGREGATION,
DEFAULT;
public static AggOption getAggregation(boolean isNativeQuery) {
return isNativeQuery ? NATIVE : AGGREGATION;
}
public static boolean isAgg(AggOption aggOption) {
return NATIVE.equals(aggOption) ? false : true;
}
}

View File

@@ -1,5 +1,6 @@
package com.tencent.supersonic.semantic.api.query.pojo;
import com.tencent.supersonic.semantic.api.query.enums.AggOption;
import java.util.List;
import lombok.Data;
@@ -10,6 +11,6 @@ public class MetricTable {
private List<String> metrics;
private List<String> dimensions;
private String where;
private boolean isAgg = false;
private AggOption aggOption = AggOption.DEFAULT;
}