[fix](statistics)Fix column stats trigger info bug (#28303)

Before, we didn't update the jobType info in ColStatsMeta. This will case the jobType always be the type
when it first be set. For example, if we manually analyzed table, the jobType will always be MANUAL,
even if this table is auto analyzed again later.
This commit is contained in:
Jibing-Li
2023-12-13 20:31:03 +08:00
committed by GitHub
parent 0868526f6a
commit 099b1b7106
3 changed files with 40 additions and 2 deletions

View File

@ -361,8 +361,6 @@ public class AnalysisManager implements Writable {
}
recordAnalysisJob(jobInfo);
analysisJobIdToTaskMap.put(jobInfo.jobId, analysisTaskInfos);
// TODO: maybe we should update table stats only when all task succeeded.
updateTableStats(jobInfo);
if (!jobInfo.scheduleType.equals(ScheduleType.PERIOD)) {
analysisTaskInfos.values().forEach(taskExecutor::submitTask);
}

View File

@ -141,6 +141,7 @@ public class TableStatsMeta implements Writable {
colStatsMeta.updatedTime = updatedTime;
colStatsMeta.analysisType = analyzedJob.analysisType;
colStatsMeta.analysisMethod = analyzedJob.analysisMethod;
colStatsMeta.jobType = analyzedJob.jobType;
}
}
jobType = analyzedJob.jobType;