mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 04:27:39 +00:00
[improvement][project] supersonic 0.6.0 version update (#16)
Co-authored-by: lexluo <lexluo@tencent.com>
This commit is contained in:
@@ -14,6 +14,8 @@ public class QueryColumn {
|
||||
private String nameEn;
|
||||
private String showType;
|
||||
private Boolean authorized = true;
|
||||
private String dataFormatType;
|
||||
private DataFormat dataFormat;
|
||||
|
||||
public QueryColumn(String nameEn, String type) {
|
||||
this.type = type;
|
||||
|
||||
@@ -18,6 +18,7 @@ public class DateInfoReq {
|
||||
private String dateFormat;
|
||||
private String startDate;
|
||||
private String endDate;
|
||||
private String datePeriod;
|
||||
private List<String> unavailableDateList = new ArrayList<>();
|
||||
|
||||
public DateInfoReq(String type, Long itemId, String dateFormat, String startDate, String endDate) {
|
||||
@@ -27,4 +28,15 @@ public class DateInfoReq {
|
||||
this.startDate = startDate;
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public DateInfoReq(String type, Long itemId, String dateFormat, String startDate, String endDate,
|
||||
List<String> unavailableDateList) {
|
||||
this.type = type;
|
||||
this.itemId = itemId;
|
||||
this.dateFormat = dateFormat;
|
||||
this.startDate = startDate;
|
||||
this.endDate = endDate;
|
||||
this.unavailableDateList = unavailableDateList;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,11 +19,10 @@ public class MetricReq extends MetricBaseReq {
|
||||
return metricType;
|
||||
}
|
||||
List<Measure> measureList = typeParams.getMeasures();
|
||||
if (measureList.size() > 1) {
|
||||
return MetricTypeEnum.DERIVED;
|
||||
}
|
||||
if (measureList.size() == 1 && typeParams.getExpr().trim().equalsIgnoreCase(measureList.get(0).getBizName())) {
|
||||
return MetricTypeEnum.ATOMIC;
|
||||
} else if (measureList.size() >= 1) {
|
||||
return MetricTypeEnum.DERIVED;
|
||||
}
|
||||
throw new RuntimeException("measure can not be none");
|
||||
}
|
||||
|
||||
@@ -7,5 +7,6 @@ import lombok.Data;
|
||||
@Data
|
||||
public class PageMetricReq extends PageSchemaItemReq {
|
||||
|
||||
private String type;
|
||||
|
||||
}
|
||||
|
||||
@@ -18,5 +18,6 @@ public class ItemDateResp {
|
||||
private String dateFormat;
|
||||
private String startDate;
|
||||
private String endDate;
|
||||
private String datePeriod;
|
||||
private List<String> unavailableDateList = new ArrayList<>();
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import com.tencent.supersonic.semantic.api.query.pojo.MetricTable;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@@ -12,7 +11,7 @@ public class ParseSqlReq {
|
||||
|
||||
private String rootPath = "";
|
||||
private Map<String, String> variables;
|
||||
private String sql;
|
||||
private String sql = "";
|
||||
private List<MetricTable> tables;
|
||||
|
||||
public Map<String, String> getVariables() {
|
||||
|
||||
Reference in New Issue
Block a user