mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
(fix)(headless)Fix bizName and name NPE issue.
This commit is contained in:
@@ -38,7 +38,7 @@ public class ModelClusterBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static ModelCluster getModelCluster(Map<Long, ModelSchemaResp> modelIdToModelSchema,
|
private static ModelCluster getModelCluster(Map<Long, ModelSchemaResp> modelIdToModelSchema,
|
||||||
Set<Long> modelIds) {
|
Set<Long> modelIds) {
|
||||||
boolean containsPartitionDimensions = modelIds.stream().map(modelIdToModelSchema::get)
|
boolean containsPartitionDimensions = modelIds.stream().map(modelIdToModelSchema::get)
|
||||||
.filter(Objects::nonNull).anyMatch(modelSchemaResp -> CollectionUtils
|
.filter(Objects::nonNull).anyMatch(modelSchemaResp -> CollectionUtils
|
||||||
.isNotEmpty(modelSchemaResp.getTimeDimension()));
|
.isNotEmpty(modelSchemaResp.getTimeDimension()));
|
||||||
@@ -47,7 +47,7 @@ public class ModelClusterBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void dfs(ModelSchemaResp model, Map<Long, ModelSchemaResp> modelMap,
|
private static void dfs(ModelSchemaResp model, Map<Long, ModelSchemaResp> modelMap,
|
||||||
Set<Long> visited, Set<Long> modelCluster) {
|
Set<Long> visited, Set<Long> modelCluster) {
|
||||||
if (Objects.isNull(model)) {
|
if (Objects.isNull(model)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,8 +145,9 @@ public class ModelConverter {
|
|||||||
public static ModelReq convert(ModelSchema modelSchema, ModelBuildReq modelBuildReq,
|
public static ModelReq convert(ModelSchema modelSchema, ModelBuildReq modelBuildReq,
|
||||||
String tableName) {
|
String tableName) {
|
||||||
ModelReq modelReq = new ModelReq();
|
ModelReq modelReq = new ModelReq();
|
||||||
modelReq.setName(modelBuildReq.getName());
|
modelReq.setName(modelBuildReq.getName() != null ? modelBuildReq.getName() : tableName);
|
||||||
modelReq.setBizName(modelBuildReq.getBizName());
|
modelReq.setBizName(
|
||||||
|
modelBuildReq.getBizName() != null ? modelBuildReq.getBizName() : tableName);
|
||||||
modelReq.setDatabaseId(modelBuildReq.getDatabaseId());
|
modelReq.setDatabaseId(modelBuildReq.getDatabaseId());
|
||||||
modelReq.setDomainId(modelBuildReq.getDomainId());
|
modelReq.setDomainId(modelBuildReq.getDomainId());
|
||||||
ModelDetail modelDetail = new ModelDetail();
|
ModelDetail modelDetail = new ModelDetail();
|
||||||
|
|||||||
Reference in New Issue
Block a user