You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/12/29 03:50:21 UTC
[doris] branch branch-1.2-lts updated: [fix](statistics) fix npe when __internal_schema not exists (#15461)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
new 0b5c2e7ec7 [fix](statistics) fix npe when __internal_schema not exists (#15461)
0b5c2e7ec7 is described below
commit 0b5c2e7ec7c764d77cc59393e6d2eb71ec969891
Author: Kikyou1997 <33...@users.noreply.github.com>
AuthorDate: Thu Dec 29 11:50:15 2022 +0800
[fix](statistics) fix npe when __internal_schema not exists (#15461)
---
.../main/java/org/apache/doris/statistics/util/StatisticsUtil.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/statistics/util/StatisticsUtil.java b/fe/fe-core/src/main/java/org/apache/doris/statistics/util/StatisticsUtil.java
index 8baf30a728..c14ff5e8e1 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/statistics/util/StatisticsUtil.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/statistics/util/StatisticsUtil.java
@@ -54,10 +54,12 @@ import org.apache.doris.system.SystemInfoService;
import org.apache.doris.thrift.TUniqueId;
import com.google.common.base.Preconditions;
+import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.text.StringSubstitutor;
import org.apache.thrift.TException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@@ -102,6 +104,9 @@ public class StatisticsUtil {
public static List<ColumnStatistic> deserializeToColumnStatistics(List<ResultRow> resultBatches)
throws Exception {
+ if (CollectionUtils.isEmpty(resultBatches)) {
+ return Collections.emptyList();
+ }
return resultBatches.stream().map(ColumnStatistic::fromResultRow).collect(Collectors.toList());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org