[fix](stats) Fix potential NPE when doing auto analyze (#25908)
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user