[improvement][project] supersonic 0.6.0 version update (#16)

Co-authored-by: lexluo <lexluo@tencent.com>
This commit is contained in:
lexluo09
2023-07-16 21:32:33 +08:00
committed by GitHub
parent a0869dc7bd
commit 041daad1e4
261 changed files with 12031 additions and 3266 deletions

View File

@@ -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;

View File

@@ -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;
}
}

View File

@@ -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");
}

View File

@@ -7,5 +7,6 @@ import lombok.Data;
@Data
public class PageMetricReq extends PageSchemaItemReq {
private String type;
}

View File

@@ -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<>();
}

View File

@@ -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() {