This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new ef8a0b1d686 [fix](stats) Fix potential NPE when doing auto analyze
#25908 (#26302)
ef8a0b1d686 is described below
commit ef8a0b1d686625e3ef3fe1584f1510f84279685d
Author: AKIRA <[email protected]>
AuthorDate: Thu Nov 2 21:44:05 2023 +0800
[fix](stats) Fix potential NPE when doing auto analyze #25908 (#26302)
---
.../java/org/apache/doris/statistics/StatisticsAutoCollector.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsAutoCollector.java
b/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsAutoCollector.java
index 20ebc5848d0..325065d6e26 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsAutoCollector.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsAutoCollector.java
@@ -117,6 +117,10 @@ public class StatisticsAutoCollector extends
StatisticsCollector {
return false;
}
TableStatsMeta tableStats =
Env.getCurrentEnv().getAnalysisManager().findTableStatsStatus(table.getId());
+ // means it never get analyzed yet
+ if (tableStats == null) {
+ return false;
+ }
return System.currentTimeMillis() - tableStats.updatedTime <
Config.huge_table_auto_analyze_interval_in_millis;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]