mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 02:46:56 +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,
|
||||
Set<Long> modelIds) {
|
||||
Set<Long> modelIds) {
|
||||
boolean containsPartitionDimensions = modelIds.stream().map(modelIdToModelSchema::get)
|
||||
.filter(Objects::nonNull).anyMatch(modelSchemaResp -> CollectionUtils
|
||||
.isNotEmpty(modelSchemaResp.getTimeDimension()));
|
||||
@@ -47,7 +47,7 @@ public class ModelClusterBuilder {
|
||||
}
|
||||
|
||||
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)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -145,8 +145,9 @@ public class ModelConverter {
|
||||
public static ModelReq convert(ModelSchema modelSchema, ModelBuildReq modelBuildReq,
|
||||
String tableName) {
|
||||
ModelReq modelReq = new ModelReq();
|
||||
modelReq.setName(modelBuildReq.getName());
|
||||
modelReq.setBizName(modelBuildReq.getBizName());
|
||||
modelReq.setName(modelBuildReq.getName() != null ? modelBuildReq.getName() : tableName);
|
||||
modelReq.setBizName(
|
||||
modelBuildReq.getBizName() != null ? modelBuildReq.getBizName() : tableName);
|
||||
modelReq.setDatabaseId(modelBuildReq.getDatabaseId());
|
||||
modelReq.setDomainId(modelBuildReq.getDomainId());
|
||||
ModelDetail modelDetail = new ModelDetail();
|
||||
|
||||
Reference in New Issue
Block a user