[fix](statistics)Fix external table show column stats type bug (#26910)
The show column stats result for external table shows N/A for the columns of method, type, trigger and query_times. This pr is to fix this bug, to show the correct value.
This commit is contained in:
@ -340,6 +340,7 @@ public class AnalysisManager implements Writable {
|
||||
constructJob(jobInfo, analysisTaskInfos.values());
|
||||
if (isSync) {
|
||||
syncExecute(analysisTaskInfos.values());
|
||||
jobInfo.state = AnalysisState.FINISHED;
|
||||
updateTableStats(jobInfo);
|
||||
return null;
|
||||
}
|
||||
@ -593,8 +594,9 @@ public class AnalysisManager implements Writable {
|
||||
public void updateTableStats(AnalysisInfo jobInfo) {
|
||||
TableIf tbl = StatisticsUtil.findTable(jobInfo.catalogId,
|
||||
jobInfo.dbId, jobInfo.tblId);
|
||||
// External Table update table stats after table level task finished.
|
||||
if (tbl instanceof ExternalTable) {
|
||||
// External Table only update table stats when all tasks finished.
|
||||
// Because it needs to get the row count from the result of row count task.
|
||||
if (tbl instanceof ExternalTable && !jobInfo.state.equals(AnalysisState.FINISHED)) {
|
||||
return;
|
||||
}
|
||||
TableStatsMeta tableStats = findTableStatsStatus(tbl.getId());
|
||||
|
||||
Reference in New Issue
Block a user