mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 22:25:19 +00:00
(improvement)(semantic) metric table add agg option
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user