This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new b32557e195c [fix](stats) Fix potential NPE when doing auto analyze 
(#25908)
b32557e195c is described below

commit b32557e195cf20ef41162c77d8bc945cdad17e79
Author: AKIRA <33112463+kikyou1...@users.noreply.github.com>
AuthorDate: Fri Oct 27 09:47:57 2023 +0800

    [fix](stats) Fix potential NPE when doing auto analyze (#25908)
---
 .../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..8f5bb605b68 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's never got analyzed
+        if (tableStats == null) {
+            return false;
+        }
         return System.currentTimeMillis() - tableStats.updatedTime < 
Config.huge_table_auto_analyze_interval_in_millis;
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to