mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
[fix][headless]Fix NEP problem.
This commit is contained in:
@@ -56,11 +56,11 @@ public class ModelResp extends SchemaItem {
|
||||
}
|
||||
|
||||
public List<Measure> getMeasures() {
|
||||
return modelDetail.getMeasures();
|
||||
return modelDetail != null ? modelDetail.getMeasures() : Lists.newArrayList();
|
||||
}
|
||||
|
||||
public List<Identify> getIdentifiers() {
|
||||
return modelDetail.getIdentifiers();
|
||||
return modelDetail != null ? modelDetail.getIdentifiers() : Lists.newArrayList();
|
||||
}
|
||||
|
||||
public List<Dimension> getTimeDimension() {
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.tencent.supersonic.headless.core.executor;
|
||||
import com.tencent.supersonic.common.calcite.Configuration;
|
||||
import com.tencent.supersonic.common.jsqlparser.SqlSelectHelper;
|
||||
import com.tencent.supersonic.headless.core.pojo.Materialization;
|
||||
import com.tencent.supersonic.headless.core.translator.parser.TimeRange;
|
||||
import com.tencent.supersonic.headless.core.translator.parser.calcite.S2CalciteTable;
|
||||
import com.tencent.supersonic.headless.core.translator.parser.calcite.S2CalciteTable.Builder;
|
||||
import com.tencent.supersonic.headless.core.translator.parser.calcite.SchemaBuilder;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.tencent.supersonic.headless.core.translator.parser;
|
||||
package com.tencent.supersonic.headless.core.executor;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.tencent.supersonic.headless.core.translator.parser;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
public class Materialization {
|
||||
|
||||
public enum TimePartType {
|
||||
/**
|
||||
* partition time type 1 - FULL, not use partition 2 - PARTITION , use time list 3 - ZIPPER,
|
||||
* use [startDate, endDate] range time
|
||||
*/
|
||||
FULL("FULL"), PARTITION("PARTITION"), ZIPPER("ZIPPER"), None("");
|
||||
|
||||
private String name;
|
||||
|
||||
TimePartType(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public static TimePartType of(String name) {
|
||||
for (TimePartType typeEnum : TimePartType.values()) {
|
||||
if (typeEnum.name.equalsIgnoreCase(name)) {
|
||||
return typeEnum;
|
||||
}
|
||||
}
|
||||
return TimePartType.None;
|
||||
}
|
||||
}
|
||||
|
||||
private TimePartType timePartType;
|
||||
private String destinationTable;
|
||||
private String dateInfo;
|
||||
private String entities;
|
||||
private Long modelId;
|
||||
private Long dataBase;
|
||||
private Long materializationId;
|
||||
private Integer level;
|
||||
private List<MaterializationElement> dimensions = new ArrayList<>();
|
||||
private List<MaterializationElement> metrics = new ArrayList<>();
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.tencent.supersonic.headless.core.translator.parser;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
public class MaterializationElement {
|
||||
private List<TimeRange> timeRangeList;
|
||||
private String name;
|
||||
}
|
||||
Reference in New Issue
Block a user