[fix][headless-chat]Fix NPE problem.

This commit is contained in:
jerryjzhang
2024-09-13 14:54:34 +08:00
parent 5f4d24348a
commit 579394af40

View File

@@ -11,6 +11,7 @@ import org.apache.commons.collections4.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
@Data
@@ -56,8 +57,12 @@ public class LLMReq {
.map(dimension -> dimension.getName())
.collect(Collectors.toList()));
}
fieldNameList.add(partitionTime.getName());
fieldNameList.add(primaryKey.getName());
if (Objects.nonNull(partitionTime)) {
fieldNameList.add(partitionTime.getName());
}
if (Objects.nonNull(primaryKey)) {
fieldNameList.add(primaryKey.getName());
}
return fieldNameList;
}
}