(fix)(chat):skip null values to avoid NPE (#645)

This commit is contained in:
Scott
2024-01-18 19:56:03 +08:00
committed by GitHub
parent a06a1fa898
commit 90f9da162e

View File

@@ -102,7 +102,9 @@ public class DictQueryHelper {
Map<String, Long> valueAndFrequencyPair = new HashMap<>(2000);
for (Map<String, Object> line : resultList) {
if (CollectionUtils.isEmpty(line) || !line.containsKey(dimName)) {
if (CollectionUtils.isEmpty(line) || !line.containsKey(dimName)
|| !line.containsKey(metricName)
|| line.get(dimName) == null) {
continue;
}