mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 22:25:19 +00:00
(improvement)(build) Add spotless during the build process. (#1639)
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ActionInfo {
|
||||
|
||||
private List<Object> out;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,5 +9,4 @@ import java.util.List;
|
||||
public class AppConfig {
|
||||
|
||||
private List<Item> items = Lists.newArrayList();
|
||||
|
||||
}
|
||||
|
||||
@@ -10,9 +10,8 @@ public class Cache {
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder sb = new StringBuilder("{");
|
||||
sb.append("\"cache\":")
|
||||
.append(cache);
|
||||
sb.append("\"cache\":").append(cache);
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -15,5 +14,4 @@ public class DBColumn {
|
||||
private String dataType;
|
||||
|
||||
private String comment;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DataSetDetail {
|
||||
|
||||
private List<DataSetModelConfig> dataSetModelConfigs;
|
||||
|
||||
}
|
||||
|
||||
@@ -65,7 +65,9 @@ public class DataSetSchema {
|
||||
allElements.addAll(getDimensions());
|
||||
allElements.addAll(getMetrics());
|
||||
return allElements.stream()
|
||||
.collect(Collectors.toMap(SchemaElement::getBizName, SchemaElement::getName, (k1, k2) -> k1));
|
||||
.collect(
|
||||
Collectors.toMap(
|
||||
SchemaElement::getBizName, SchemaElement::getName, (k1, k2) -> k1));
|
||||
}
|
||||
|
||||
public TimeDefaultConfig getTagTypeTimeDefaultConfig() {
|
||||
@@ -97,28 +99,36 @@ public class DataSetSchema {
|
||||
|
||||
public List<SchemaElement> getTagDefaultDimensions() {
|
||||
TagTypeDefaultConfig tagTypeDefaultConfig = getTagTypeDefaultConfig();
|
||||
if (Objects.isNull(tagTypeDefaultConfig) || Objects.isNull(tagTypeDefaultConfig.getDefaultDisplayInfo())) {
|
||||
if (Objects.isNull(tagTypeDefaultConfig)
|
||||
|| Objects.isNull(tagTypeDefaultConfig.getDefaultDisplayInfo())) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(tagTypeDefaultConfig.getDefaultDisplayInfo().getMetricIds())) {
|
||||
return tagTypeDefaultConfig.getDefaultDisplayInfo().getMetricIds()
|
||||
.stream().map(id -> {
|
||||
SchemaElement metric = getElement(SchemaElementType.METRIC, id);
|
||||
return metric;
|
||||
}).filter(Objects::nonNull).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(
|
||||
tagTypeDefaultConfig.getDefaultDisplayInfo().getMetricIds())) {
|
||||
return tagTypeDefaultConfig.getDefaultDisplayInfo().getMetricIds().stream()
|
||||
.map(
|
||||
id -> {
|
||||
SchemaElement metric = getElement(SchemaElementType.METRIC, id);
|
||||
return metric;
|
||||
})
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
public List<SchemaElement> getTagDefaultMetrics() {
|
||||
TagTypeDefaultConfig tagTypeDefaultConfig = getTagTypeDefaultConfig();
|
||||
if (Objects.isNull(tagTypeDefaultConfig) || Objects.isNull(tagTypeDefaultConfig.getDefaultDisplayInfo())) {
|
||||
if (Objects.isNull(tagTypeDefaultConfig)
|
||||
|| Objects.isNull(tagTypeDefaultConfig.getDefaultDisplayInfo())) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(tagTypeDefaultConfig.getDefaultDisplayInfo().getDimensionIds())) {
|
||||
if (CollectionUtils.isNotEmpty(
|
||||
tagTypeDefaultConfig.getDefaultDisplayInfo().getDimensionIds())) {
|
||||
return tagTypeDefaultConfig.getDefaultDisplayInfo().getDimensionIds().stream()
|
||||
.map(id -> getElement(SchemaElementType.DIMENSION, id))
|
||||
.filter(Objects::nonNull).collect(Collectors.toList());
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -9,9 +8,8 @@ import java.util.List;
|
||||
@Data
|
||||
public class DefaultDisplayInfo {
|
||||
|
||||
//When displaying tag selection results, the information displayed by default
|
||||
// When displaying tag selection results, the information displayed by default
|
||||
private List<Long> dimensionIds = new ArrayList<>();
|
||||
|
||||
private List<Long> metricIds = new ArrayList<>();
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@@ -44,8 +43,14 @@ public class Dim {
|
||||
this.isTag = isTag;
|
||||
}
|
||||
|
||||
public Dim(String name, String type, String expr, String dateFormat, DimensionTimeTypeParams typeParams,
|
||||
Integer isCreateDimension, String bizName) {
|
||||
public Dim(
|
||||
String name,
|
||||
String type,
|
||||
String expr,
|
||||
String dateFormat,
|
||||
DimensionTimeTypeParams typeParams,
|
||||
Integer isCreateDimension,
|
||||
String bizName) {
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
this.expr = expr;
|
||||
@@ -56,15 +61,17 @@ public class Dim {
|
||||
}
|
||||
|
||||
public static Dim getDefault() {
|
||||
return new Dim("日期", "time", "2023-05-28",
|
||||
return new Dim(
|
||||
"日期",
|
||||
"time",
|
||||
"2023-05-28",
|
||||
Constants.DAY_FORMAT,
|
||||
new DimensionTimeTypeParams("true", "day"),
|
||||
0, "imp_date"
|
||||
);
|
||||
0,
|
||||
"imp_date");
|
||||
}
|
||||
|
||||
public String getFieldName() {
|
||||
return bizName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,18 +8,12 @@ import java.util.List;
|
||||
@Data
|
||||
public class DimValueMap {
|
||||
|
||||
/**
|
||||
* dimension value in db
|
||||
*/
|
||||
/** dimension value in db */
|
||||
private String techName;
|
||||
|
||||
/**
|
||||
* dimension value for result show
|
||||
*/
|
||||
/** dimension value for result show */
|
||||
private String bizName;
|
||||
|
||||
/**
|
||||
* dimension value for user query
|
||||
*/
|
||||
/** dimension value for user query */
|
||||
private List<String> alias = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@@ -13,5 +12,4 @@ public class DimensionTimeTypeParams {
|
||||
private String isPrimary = "true";
|
||||
|
||||
private String timeGranularity = "day";
|
||||
|
||||
}
|
||||
|
||||
@@ -23,5 +23,4 @@ public class DrillDownDimension {
|
||||
this.dimensionId = dimensionId;
|
||||
this.necessary = necessary;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,14 +13,9 @@ import java.util.List;
|
||||
@NoArgsConstructor
|
||||
public class Entity {
|
||||
|
||||
|
||||
/**
|
||||
* uniquely identifies an entity
|
||||
*/
|
||||
/** uniquely identifies an entity */
|
||||
private Long entityId;
|
||||
|
||||
/**
|
||||
* entity name list
|
||||
*/
|
||||
/** entity name list */
|
||||
private List<String> names;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,5 +12,4 @@ public class EntityInfo {
|
||||
private List<DataInfo> dimensions = new ArrayList<>();
|
||||
private List<DataInfo> metrics = new ArrayList<>();
|
||||
private String entityId;
|
||||
|
||||
}
|
||||
|
||||
@@ -14,5 +14,4 @@ public class Field {
|
||||
private String fieldName;
|
||||
|
||||
private String dataType;
|
||||
|
||||
}
|
||||
|
||||
@@ -10,5 +10,4 @@ import lombok.NoArgsConstructor;
|
||||
public class FieldParam {
|
||||
|
||||
private String fieldName;
|
||||
|
||||
}
|
||||
|
||||
@@ -13,9 +13,7 @@ public class Identify {
|
||||
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* primary, foreign
|
||||
*/
|
||||
/** primary, foreign */
|
||||
private String type;
|
||||
|
||||
private String bizName;
|
||||
@@ -40,5 +38,4 @@ public class Identify {
|
||||
public String getFieldName() {
|
||||
return bizName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.tencent.supersonic.headless.api.pojo;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.tencent.supersonic.common.pojo.enums.ApiItemType;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@@ -23,5 +24,4 @@ public class Item {
|
||||
public String getValue() {
|
||||
return name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@ToString
|
||||
public class ItemDateFilter {
|
||||
|
||||
private List<Long> itemIds;
|
||||
@NonNull
|
||||
private String type;
|
||||
}
|
||||
@NonNull private String type;
|
||||
}
|
||||
|
||||
@@ -6,10 +6,7 @@ import lombok.Data;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 导入字典的可选配置
|
||||
*/
|
||||
|
||||
/** 导入字典的可选配置 */
|
||||
@Data
|
||||
public class ItemValueConfig {
|
||||
|
||||
@@ -19,4 +16,4 @@ public class ItemValueConfig {
|
||||
private List<String> ruleList = new ArrayList<>();
|
||||
private Long limit;
|
||||
private DateConf dateConf;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,5 +38,4 @@ public class Measure {
|
||||
public String getFieldName() {
|
||||
return expr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,5 +19,4 @@ public class MeasureParam {
|
||||
this.bizName = bizName;
|
||||
this.constraint = constraint;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class MetaFilter {
|
||||
@@ -52,19 +51,34 @@ public class MetaFilter {
|
||||
return false;
|
||||
}
|
||||
MetaFilter that = (MetaFilter) o;
|
||||
return Objects.equal(id, that.id) && Objects.equal(name, that.name)
|
||||
&& Objects.equal(bizName, that.bizName) && Objects.equal(
|
||||
createdBy, that.createdBy) && Objects.equal(modelIds, that.modelIds)
|
||||
&& Objects.equal(domainId, that.domainId) && Objects.equal(
|
||||
dataSetId, that.dataSetId) && Objects.equal(sensitiveLevel, that.sensitiveLevel)
|
||||
&& Objects.equal(status, that.status) && Objects.equal(key,
|
||||
that.key) && Objects.equal(ids, that.ids) && Objects.equal(
|
||||
fieldsDepend, that.fieldsDepend);
|
||||
return Objects.equal(id, that.id)
|
||||
&& Objects.equal(name, that.name)
|
||||
&& Objects.equal(bizName, that.bizName)
|
||||
&& Objects.equal(createdBy, that.createdBy)
|
||||
&& Objects.equal(modelIds, that.modelIds)
|
||||
&& Objects.equal(domainId, that.domainId)
|
||||
&& Objects.equal(dataSetId, that.dataSetId)
|
||||
&& Objects.equal(sensitiveLevel, that.sensitiveLevel)
|
||||
&& Objects.equal(status, that.status)
|
||||
&& Objects.equal(key, that.key)
|
||||
&& Objects.equal(ids, that.ids)
|
||||
&& Objects.equal(fieldsDepend, that.fieldsDepend);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(id, name, bizName, createdBy, modelIds, domainId,
|
||||
dataSetId, sensitiveLevel, status, key, ids, fieldsDepend);
|
||||
return Objects.hashCode(
|
||||
id,
|
||||
name,
|
||||
bizName,
|
||||
createdBy,
|
||||
modelIds,
|
||||
domainId,
|
||||
dataSetId,
|
||||
sensitiveLevel,
|
||||
status,
|
||||
key,
|
||||
ids,
|
||||
fieldsDepend);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,5 +9,4 @@ import java.util.List;
|
||||
public class MetricDefineByFieldParams extends MetricDefineParams {
|
||||
|
||||
private List<FieldParam> fields = Lists.newArrayList();
|
||||
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@ package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class MetricDefineByMeasureParams extends MetricDefineParams {
|
||||
|
||||
private List<MeasureParam> measures = Lists.newArrayList();
|
||||
|
||||
}
|
||||
|
||||
@@ -9,5 +9,4 @@ import java.util.List;
|
||||
public class MetricDefineByMetricParams extends MetricDefineParams {
|
||||
|
||||
private List<MetricParam> metrics = Lists.newArrayList();
|
||||
|
||||
}
|
||||
|
||||
@@ -8,5 +8,4 @@ public abstract class MetricDefineParams {
|
||||
private String expr;
|
||||
|
||||
private String filterSql;
|
||||
|
||||
}
|
||||
|
||||
@@ -12,5 +12,4 @@ public class MetricInfo {
|
||||
private String value;
|
||||
private String date;
|
||||
private Map<String, String> statistics;
|
||||
|
||||
}
|
||||
|
||||
@@ -12,5 +12,4 @@ public class MetricParam {
|
||||
private Long id;
|
||||
|
||||
private String bizName;
|
||||
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ public class MetricQueryDefaultConfig extends RecordInfo {
|
||||
|
||||
private String userName;
|
||||
|
||||
//string of queryStruct
|
||||
// string of queryStruct
|
||||
private String defaultConfig;
|
||||
|
||||
}
|
||||
|
||||
@@ -14,5 +14,4 @@ public class MetricTable {
|
||||
private List<String> dimensions = Lists.newArrayList();
|
||||
private String where;
|
||||
private AggOption aggOption = AggOption.DEFAULT;
|
||||
|
||||
}
|
||||
|
||||
@@ -9,5 +9,4 @@ public class MetricTypeDefaultConfig {
|
||||
|
||||
private TimeDefaultConfig timeDefaultConfig =
|
||||
new TimeDefaultConfig(7, Constants.DAY, TimeMode.RECENT);
|
||||
|
||||
}
|
||||
|
||||
@@ -53,23 +53,33 @@ public class ModelDetail {
|
||||
return fields;
|
||||
}
|
||||
List<Field> fieldList = Lists.newArrayList();
|
||||
//Compatible with older versions
|
||||
// Compatible with older versions
|
||||
if (!CollectionUtils.isEmpty(identifiers)) {
|
||||
fieldList.addAll(identifiers.stream()
|
||||
.map(identify -> Field.builder().fieldName(identify.getFieldName()).build())
|
||||
.collect(Collectors.toSet()));
|
||||
fieldList.addAll(
|
||||
identifiers.stream()
|
||||
.map(
|
||||
identify ->
|
||||
Field.builder()
|
||||
.fieldName(identify.getFieldName())
|
||||
.build())
|
||||
.collect(Collectors.toSet()));
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(dimensions)) {
|
||||
fieldList.addAll(dimensions.stream()
|
||||
.map(dim -> Field.builder().fieldName(dim.getFieldName()).build())
|
||||
.collect(Collectors.toSet()));
|
||||
fieldList.addAll(
|
||||
dimensions.stream()
|
||||
.map(dim -> Field.builder().fieldName(dim.getFieldName()).build())
|
||||
.collect(Collectors.toSet()));
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(measures)) {
|
||||
fieldList.addAll(measures.stream()
|
||||
.map(measure -> Field.builder().fieldName(measure.getFieldName()).build())
|
||||
.collect(Collectors.toSet()));
|
||||
fieldList.addAll(
|
||||
measures.stream()
|
||||
.map(
|
||||
measure ->
|
||||
Field.builder()
|
||||
.fieldName(measure.getFieldName())
|
||||
.build())
|
||||
.collect(Collectors.toSet()));
|
||||
}
|
||||
return fieldList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class Param {
|
||||
|
||||
@@ -14,12 +14,10 @@ public class Param {
|
||||
@NotNull(message = "Invalid parameter value")
|
||||
private String value;
|
||||
|
||||
public Param() {
|
||||
}
|
||||
public Param() {}
|
||||
|
||||
public Param(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,4 @@ public class QueryConfig {
|
||||
private TagTypeDefaultConfig tagTypeDefaultConfig = new TagTypeDefaultConfig();
|
||||
|
||||
private MetricTypeDefaultConfig metricTypeDefaultConfig = new MetricTypeDefaultConfig();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,4 +5,4 @@ public enum QueryDataType {
|
||||
DIMENSION,
|
||||
TAG,
|
||||
ALL
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.tencent.supersonic.common.pojo.Filter;
|
||||
import com.tencent.supersonic.common.pojo.Order;
|
||||
import com.tencent.supersonic.common.pojo.enums.QueryType;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@@ -36,5 +37,4 @@ public class QueryParam {
|
||||
private String where;
|
||||
private List<ColumnOrder> order;
|
||||
private boolean nativeQuery = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -15,4 +15,4 @@ public class QueryResult<T> implements Serializable {
|
||||
private int pageSize = -1;
|
||||
private long totalCount = -1;
|
||||
private List<T> resultList = new ArrayList<T>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,14 +19,11 @@ public class QueryStat {
|
||||
private Long dataSetId;
|
||||
private String user;
|
||||
private String createdAt;
|
||||
/**
|
||||
* corresponding type, such as sql, struct, etc
|
||||
*/
|
||||
/** corresponding type, such as sql, struct, etc */
|
||||
private String queryType;
|
||||
/**
|
||||
* NORMAL, PRE_FLUSH
|
||||
*/
|
||||
/** NORMAL, PRE_FLUSH */
|
||||
private Integer queryTypeBack;
|
||||
|
||||
private String querySqlCmd;
|
||||
private String querySqlCmdMd5;
|
||||
private String queryStructCmd;
|
||||
@@ -228,5 +225,4 @@ public class QueryStat {
|
||||
public List<String> getDimensionListBizName() {
|
||||
return JSONObject.parseArray(dimensions, String.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@@ -14,5 +15,4 @@ import java.util.List;
|
||||
public class RelateDimension {
|
||||
|
||||
List<DrillDownDimension> drillDownDimensions = Lists.newArrayList();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
@@ -15,5 +14,4 @@ public class RelatedSchemaElement {
|
||||
private Long dimensionId;
|
||||
|
||||
private boolean isNecessary;
|
||||
|
||||
}
|
||||
|
||||
@@ -11,11 +11,9 @@ public class RuleInfo {
|
||||
private List<Object> parameters;
|
||||
|
||||
public enum Mode {
|
||||
/**
|
||||
* BEFORE, some days ago
|
||||
* RECENT, the last few days
|
||||
* EXIST, there was some information
|
||||
*/
|
||||
BEFORE, RECENT, EXIST
|
||||
/** BEFORE, some days ago RECENT, the last few days EXIST, there was some information */
|
||||
BEFORE,
|
||||
RECENT,
|
||||
EXIST
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,8 +40,7 @@ public class SchemaElement implements Serializable {
|
||||
private int isTag;
|
||||
private String description;
|
||||
private boolean descriptionMapped;
|
||||
@Builder.Default
|
||||
private Map<String, Object> extInfo = new HashMap<>();
|
||||
@Builder.Default private Map<String, Object> extInfo = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
@@ -52,8 +51,9 @@ public class SchemaElement implements Serializable {
|
||||
return false;
|
||||
}
|
||||
SchemaElement schemaElement = (SchemaElement) o;
|
||||
return Objects.equal(dataSetId, schemaElement.dataSetId) && Objects.equal(id,
|
||||
schemaElement.id) && Objects.equal(name, schemaElement.name)
|
||||
return Objects.equal(dataSetId, schemaElement.dataSetId)
|
||||
&& Objects.equal(id, schemaElement.id)
|
||||
&& Objects.equal(name, schemaElement.name)
|
||||
&& Objects.equal(bizName, schemaElement.bizName)
|
||||
&& Objects.equal(type, schemaElement.type);
|
||||
}
|
||||
|
||||
@@ -23,5 +23,4 @@ public class SchemaElementMatch {
|
||||
public boolean isFullMatched() {
|
||||
return 1.0 == similarity;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -40,7 +40,8 @@ public class SchemaItem extends RecordInfo {
|
||||
return false;
|
||||
}
|
||||
SchemaItem that = (SchemaItem) o;
|
||||
return Objects.equal(id, that.id) && Objects.equal(name, that.name)
|
||||
return Objects.equal(id, that.id)
|
||||
&& Objects.equal(name, that.name)
|
||||
&& Objects.equal(bizName, that.bizName)
|
||||
&& typeEnum == that.typeEnum;
|
||||
}
|
||||
|
||||
@@ -48,5 +48,4 @@ public class SchemaMapInfo {
|
||||
public boolean needContinueMap() {
|
||||
return CollectionUtils.isNotEmpty(getTermDescriptionToMap());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,24 +1,19 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SchemaValueMap {
|
||||
|
||||
/**
|
||||
* dimension value in db
|
||||
*/
|
||||
/** dimension value in db */
|
||||
private String techName;
|
||||
|
||||
/**
|
||||
* dimension value for result show
|
||||
*/
|
||||
/** dimension value for result show */
|
||||
private String bizName;
|
||||
|
||||
/**
|
||||
* dimension value for user query
|
||||
*/
|
||||
/** dimension value for user query */
|
||||
private List<String> alias = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,5 +68,4 @@ public class SemanticParseInfo {
|
||||
}
|
||||
return dataSet.getDataSetId();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -59,7 +59,11 @@ public class SemanticSchema implements Serializable {
|
||||
|
||||
public Map<Long, String> getDataSetIdToName() {
|
||||
return dataSetSchemaList.stream()
|
||||
.collect(Collectors.toMap(a -> a.getDataSet().getId(), a -> a.getDataSet().getName(), (k1, k2) -> k1));
|
||||
.collect(
|
||||
Collectors.toMap(
|
||||
a -> a.getDataSet().getId(),
|
||||
a -> a.getDataSet().getName(),
|
||||
(k1, k2) -> k1));
|
||||
}
|
||||
|
||||
public List<SchemaElement> getDimensionValues() {
|
||||
@@ -115,8 +119,10 @@ public class SemanticSchema implements Serializable {
|
||||
|
||||
public List<SchemaElement> getTags(Long dataSetId) {
|
||||
List<SchemaElement> tags = new ArrayList<>();
|
||||
dataSetSchemaList.stream().filter(schemaElement ->
|
||||
dataSetId.equals(schemaElement.getDataSet().getDataSetId()))
|
||||
dataSetSchemaList.stream()
|
||||
.filter(
|
||||
schemaElement ->
|
||||
dataSetId.equals(schemaElement.getDataSet().getDataSetId()))
|
||||
.forEach(d -> tags.addAll(d.getTags()));
|
||||
return tags;
|
||||
}
|
||||
@@ -127,7 +133,8 @@ public class SemanticSchema implements Serializable {
|
||||
return terms;
|
||||
}
|
||||
|
||||
private List<SchemaElement> getElementsByDataSetId(Long dataSetId, List<SchemaElement> elements) {
|
||||
private List<SchemaElement> getElementsByDataSetId(
|
||||
Long dataSetId, List<SchemaElement> elements) {
|
||||
return elements.stream()
|
||||
.filter(schemaElement -> dataSetId.equals(schemaElement.getDataSetId()))
|
||||
.collect(Collectors.toList());
|
||||
@@ -154,7 +161,10 @@ public class SemanticSchema implements Serializable {
|
||||
if (CollectionUtils.isEmpty(dataSetSchemaList)) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
return dataSetSchemaList.stream().collect(Collectors.toMap(dataSetSchema
|
||||
-> dataSetSchema.getDataSet().getDataSetId(), dataSetSchema -> dataSetSchema));
|
||||
return dataSetSchemaList.stream()
|
||||
.collect(
|
||||
Collectors.toMap(
|
||||
dataSetSchema -> dataSetSchema.getDataSet().getDataSetId(),
|
||||
dataSetSchema -> dataSetSchema));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
|
||||
import com.tencent.supersonic.headless.api.pojo.response.SemanticQueryResp;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -10,5 +9,4 @@ public class SingleItemQueryResult {
|
||||
private Item item;
|
||||
|
||||
private SemanticQueryResp result;
|
||||
|
||||
}
|
||||
|
||||
@@ -13,5 +13,4 @@ public class SqlInfo {
|
||||
|
||||
// SQL to be executed finally
|
||||
private String querySQL;
|
||||
|
||||
}
|
||||
|
||||
@@ -12,5 +12,3 @@ public class SqlVariable {
|
||||
private VariableValueType valueType;
|
||||
private List<Object> defaultValues = Lists.newArrayList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ public class TagTypeDefaultConfig {
|
||||
|
||||
private DefaultDisplayInfo defaultDisplayInfo;
|
||||
|
||||
//default time to filter tag selection results
|
||||
// default time to filter tag selection results
|
||||
private TimeDefaultConfig timeDefaultConfig = new TimeDefaultConfig();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
|
||||
import com.tencent.supersonic.common.pojo.Constants;
|
||||
import com.tencent.supersonic.common.pojo.enums.TimeMode;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -12,18 +11,11 @@ import lombok.NoArgsConstructor;
|
||||
@NoArgsConstructor
|
||||
public class TimeDefaultConfig {
|
||||
|
||||
|
||||
/**
|
||||
* default time span unit
|
||||
*/
|
||||
/** default time span unit */
|
||||
private Integer unit = 1;
|
||||
|
||||
/**
|
||||
* default time type: day
|
||||
* DAY, WEEK, MONTH, YEAR
|
||||
*/
|
||||
/** default time type: day DAY, WEEK, MONTH, YEAR */
|
||||
private String period = Constants.DAY;
|
||||
|
||||
private TimeMode timeMode = TimeMode.LAST;
|
||||
|
||||
}
|
||||
|
||||
@@ -16,4 +16,4 @@ public class ValueDistribution {
|
||||
private Long valueCount;
|
||||
|
||||
private Double ratio;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
/**
|
||||
* Aggregation type of metric when query metric without aggregation method
|
||||
* NATIVE: will not use Aggregation
|
||||
* DEFAULT: will use the aggregation method define in the model
|
||||
* Aggregation type of metric when query metric without aggregation method NATIVE: will not use
|
||||
* Aggregation DEFAULT: will use the aggregation method define in the model
|
||||
*/
|
||||
public enum AggOption {
|
||||
NATIVE,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
public enum AppStatus {
|
||||
|
||||
INIT(0),
|
||||
ONLINE(1),
|
||||
OFFLINE(2),
|
||||
|
||||
@@ -7,4 +7,4 @@ public enum ChatWorkflowState {
|
||||
TRANSLATING,
|
||||
PROCESSING,
|
||||
FINISHED
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,36 +1,69 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
|
||||
import com.tencent.supersonic.common.pojo.Constants;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public enum DataType {
|
||||
|
||||
MYSQL("mysql", "mysql", "com.mysql.cj.jdbc.Driver", "`", "`", "'", "'"),
|
||||
|
||||
HIVE2("hive2", "hive", "org.apache.hive.jdbc.HiveDriver", "`", "`", "`", "`"),
|
||||
|
||||
ORACLE("oracle", "oracle", "oracle.jdbc.driver.OracleDriver", "\"", "\"", "\"", "\""),
|
||||
|
||||
SQLSERVER("sqlserver", "sqlserver", "com.microsoft.sqlserver.jdbc.SQLServerDriver", "\"", "\"", "\"", "\""),
|
||||
SQLSERVER(
|
||||
"sqlserver",
|
||||
"sqlserver",
|
||||
"com.microsoft.sqlserver.jdbc.SQLServerDriver",
|
||||
"\"",
|
||||
"\"",
|
||||
"\"",
|
||||
"\""),
|
||||
|
||||
H2("h2", "h2", "org.h2.Driver", "`", "`", "\"", "\""),
|
||||
|
||||
PHOENIX("phoenix", "hbase phoenix", "org.apache.phoenix.jdbc.PhoenixDriver", "", "", "\"", "\""),
|
||||
PHOENIX(
|
||||
"phoenix",
|
||||
"hbase phoenix",
|
||||
"org.apache.phoenix.jdbc.PhoenixDriver",
|
||||
"",
|
||||
"",
|
||||
"\"",
|
||||
"\""),
|
||||
|
||||
MONGODB("mongo", "mongodb", "mongodb.jdbc.MongoDriver", "`", "`", "\"", "\""),
|
||||
|
||||
ELASTICSEARCH("elasticsearch", "elasticsearch", "com.amazon.opendistroforelasticsearch.jdbc.Driver", "", "", "'",
|
||||
ELASTICSEARCH(
|
||||
"elasticsearch",
|
||||
"elasticsearch",
|
||||
"com.amazon.opendistroforelasticsearch.jdbc.Driver",
|
||||
"",
|
||||
"",
|
||||
"'",
|
||||
"'"),
|
||||
|
||||
PRESTO("presto", "presto", "com.facebook.presto.jdbc.PrestoDriver", "\"", "\"", "\"", "\""),
|
||||
|
||||
MOONBOX("moonbox", "moonbox", "moonbox.jdbc.MbDriver", "`", "`", "`", "`"),
|
||||
|
||||
CASSANDRA("cassandra", "cassandra", "com.github.adejanovski.cassandra.jdbc.CassandraDriver", "", "", "'", "'"),
|
||||
CASSANDRA(
|
||||
"cassandra",
|
||||
"cassandra",
|
||||
"com.github.adejanovski.cassandra.jdbc.CassandraDriver",
|
||||
"",
|
||||
"",
|
||||
"'",
|
||||
"'"),
|
||||
|
||||
CLICKHOUSE("clickhouse", "clickhouse", "ru.yandex.clickhouse.ClickHouseDriver", "", "", "\"", "\""),
|
||||
CLICKHOUSE(
|
||||
"clickhouse",
|
||||
"clickhouse",
|
||||
"ru.yandex.clickhouse.ClickHouseDriver",
|
||||
"",
|
||||
"",
|
||||
"\"",
|
||||
"\""),
|
||||
|
||||
KYLIN("kylin", "kylin", "org.apache.kylin.jdbc.Driver", "\"", "\"", "\"", "\""),
|
||||
|
||||
@@ -52,8 +85,14 @@ public enum DataType {
|
||||
private String aliasPrefix;
|
||||
private String aliasSuffix;
|
||||
|
||||
DataType(String feature, String desc, String driver, String keywordPrefix, String keywordSuffix,
|
||||
String aliasPrefix, String aliasSuffix) {
|
||||
DataType(
|
||||
String feature,
|
||||
String desc,
|
||||
String driver,
|
||||
String keywordPrefix,
|
||||
String keywordSuffix,
|
||||
String aliasPrefix,
|
||||
String aliasSuffix) {
|
||||
this.feature = feature;
|
||||
this.desc = desc;
|
||||
this.driver = driver;
|
||||
@@ -66,7 +105,8 @@ public enum DataType {
|
||||
public static DataType urlOf(String jdbcUrl) throws RuntimeException {
|
||||
String url = jdbcUrl.toLowerCase().trim();
|
||||
for (DataType dataTypeEnum : values()) {
|
||||
if (url.startsWith(String.format(Constants.JDBC_PREFIX_FORMATTER, dataTypeEnum.feature))) {
|
||||
if (url.startsWith(
|
||||
String.format(Constants.JDBC_PREFIX_FORMATTER, dataTypeEnum.feature))) {
|
||||
return dataTypeEnum;
|
||||
}
|
||||
}
|
||||
@@ -108,4 +148,4 @@ public enum DataType {
|
||||
public String getAliasSuffix() {
|
||||
return aliasSuffix;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
public enum DimensionType {
|
||||
|
||||
categorical,
|
||||
time,
|
||||
partition_time,
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
|
||||
public enum EngineType {
|
||||
|
||||
TDW(0, "tdw"),
|
||||
MYSQL(1, "mysql"),
|
||||
DORIS(2, "doris"),
|
||||
@@ -12,7 +10,6 @@ public enum EngineType {
|
||||
POSTGRESQL(6, "postgresql"),
|
||||
OTHER(7, "other");
|
||||
|
||||
|
||||
private Integer code;
|
||||
|
||||
private String name;
|
||||
@@ -38,5 +35,4 @@ public enum EngineType {
|
||||
}
|
||||
throw new IllegalArgumentException("Invalid value: " + value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
public enum IdentifyType {
|
||||
|
||||
primary,
|
||||
foreign,
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
public enum MetricDefineType {
|
||||
|
||||
FIELD,
|
||||
MEASURE,
|
||||
METRIC
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
|
||||
import com.tencent.supersonic.headless.api.pojo.MeasureParam;
|
||||
import com.tencent.supersonic.headless.api.pojo.MetricDefineByMeasureParams;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public enum MetricType {
|
||||
|
||||
ATOMIC,
|
||||
DERIVED;
|
||||
|
||||
@@ -25,7 +24,8 @@ public enum MetricType {
|
||||
return Objects.nonNull(metricType) && metricType.equals(DERIVED);
|
||||
}
|
||||
|
||||
public static Boolean isDerived(MetricDefineType metricDefineType, MetricDefineByMeasureParams typeParams) {
|
||||
public static Boolean isDerived(
|
||||
MetricDefineType metricDefineType, MetricDefineByMeasureParams typeParams) {
|
||||
if (MetricDefineType.METRIC.equals(metricDefineType)) {
|
||||
return true;
|
||||
}
|
||||
@@ -37,8 +37,8 @@ public enum MetricType {
|
||||
if (measures.size() > 1) {
|
||||
return true;
|
||||
}
|
||||
if (measures.size() == 1 && measures.get(0).getBizName()
|
||||
.equalsIgnoreCase(typeParams.getExpr())) {
|
||||
if (measures.size() == 1
|
||||
&& measures.get(0).getBizName().equalsIgnoreCase(typeParams.getExpr())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
/**
|
||||
* model datasource define type:
|
||||
* sql_query : dataSet sql begin as select
|
||||
* table_query: dbName.tableName
|
||||
* model datasource define type: sql_query : dataSet sql begin as select table_query:
|
||||
* dbName.tableName
|
||||
*/
|
||||
public enum ModelDefineType {
|
||||
|
||||
SQL_QUERY("sql_query"),
|
||||
TABLE_QUERY("table_query");
|
||||
|
||||
private String name;
|
||||
|
||||
|
||||
ModelDefineType(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* model source table type:
|
||||
* FULL: table without time partition
|
||||
* PARTITION: table with partition field
|
||||
* model source table type: FULL: table without time partition PARTITION: table with partition field
|
||||
* ZIPPER: table with slowly changing dimension
|
||||
*/
|
||||
public enum ModelSourceType {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
|
||||
public enum QueryMethod {
|
||||
SQL("SQL"),
|
||||
|
||||
@@ -24,5 +23,4 @@ public enum QueryMethod {
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
public enum QueryOptMode {
|
||||
|
||||
NONE,
|
||||
|
||||
MATERIALIZATION
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
public enum QueryRuleType {
|
||||
|
||||
ADD_DATE,
|
||||
ADD_SELECT
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
|
||||
public enum QueryTypeBack {
|
||||
NORMAL("NORMAL", 0),
|
||||
|
||||
@@ -30,5 +29,4 @@ public enum QueryTypeBack {
|
||||
public Integer getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
public enum SchemaType {
|
||||
|
||||
DATASET,
|
||||
MODEL
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
public enum SemanticType {
|
||||
|
||||
CATEGORY,
|
||||
ID,
|
||||
DATE,
|
||||
NUMBER
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
public enum TagDefineType {
|
||||
|
||||
FIELD,
|
||||
DIMENSION,
|
||||
METRIC,
|
||||
|
||||
@@ -21,7 +21,8 @@ public enum TagType {
|
||||
}
|
||||
|
||||
public static TagType getType(TagDefineType tagDefineType) {
|
||||
return Objects.nonNull(tagDefineType) && TagDefineType.TAG.equals(tagDefineType) ? TagType.DERIVED
|
||||
return Objects.nonNull(tagDefineType) && TagDefineType.TAG.equals(tagDefineType)
|
||||
? TagType.DERIVED
|
||||
: TagType.ATOMIC;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.request;
|
||||
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.tencent.supersonic.common.pojo.PageBaseReq;
|
||||
import com.tencent.supersonic.headless.api.pojo.enums.AppStatus;
|
||||
@@ -25,5 +24,4 @@ public class AppQueryReq extends PageBaseReq {
|
||||
}
|
||||
return appStatus.stream().map(AppStatus::getCode).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -31,5 +31,4 @@ public class AppReq extends RecordInfo {
|
||||
}
|
||||
return String.join(",", owners);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.tencent.supersonic.headless.api.pojo.request;
|
||||
|
||||
import com.tencent.supersonic.common.pojo.DateConf;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@@ -12,5 +13,4 @@ public class BatchDownloadReq {
|
||||
private DateConf dateInfo;
|
||||
|
||||
private boolean isTransform = true;
|
||||
|
||||
}
|
||||
|
||||
@@ -13,5 +13,4 @@ public class CanvasReq extends RecordInfo {
|
||||
private String type;
|
||||
|
||||
private String config;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,5 +12,4 @@ public class ClassReq extends SchemaItem {
|
||||
private Long tagObjectId;
|
||||
private Long parentId;
|
||||
private List<Long> itemIds;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,5 +29,4 @@ public class DataSetFilterReq {
|
||||
public void addDataSet(Long dataSetId) {
|
||||
dataSetIds.add(dataSetId);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,5 +35,4 @@ public class DataSetReq extends SchemaItem {
|
||||
}
|
||||
return String.join(",", adminOrgs);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ package com.tencent.supersonic.headless.api.pojo.request;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.tencent.supersonic.common.pojo.RecordInfo;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DatabaseReq extends RecordInfo {
|
||||
@@ -35,5 +35,4 @@ public class DatabaseReq extends RecordInfo {
|
||||
private List<String> admins = Lists.newArrayList();
|
||||
|
||||
private List<String> viewers = Lists.newArrayList();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.request;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
@AllArgsConstructor
|
||||
@@ -21,7 +22,8 @@ public class DateInfoReq {
|
||||
private String datePeriod;
|
||||
private List<String> unavailableDateList = new ArrayList<>();
|
||||
|
||||
public DateInfoReq(String type, Long itemId, String dateFormat, String startDate, String endDate) {
|
||||
public DateInfoReq(
|
||||
String type, Long itemId, String dateFormat, String startDate, String endDate) {
|
||||
this.type = type;
|
||||
this.itemId = itemId;
|
||||
this.dateFormat = dateFormat;
|
||||
@@ -29,7 +31,12 @@ public class DateInfoReq {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public DateInfoReq(String type, Long itemId, String dateFormat, String startDate, String endDate,
|
||||
public DateInfoReq(
|
||||
String type,
|
||||
Long itemId,
|
||||
String dateFormat,
|
||||
String startDate,
|
||||
String endDate,
|
||||
List<String> unavailableDateList) {
|
||||
this.type = type;
|
||||
this.itemId = itemId;
|
||||
@@ -38,5 +45,4 @@ public class DateInfoReq {
|
||||
this.endDate = endDate;
|
||||
this.unavailableDateList = unavailableDateList;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@ public class DictItemFilter {
|
||||
private TypeEnums type;
|
||||
private Long itemId;
|
||||
private StatusEnum status;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +1,20 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.request;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.tencent.supersonic.common.pojo.enums.StatusEnum;
|
||||
import com.tencent.supersonic.common.pojo.enums.TypeEnums;
|
||||
import com.tencent.supersonic.headless.api.pojo.ItemValueConfig;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class DictItemReq {
|
||||
|
||||
private Long id;
|
||||
@NotNull
|
||||
private TypeEnums type;
|
||||
@NotNull
|
||||
private Long itemId;
|
||||
@NotNull private TypeEnums type;
|
||||
@NotNull private Long itemId;
|
||||
private ItemValueConfig config;
|
||||
|
||||
/**
|
||||
* ONLINE - 正常更新
|
||||
* OFFLINE - 停止更新,但字典文件不删除
|
||||
* DELETED - 停止更新,且删除字典文件
|
||||
*/
|
||||
@NotNull
|
||||
private StatusEnum status;
|
||||
}
|
||||
/** ONLINE - 正常更新 OFFLINE - 停止更新,但字典文件不删除 DELETED - 停止更新,且删除字典文件 */
|
||||
@NotNull private StatusEnum status;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.request;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.tencent.supersonic.common.pojo.enums.TypeEnums;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
public class DictSingleTaskReq {
|
||||
@NotNull
|
||||
private TypeEnums type;
|
||||
@NotNull
|
||||
private Long itemId;
|
||||
}
|
||||
@NotNull private TypeEnums type;
|
||||
@NotNull private Long itemId;
|
||||
}
|
||||
|
||||
@@ -13,4 +13,4 @@ public class DictValueReq extends PageBaseReq {
|
||||
private Long itemId;
|
||||
|
||||
private TypeEnums type = TypeEnums.DIMENSION;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.request;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.tencent.supersonic.common.pojo.enums.DataTypeEnums;
|
||||
import com.tencent.supersonic.headless.api.pojo.DimValueMap;
|
||||
import com.tencent.supersonic.headless.api.pojo.SchemaItem;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -19,7 +20,7 @@ public class DimensionReq extends SchemaItem {
|
||||
@NotNull(message = "expr can not be null")
|
||||
private String expr;
|
||||
|
||||
//DATE ID CATEGORY
|
||||
// DATE ID CATEGORY
|
||||
private String semanticType = "CATEGORY";
|
||||
|
||||
private String alias;
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.request;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.tencent.supersonic.common.pojo.DateConf;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Data
|
||||
@@ -11,15 +13,13 @@ public class DimensionValueReq {
|
||||
|
||||
private Integer agentId;
|
||||
|
||||
@NotNull
|
||||
private Long elementID;
|
||||
@NotNull private Long elementID;
|
||||
|
||||
private Long modelId;
|
||||
|
||||
private String bizName;
|
||||
|
||||
@NotNull
|
||||
private String value;
|
||||
@NotNull private String value;
|
||||
|
||||
private Set<Long> dataSetIds;
|
||||
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.request;
|
||||
|
||||
|
||||
import com.tencent.supersonic.headless.api.pojo.SchemaItem;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class DomainReq extends SchemaItem {
|
||||
|
||||
@@ -38,5 +36,4 @@ public class DomainReq extends SchemaItem {
|
||||
public String getAdminOrg() {
|
||||
return String.join(",", adminOrgs);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.request;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class DomainUpdateReq extends DomainReq {
|
||||
|
||||
private Long id;
|
||||
|
||||
}
|
||||
|
||||
@@ -10,5 +10,4 @@ public class DownloadMetricReq extends QueryMetricReq {
|
||||
public void setIsTransform(boolean isTransform) {
|
||||
this.isTransform = isTransform;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.request;
|
||||
|
||||
|
||||
import com.tencent.supersonic.auth.api.authentication.pojo.User;
|
||||
import com.tencent.supersonic.headless.api.pojo.SemanticParseInfo;
|
||||
import lombok.Builder;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@@ -9,5 +10,4 @@ public class FieldRemovedReq {
|
||||
private Long modelId;
|
||||
|
||||
private List<String> fields;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.request;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
@NoArgsConstructor
|
||||
@@ -20,6 +21,7 @@ public class ItemUseReq {
|
||||
this.startTime = startTime;
|
||||
this.modelId = modelId;
|
||||
}
|
||||
|
||||
public ItemUseReq(String startTime, List<Long> modelIds) {
|
||||
this.startTime = startTime;
|
||||
this.modelIds = modelIds;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.request;
|
||||
|
||||
import com.tencent.supersonic.common.pojo.DateConf;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.tencent.supersonic.common.pojo.DateConf;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
@@ -9,10 +10,9 @@ import lombok.ToString;
|
||||
@ToString
|
||||
public class ItemValueReq {
|
||||
|
||||
@NotNull
|
||||
private Long id;
|
||||
@NotNull private Long id;
|
||||
|
||||
private DateConf dateConf;
|
||||
|
||||
private Long limit = 10L;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.tencent.supersonic.headless.api.pojo.request;
|
||||
|
||||
import com.tencent.supersonic.common.pojo.enums.EventType;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@@ -13,18 +14,13 @@ public class MetaBatchReq {
|
||||
|
||||
private List<Long> modelIds;
|
||||
|
||||
/**
|
||||
* 最后变更的状态
|
||||
*/
|
||||
/** 最后变更的状态 */
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 批量执行分类信息
|
||||
*/
|
||||
/** 批量执行分类信息 */
|
||||
private EventType type;
|
||||
|
||||
private List<String> classifications;
|
||||
|
||||
private Integer sensitiveLevel;
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import org.springframework.util.CollectionUtils;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Data
|
||||
public class MetricBaseReq extends SchemaItem {
|
||||
|
||||
@@ -39,5 +38,4 @@ public class MetricBaseReq extends SchemaItem {
|
||||
}
|
||||
return StringUtils.join(classifications, ",");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,5 +16,4 @@ public class MetricQueryReq {
|
||||
private Long limit;
|
||||
private List<ColumnOrder> order;
|
||||
private boolean nativeQuery = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.request;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.tencent.supersonic.headless.api.pojo.enums.MetricDefineType;
|
||||
import com.tencent.supersonic.headless.api.pojo.enums.MetricType;
|
||||
import com.tencent.supersonic.headless.api.pojo.MetricDefineByFieldParams;
|
||||
import com.tencent.supersonic.headless.api.pojo.MetricDefineByMeasureParams;
|
||||
import com.tencent.supersonic.headless.api.pojo.MetricDefineByMetricParams;
|
||||
import com.tencent.supersonic.headless.api.pojo.enums.MetricDefineType;
|
||||
import com.tencent.supersonic.headless.api.pojo.enums.MetricType;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@@ -19,9 +19,11 @@ public class MetricReq extends MetricBaseReq {
|
||||
public String getTypeParamsJson() {
|
||||
if (MetricDefineType.FIELD.equals(metricDefineType) && metricDefineByFieldParams != null) {
|
||||
return JSONObject.toJSONString(metricDefineByFieldParams);
|
||||
} else if (MetricDefineType.MEASURE.equals(metricDefineType) && metricDefineByMeasureParams != null) {
|
||||
} else if (MetricDefineType.MEASURE.equals(metricDefineType)
|
||||
&& metricDefineByMeasureParams != null) {
|
||||
return JSONObject.toJSONString(metricDefineByMeasureParams);
|
||||
} else if (MetricDefineType.METRIC.equals(metricDefineType) && metricDefineByMetricParams != null) {
|
||||
} else if (MetricDefineType.METRIC.equals(metricDefineType)
|
||||
&& metricDefineByMetricParams != null) {
|
||||
return JSONObject.toJSONString(metricDefineByMetricParams);
|
||||
}
|
||||
return null;
|
||||
@@ -29,7 +31,7 @@ public class MetricReq extends MetricBaseReq {
|
||||
|
||||
public MetricType getMetricType() {
|
||||
return MetricType.isDerived(metricDefineType, metricDefineByMeasureParams)
|
||||
? MetricType.DERIVED : MetricType.ATOMIC;
|
||||
? MetricType.DERIVED
|
||||
: MetricType.ATOMIC;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.request;
|
||||
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.tencent.supersonic.headless.api.pojo.Dim;
|
||||
import com.tencent.supersonic.headless.api.pojo.DrillDownDimension;
|
||||
@@ -11,7 +10,6 @@ import lombok.Data;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Data
|
||||
public class ModelReq extends SchemaItem {
|
||||
|
||||
@@ -77,5 +75,4 @@ public class ModelReq extends SchemaItem {
|
||||
}
|
||||
return String.join(",", adminOrgs);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user